Anyone with good Javascript skills and some time? Would be cool to have browser extensions for FSNotes, like this one perhaps:
Save to nvALT saves pages from Chrome to nvALT. Pages are saved in clean Markdown. No fluff.
https://github.com/mustpax/save-to-nvALT
I have good JS skills, but busy working on new UI 😊
FSNotes already has its own URL Scheme: fsnotes:// but it only has one path right now: /find/title. We'd need to add other paths, specifically /new/note-name/encoded-note-contents or as navalt named it: /make/title/text
Also I'd recommend it cater for nvalt:// to aid migration from that app. And maybe even nv://just for kicks?
After that, I will do the Safari extension. Here are some I've done in the past.
Maybe Chrome, but no guarantees as I don't really use that browser.
I'm happy to have a crack at the url scheme paths as required — the fact @glushchenko has made a scheme already means he's done all the hard work :)
On this topic though, I can't even get the current one to work very well. For me at least, fsnotes://find/abc doesn't search, it loads the note (if any) with the name abc. That's fine except I haven't worked out how to find notes with spaces (or other similar characters) in their name. Admittedly I haven't read the existing code yet, hopefully that will clarify it (I did try URL-encoding).
I wonder if the existing find/x path could instead fill the search textfield and thus as usual show all matches, with the first match loaded and displayed?
I'll look at /new/note-name/encoded-note-contents.
I like the idea of implementing some nvALT-compatible URLs also, but unfortunately nvALT no longer even loads on my Mac :angry: — can you document them somehow for me?
@glushchenko new UI sounds very intriguing! For the Mac app or the iOS?
@jeff-h navALT build for High Sierra is here: http://brettterpstra.com/2017/09/19/nvalt-2-dot-2-8-because-i-got-high-sierra/ (Sept 2017)
nvALT URL schemes: https://github.com/scrod/nv/wiki/nv%3A---URL-Specification it supports both nv:// and nvalt://
We could also add a built-in Services command, also similar to what nvALT did:
https://github.com/scrod/nv/wiki/Enabling-the-Services-menu-item
What are Services?
https://tidbits.com/2016/02/05/os-x-hidden-treasures-services/
@gingerbeardman re the nvALT High Sierra build: I tried that when it was released (and again today) and it simply doesn't work for me; still have the same symptoms as I posted when it was released (see https://github.com/ttscoff/nv/issues/459#issuecomment-330694960). The deafening silence on that and on https://github.com/ttscoff/nv/issues/459#issuecomment-331023544 are what drove me to FSNotes. Plus the fact that IMO the nvALT source is super ugly.
Thanks for the link to the nvALT URL docs — that's perfect. Can I ask though — what's the reason for implementing the nv:// and nvalt:// schemes inside FSNotes? Is it so that FSNotes will be compatible with third-party extensions intended originally for nvALT?
All I can say is the nvALT Notes preferences issues at that link do not happen for me with nvALT. I was never a heavy user of nvALT so I had to reinstall it today to check.
Thanks for the link to the nvALT URL docs — that's perfect. Can I ask though — what's the reason for implementing the nv:// and nvalt:// schemes inside FSNotes? Is it so that FSNotes will be compatible with third-party extensions intended originally for nvALT?
Exactly that.
FSNotes would "just work" with the old nvALT Service, and whatever other tools that use those URLs users might have installed. It just helps anybody transitioning from one app to another. You can use RCDefaultApp to see what URLs are supported by apps that are accessible from your user account on your Mac.
OK, I've got a PR in for the extra route (looks like FSNotes://new/My%20New%20Note/Note%20body%20here.)
@gingerbeardman unfortunately you'll need to wait for @glushchenko to roll in this PR (assuming he likes it 😄).
I'll go and have a poke at the nvALT compatibility URLs now.
Guys, i will merge pull requests soon and include in build 1.5.
@glushchenko — apologies but I think my AppDelegate+URLRoutes.swift source file is in the filesystem but has not been included in the project. Could you do that for me? I can't really commit my version of the FSNotes.xcodeproj file as I have to change things such as the signing team, purely in order to compile it at my end but I wouldn't want to commit that up.
Thanks!
OK, nvALT compatibility URLs are in https://github.com/glushchenko/fsnotes/pull/168. Hope they work. It was fun... like poking yourself in the eye with a fork.
Anybody tested this?
Is there documentation yet of what URL scheme names are or are not supported? I still have nvalt installed so it captures those URLs, so can't use those. fsnotes://find/{term} only works to find the exact title, which is really not very useful IMO — nvalt://{term} will trigger the NVAlt search field with that term, and find partial matches which is much more useful; fsnotes://{term} doesn't work at all. I also tried fsnotes://make/?txt={term} but it doesn't work either, must I force both title and text? nvalt://make/?txt={term} does work fine for NVAlt.
Ah, OK, I found https://github.com/glushchenko/fsnotes/blob/master/FSNotes/AppDelegate%2BURLRoutes.swift — so it is fsnotes://new/. I would still like /find/ to be as powerful as NVAlt allowing partial searches, and if you didn't want to change the behaviour of /find/ then you could just add the blank scheme to do this? Should I open a new issue for this?
Sorry about this; I implemented find/title as that's how it was originally described earlier in this issue, but you're right, it's not how nvALT did it, nor actually very useful.
I've fixed it in a PR but once that's in I wouldn't mind some testing from people who actually use these URLs.
@jeff-h great thank you!!! I'm happy to test when it is in a build. I assume I can install the build from github over the mac app store one and configure it to use the same folders (so it syncs to the same folders the iOS version does)?
@glushchenko do you mind clarifying this, as I'm not sure. I see there's a separate build target for "FSNotes (iCloud Documents)". I assume that's the version you build for the MAS? If you've been using that, what happens if you try to use the non-MAS build?
@jeff-h Oh, I only just realised this got merged, thank you! So fsnotes://find/term is now working as expected. However I cannot get fsnotes://make/?title=term to work at all, fsnotes gets activated but nothing else happens. I've optionally tried to URI encode the ? and = but it makes no difference; has anyone else tested if it works?
Most helpful comment
Guys, i will merge pull requests soon and include in build 1.5.