View Single Post
Old 03-10-2024, 08:52 AM   #19
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I decided to do these as Action Chains actions because that is easier to use. Not easier to write, unfortunately, but that is neither here not there.

The attached zip contains two actions, Export notes and Import notes. Export notes asks you for the folder where it is to put the notes, then the field name (such as "authors") where it is to get the notes to export. It writes all the notes for that field into the folder with the file name
Code:
field_lookup_name#@#escaped_item_value#@#item_value_in_hex
Import note asks you to select the note files you wish to import, then does it. It gets the field lookup name from the filename.

I've tested them but that doesn't mean they will work for you. Please make a backup of your library before trying them. If something doesn't work, let me know. I'm not particularly interested in messing with the user interface or otherwise making it "cosmetically better".

Also, you will see that the HTML files include <head> ... </head> tags. Don't put anything in the head element because it is stripped away when the note is imported. If you want to style the note, do it with inline styles, in the head of the enclosing HTML document, or with <style> elements in the body. I haven't tried the last one but the 'net says it works in HTML5 browsers. Some say the browser might render the page twice, once without the styles and once with.
Attached Files
File Type: zip Export and import notes actions.zip (1.5 KB, 97 views)

Last edited by chaley; 03-10-2024 at 10:19 AM.
chaley is offline   Reply With Quote