sn-cli icon indicating copy to clipboard operation
sn-cli copied to clipboard

Add directories of Notes

Open clayrosenthal opened this issue 1 year ago • 2 comments

I want to be able to add a directory of notes recursively (or at least optionally recursively), to help import from other sources into standard notes. I am happy to write this code (and have already started a bit), but am curious if you'd prefer it be a flag of the current add note or have it be its own sub command, ie: add dir. I was also planning on having the ability to (optionally) tag these notes based on their directory name, and/or tag them based on a tag passed by flag.

Let me know your thoughts, or if you think this would be a bad idea.

clayrosenthal avatar Dec 13 '23 20:12 clayrosenthal

Hi @clayrosenthal, I pretty much did this with a different app I was working on: https://github.com/jonhadfield/sn-dotfiles.
The idea with that is to take all of the dirs starting with . in your home directory and then create the folder structure (using tags) and files (as notes). You'd then sync to update files/tags based on which was last updated.
I've not looked at it for some time, but may resurrect it when I get time.

What about doing something similar to sn-dotfiles and adding an embed or sync argument that takes a filesystem path and recreates it in a similar fashion?

jonhadfield avatar Dec 14 '23 15:12 jonhadfield

Oh nice. I'll look into that and maybe make it more generic file/directory syncing with a dotfile sub command. Thanks for the pointer

clayrosenthal avatar Dec 15 '23 03:12 clayrosenthal