scrod/nv

A dialog for switching between note databases

quackingduck opened this issue · 58 comments

It would also be great if multiple databases could be open at the same time.

What is the exact use-case for which you'd like to see this feature implemented? The reasoning behind Notational Velocity's present lack of multi-database support is that storing notes in separate databases would 1) require the same kinds of decisions that category/folder-based organizers force upon their users (e.g., "Is this note going to be work-specific or home-specific?"), and 2) defeat the point of instantaneous searching by requiring, ultimately, the user to repeat each search for every database in use.

The idea behind NV's search-by-default functionality is that your notes can be self-organizing; for any about-to-be-entered title you will see a list of (mostly) related items that can inform the final destination of your note. Unrelated entries do not appear, because your search will not reveal them.

For others reading this: if you are currently locating your notes by scrolling through the full unfiltered list, then I suggest waiting until you've accumulated at least 200-500 notes (my DB has 1500).

bak commented

I'd like to see this for one specific use case. For most of my notes, I like them as unencrypted separate files so that I can sync them to simplenote/dropbox and have my notes everywhere. At the same time, I would like to be able to keep a secure, encrypted notebook separate from these. For this notebook, the security concerns outweigh the convenience factor of mobile access.

I would second this request for a specific use case, in this case, project specific (an annotated list of reference books, for which it works really well, and in which case the "self-organizing" search doesn't apply). I would love to be able to use it for general notes (esp. now that it syncs with SimpleNote), but I really need to keep my projects separate. While I understand the NV philosophy, it seems to me that it would have more utility for more people with greater customization.

@whshep: I think your usecase could also be addressed by a better tagging support (if there was a way to only show notes containing a certain tag). I myself would prefer this possibility over multiple databases. What if i want to access general notes (like code snippets) and project specific notes at the same time?

@bak: for your purpose I would find individual encryption of notes more interesting. Although that would not disguise the notes title ;)

I also second this idea of multiple stores.

Specifically the use case I see is using Dropbox with sharing, I would like to have my notes and those that are shared with others. I have a set of notes for use with XYZ person/project/company, a set of notes to use with ABC person/project/company, etc. on top of my personal notes which I may want encrypted.

I realize your vision for NV with search may interfere with this a bit, but I do think that if NV were to be document-based you could easily toggle documents and then search, still using the keyboard.

I came her to ask the same question, as I also would like one separate database for more 'sensitive' notes that I would like to see encrypted, and stored in another location on my computer.

As a follow-up to scrod's post: I totally agree with your arguments with regards to the time you're using NV to take notes. But things seem different, when you're working in organizational mode or when you try to focus on some topic scattered in various notes all other the place. When you try to gather all those pieces and merge them, as little distraction as possible is very welcome.

How about that? Add a second search field that is not erased as soon as you hit Esc or type "Cmd-L, $STRING". This way one could easily create temporary filters.

I know this comment does not relate to the use cases issued by the last posters - but it relates to the title.

UPDATE: After another week of NV usage I understand that this request is related to both request #36 and the suggested solution. I'll see what I can get out of this bookmarks-with-filters feature...

@axelGschaider and @scrod: I think I've made it clear that I don't want to search across separate databases, but want separate databases for separate projects. Tagging is fine, but for my purposes, adding a tag to every entry would be one extra belaborous step I don't need.

I think it's interesting that every time I request this feature, I'm told that I don't need it. I guess that's why I've stopped using NV; it doesn't do what I want, so I just don't need it.

sorry dude. wasn't my intention to tell you, what you don't need but to provide a possible workaround . . .

Hi, Mostly my notes are best stored as plain text files (that way I can edit them in VIM or whatever). However, like hilko I'd like to keep some data private (passwords, bank details, etc), so I'd like to have the option to keep (one or more) encrypted files in addition to a plethora of plain text files. Currently I use a separate program for sensitive data and NV for everything else. A one stop solution would be great. Searching would be across all files, encrypted and unencrypted. Thanks for all your hard work to date.

I understand all the disagreements with this request... BUT if someone still wants a REAL WAY to accomplish this, why not try "rooSwitch.app"???

It lets you setup multiple "preference sets" (including completely separate application data sets) and provides an easy way to switch between between them. Example: I use it to switch my preferences for various nework applications, based on where I'm physically located, because I travel with my notebook. In one location, certain apps are set to use UPnP, and at home or the office, they're set to use specific port forwarded settings).

