nb icon indicating copy to clipboard operation
nb copied to clipboard

bulk operations

Open kiil opened this issue 1 year ago • 5 comments

Hi —

I hope I haven't missed anything, but as far as I can tell, there is no way to do bulk operations.

Fx, if I would like to open 2 notes in vim (in 2 buffers) there is currenty not a way to do this:

nb edit 2 5

to open both the note with id 2 and the note with id 5 in the editor.

Is there any chance for such a feature to become part of nb?

kiil avatar Aug 18 '22 09:08 kiil

Multiple selectors can be passed to delete, and globbing is supported in import. I hadn't considered supporting multiple selectors with edit. For simple edit calls, the resolved paths could theoretically be passed through to the command that invokes the editor. Other cases would require more logic, such as editing encrypted items.

xwmx avatar Aug 18 '22 17:08 xwmx

Other cases would require more logic, such as editing encrypted items.

True. I had not thought about that complication.

kiil avatar Aug 18 '22 21:08 kiil

I'm trying to move all files of one extension to a different notebook, but every time nb just gives me the option to move the first file it finds. How do I move all of one file type to a different journal all at once?

dixonge avatar Sep 08 '22 10:09 dixonge

FYI - moving files between folders (notebooks) using normal shell commands somehow gets caught by nb automatically. nb knows to remove these files from the original notebook and add them to the other. nb list shows the files now gone from the first notebook and fully indexed in the second. So that will work...

dixonge avatar Sep 08 '22 10:09 dixonge

@dixonge Indeed, nb performs an index reconciliation whenever there are uncommitted changes or when ls / list encounters a file that's not in the directory's .index.

xwmx avatar Sep 13 '22 18:09 xwmx