Obligatory linkage: http://rooswitch.com/

Long story short, rooSwitch (on the Mac) could easily provide this feature request.

WARNING: it's not a free application, so don't get all pissy with me when you realize that. I purchase applications all the time, and donate to opensource projects I love. Try it out (there's a demo period of 32 "switches"). If it does what you need, and lets you continue to use Notational Velocity, then it might be worth the money.

I bought it for something entirely different, but I'm thinking about using it to setup an encrypted NV instance that doesn't get synced.... for storing semi-sensitive information.

Enjoy!!!

hi i also wanted to put in my vote for Mooie and bak's request. the simplicity of NV is fantastic and convenient and for most notes a password is not necessary but then i have notes with sensitive data that i would like to require a password to see anything other than the title.

i suppose the multiple notebook/database idea would work but i would have to agree with axelGschaider that encrypting individual notes is a better solution and more in keeping with the NV philosophy. i also realize i could just encrypt everything but if i want a really hardcore string it is too tedious to be useful.

how but just allowing the user to set up a password protect shortcut in the security preferences. when typing a note you press it and then after a confirm the note requires the pass for future reads.

bak commented

@bbshrmn @axelGschaider I'm not sure what the individual encryption of notes would accomplish. A note has to be in plaintext before it can be searched, and that's what NV is all about. So on opening the database, you would have to decrypt all the notes that are encrypted. May as well encrypt the entire thing at that point--multiple databases are still the solution to this particular problem.

@bak in my case the majority of my notes and the things that i use the most are not sensitive and i dont mind typing my password in very quickly to take a look at something because it doesnt happen too frequently. the whole point of my idea is that i dont require the ability to search the contents of these sensitive notes and searching just the title will suffice. i.e 'bank account numbers', 'server password', etc etc.

if you are in a different boat then really we are talking about 2 separate issues and the solution would be to have both if you just want a separate password protected index in which you require access to all the notes and not just a particular one at any given time.
are your titles distinct and limited enough or do you actually need to search the contents?

bak commented

@bbshrmn To me, full-text search is a must in an "outboard brain" system, and I sincerely hope NV doesn't take that direction. I suppose it could search full-text of nonencrypted notes and just the titles of encrypted ones, but that's just starting to smell complex. I'd like the ability to treat notebooks as "documents." If I can have a Notational File on disk called "School" and one called "Financial," and have the latter be password-protected, I see that being a better solution.

like i said, in this case i think one is not a "solution" to the other. they are separate issues with unique solutions. we arent really dealing with a "better" type scenario. both ideas could be implemented seperately as they are not mutually exclusive in use and in contrary could be used simultaneously quite well. my suggestion appears complex to you but your suggestion adds complexity to my needs as i would have to change notebooks and start categorizing my data holders...which i dont want to do, but i can see perfectly how you or someone else might.

For the record though. you can actually do this pretty easily already if you would like to. a simple way is...do you use launchbar or quicksilver or something you can easily attach a shortcut to a script with? if not just make the scripts below a service and assign them to a shortcut in the mac OS keyboard preferences.

if you create a password protected notebook and then open it it will ask for the password, in stead click the use different notebook option and create an unprotected one then if your in that one and want to switch back go to preferences and reassign to the password protected one. this is tedious, but if you just record the two separate actions as two different scripts (remember to include a quit NV action) and assign a shortcut to each it actually goes very fast.

im sure you understand or have a better way to do it, but if you dont ask.

bak commented

@bbshrmn Interesting idea and I may give it a shot. I'm trialing rooSwitch right now and it is working fantastically for this purpose, and looks like it will be very handy for some other applications as well.

@bak rooSwitch looks good how is it working out.

bak commented

@bbshrmn Great so far. The interface for scripting is a bit cumbersome, and I wish it were a menuitem and not a docked app, but it's scriptable via AS so I'm going that route.

bak commented

@bbshrmn that should read "The interface for switching is..."

Hi all,
I just filed this and then was told it was a dupe of this. i want to second (or 37th) the desire for an easy way to switch databases or have multiple open. Here is my use case:

I use notational for everything, however i'm just starting to write my masters thesis. It would make sense for me to plug in everything i intend to include in my thesis to NV, however when it comes time to write I don't want it to be included in my search for everything.

I suggest the option of a quick switch between databases, or to make the settings independent so multiple instances of NV could be spawned with different preferences.

I'm in the same boat as @rogermugs, more or less:

I want to use NV as a general note taking tool, but I also want to use it for research and early-draft writing, and I really don't want those two things mixed together. Ideally, however, I want them both available at the same time. So for me, the ideal interaction would be two distinct hot-key combinations, one for each database.

Since I suspect this use case is to specialized to become part of NV proper, I wonder how hard it would be for me to create a second "version" of the app that ran independently, with independent prefs? How does OS X keep track of the identity of apps? Is it just a matter of tweaking a plist somewhere, or changing a few strings and then compiling in Xcode?

bak commented

@rogermugs & @dsanson -- I'm very satisfied with rooSwitch (http://rooswitch.com/, $19) for this purpose. I have several profiles set up, each with a different NV database location. This solves my problem (see above in this thread) of needing both an encrypted and an unencrypted database.

I use an AppleScript (http://gist.github.com/487061) and FastScripts (http://www.red-sweater.com/fastscripts/) to switch between the profiles with a hotkey, but you can also switch from the rooSwitch panel directly.

@bak - 19 dollars to use a fantastic free open source program? i think i have theological problems with this.

bak commented

Suppose it depends on your definition of "use." NV works great as designed and is wonderful open source notation software.

Software to manage multiple instances of a single application, however, is a different task from notation. It's actually more akin to application management---something handled by our operating system---and no one in this forum can claim that they are using an open source OS.

So I guess I'm saying, if you're here, you likely already spent more than $19 to use this fantastic free open source program.

yea, but clicking Notational Velocity -> Recent Databases -> School
or
Notational Velocity -> Recent Databases -> Life

is also doable.
thats why this is a request. if its not doable, its not doable. if scrod decides it doesnt fit NV it wont keep me from using it, but I'll probably not pony up 19 beanos either.

not a fan.

@bak: rooSwitch looks nice, but it doesn't do quite what I want (and, as I already admitted, I suspect that what I want would not be in line with the goals of NV).

rooSwitch doesn't allow me to have both databases available at the same time but separately: e.g., opt-space pops open NV with one set of notes and ctrl-space opens NV with the other set of notes. Hence my interest in figuring out how to have two versions of NV running at the same time, using different databases.

Obviously this can be done. I assume it is just a matter of playing around with the source code enough to get a version of Notational Velocity that looks to the system like a completely separate app and stores all of its data in a completely separate location.

I've played a bit with this. First, I edited the info.plist: changing the Executable Name to "Slipstream" and the Bundle Identifier in the info.plist to "net.notational.slipstream". Then I edited InfoPlist.strings, changing the CFBundleName to "Slipstream". After compiling, the resulting app is still named "Notational Velocity.app", so renamed the app "Slipstream.app" and renamed Contents/MacOS/Notational Velocity to Contents/MacOS/Slipstream. The resulting app still wants to save its notes in "Application Support/Notational Data", so I changed that in the preferences to "Application Support/Slipstream".

I think the result is that I have a "new" app, called Slipstream, that can run side by side with Notational Velocity. Obviously I can't sync both to Simplenote without causing trouble. And I haven't used the two apps enough to know whether or not there are shared files (e.g., preference files) that will give rise to problems, and that makes me nervous!

Actually, I don't think this requires playing with the source and compiling. You can just (1) copy Notational Velocity.app and rename the new app to something else, e.g., Slipstream.app; (2) Edit the Executable name and Bundle identifer in Slipstream.app/Contents/Info.plist; (3) rename Contents/MacOS/Notational Velocity to Contents/MacOS/Slipstream.

Obviously anyone trying to do this should make a backup of their notes and settings first, in case the new app corrupts or overwrites the old notes.

bak commented

Well, my time is money---all of ours is---which is why:

  1. I'll take a solution that works now over begging in a forum for someone to create a free one.
  2. I'm willing to pay for that solution if I can't do it myself in that dollar-amounts worth of time, and
  3. this is my final input---I've solved my problem after all---I just want to offer a few thoughts.

To me, the rooSwitch solution is very Unix-like---small, good apps chained together to accomplish your task. That appeals to me, and I now actually have several apps interacting with rooSwitch, not just NV.

@dsanson -- try the trial out, you may be surprised. The net result for me is that I hit one shortcut and get one set of notes, then hit another and get that set of notes. It is truly as fast as that. They are stored in different places on the machine, too.

As for the "Slipstream" idea, what happens when @scrod releases a new build of NV? Do you have to dive into the bundle and make all of those changes again? Did you make them to source and build yourself? Do your changes boil down to a single Git patch that you can apply to the HEAD of NV's source? Will that patch always apply, no matter what @scrod does?

For me, those are pain-in-the-ass questions. And no matter what the answer is, its more than $19 worth of time.

My 2c.

@bak thanks for the rooSwitch feedback. do you happen to know if it it syncs with iphone/iPad?

bak commented

@bbshrmn I assume you're asking how it affects Simplenote sync? Can't think of a way that rooSwitch could interface with iOS.

RS gives you completely distinct profiles, with separate preferences, so each NV profile could sync with a different Simplenote account. Does Simplenote support mulitple accounts? Did I understand your question?

@bak: I'm with you on the value of $19, I'm with you on the value of rooSwitch, and I've tried the demo. And I share all your worries about pain-in-the-ass questions and wasting time.

The value of Notational Velocity, for me, has a lot to do with its "always there" feature: I hit a command key and up pops the window. I couldn't figure out how to do this with rooSwitch. It looked like I'd need to open rooSwitch and click on one of the profiles, and then NV would have to shut down so it could switch to a new profile. That's a nice trick, but it is significant friction. But maybe I'm missing something.

I want my "external memory" always available, but I also want my "super-smooth place to draft research papers without distraction and without having to worry about saving" always available.

Notational Velocity is great for its intended purpose. It is also very close to being a lightweight piece of writing software that combines some of the best features of Writeroom and Scrivener. In a perfect world, someone would fork NV and produce just such a piece of software.

bak commented

@dsanson I'm telling you, that's exactly what I have going on. Grab FastScripts (free and wonderful software), rooSwitch, and the AppleScript that I Gisted above. Make a script for each NV profile, use FastScripts to assign them to a keystroke, and you're there. The script automatically tells RS to open, switch NV, and quit, all in background instantaneously. Takes 5 minutes to set up.

@bak: My apologies. Somehow I missed the bit about using Fastscripts and Applescript. I'm an idiot!

@rogermugs: give my hack a try. It won't cost you anything but a bit of time, and it seems to work.

@bak yeah im wondering if you have multiple NV profiles via rooSwitch and sync with simplenote, can you sync the profiles separately or one of them not at all?

bak commented

@bbshrmn Yes I have two NV profiles via rooSwitch--one of them syncs with Simplenote, the other does not. I could have each sync to a different Simplenote account if I wanted to for some reason.

@bbshrmm: as @bak says, you can sync each profile separately to a distinct Simplenote account. Of course, the Simplenote client on the iphone can only be tied to one of these accounts. But you could try using something like tominsam/simplenote-html#1 to access one of the accounts.

great
@danson good point, thx

so i just got rooSwtch and created a "new empty profile" but its not new at all. its a duplicate and further, if i change a setting like requiring a password, it affects both profiles not just the one im in. what am i doing wrong?

bak commented

I just installed it on a different computer that has never had it before. Opened, dropped NV on it, it automatically created the "default" profile. I hit "+" and it created the "Untitled" profile. When switch to that new profile it works as expected, with a completely separate set of notes and prefs. No idea what could be wrong in your case.

@dsanson - I'll definitely give your hack a try... i figured some change in the .info was prolly the trick in my renamed dupe but your specific instructions definitely help

@bak I agree - I'll take a solution that works now over begging in a forum for someone to create a free one. - and @dsanson's seems much more liveable to me than what rooswitch is offering.... i appreciate the suggestion tho...

@bak, got it working but the script now returns an error
""rooSwitch got an error: Can’t get document "Notational Velocity.rooSwitch"." number -1728 from document "Notational Velocity.rooSwitch"

i keep rooswitch in a subfolder of applications, does this matter? i dont see why it would since the file its looking for "notational Velocity.rooswitch" is located in application support/ rooswitch

any ideas

+1 - I think the use case for a 2nd secure NV database makes a lot of sense - I'd love to have that feature

the script to open a particular profile stopped working again, but i got it to work. in my case the script wouldnt work unless the file was already open. i just had to add a line to open the file first. im posting the code below for anyone else who stumbles on this thread with the same problem.
just change the path of the POSIX file to be whatever yours happens to be.

[code]
#!/usr/bin/osascript
-- This script uses rooSwitch to switch Notational Velocity to the "encrypted" profile.

tell application "rooSwitch"
open POSIX file "/Users/X/Library/Application Support/rooSwitch/Notational Velocity.rooSwitch"
tell document "Notational Velocity.rooSwitch" to tell profile "encrypted" to make active with allow quit
end tell
tell application "Notational Velocity" to activate
tell application "rooSwitch" to quit
[/code]

nthing the issue.

For me the use case is that I think of NV as a great UI for a repository of text files, sort of a wiki. For some projects I'd like a seperate repository because I plan to process these notes automagically with other tools. A great gigantic note db just categorized by name or tag is not so great for this.

I would like this feature as well, my use case is for project related notes. I am currently building together notes for a report, I am expected that the database I am using to end up having 100s if not 1000+ notes.

But I would still like the ability to use my notational separately and not interfere with these notes for my report as they are specific to the report only. But saying that some way to either easily share notes, search or link notes between databases would be handy as well.

I'd also wish there was way to create several separate "notebooks" and use them in parallel in NV in different windows.

My use case (as some others already have described):
I want to have one big database for collecting all ideas and notes
AND I want to have some smaller collections of notes which only concern one single project and therefore shall not be mixed with the rest.

This would be very helpful, but I fear there is no way to achieve that up to now?!

I currently solve this issue by using nvAlt and NV together, so separate apps with separate db's. But I'd also like an in-application solution...

@hilko: thanks, good workaround - as long as 2 databases are enough. :-) (but that's much better than nothing, thank you!)

Another vote. Use case:

work computer. I have work notes and personal notes. Personal notes are synched to simple note. Work notes are proprietary and cannot leave my work machine.

Another vote. It's not that NV needs folders or multiple databases; tagging, search and naming conventions (e.g., "recipe-") are powerful enough on the desktop.

The problem is that the iOS apps on the other end (I'm using WriteRoom) don't have the same power. To get easy access to specific projects (e.g., recipes) among my 1K+ notes on my iPad, I have to use folders. But that breaks the synch with NV. :(

banj commented

It would be nice if my NV directory could have subfolders containing notes and have those notes appear in NV as normal. I'm getting up toward 6700 notes now and I suspect soonish it's going to start slowing down my system... I'd like to archive my notes by year to cut down the size of the one directory...

I would also assume that note directories of that size will eventually make storing them as individual files (in a single directory) an unreasonable option. That's one of the reasons why I chose (a long time ago) to encrypt and store as a single file.

I don't know what the solution is, but I have thousands of notes in just one of my databases. That's why I chose a single encrypted file as the storage option a long time ago. However I do back it up as individual files periodically, using the export feature, which is later stored in an encrypted sparse bundle–– but that's another story.

I honestly don't know what I'd do without NV (Notational Velocity). Cheers, Zachary, for your never-ending gift to the open source world! I'd buy you a beer (or donate) if I could.

Edit: theoretically the max number of files per folder for OS X is WAY WAY WAY higher than 5-10k, but I don't know what it does to performance. In particularly, I'd be concerned with indexing and filesystem monitoring, a la mdworker… so maybe turn off indexing of that directory? (Unless you really like Spotlight knowing about all your notes, which I personally don't)

Note: this is off-topic for this Issue.

I'd like to see this feature because I prefer to keep files related to work and files related to home completely separate. I currently accomplish this by running one instance of NV and one instance of nvALT. Each stores its data (I store mine as text file) in a separate directory on Dropbox (basically, /home/nvDATA/ and /work/nvDATA). It's not a terrible solution, as when I'm at work, I only occasionally need a "home" file and vice versa.

It would be nice to stick with one instance and have a way to switch between data stores w/o having to go to the preferences.

+1 for home/work separation. In my case, personal db can go through dropbox. The work notes either stay on the MBP or get shared via some corporate approved solution.

I don't mind something hacky, like using Quicksilver and a bash script... Hmm, maybe it a symbolic link from the nvALT configured db... script quits nvALT, replaces the link for the database and starts nvALT back up.

+1 for this feature. I am trying to figure out how to share my nvalt notes as either Google Drive or Dropbox shared notes attached to tickets (Trello/Github etc) for our team to use in product development without giving access to literally all of my notes.

A quick toggle between one work/personal NVAlt would bring peace of mind.

This is the issues page for NV. If you're interested in features specifically for NVAlt, please consult that repository.