4

I know how to add bookmarks into a DjVu file:

But how do I edit existing bookmarks? Do I need to re-insert a modified bookmark file? If so, is there a way to extract the bookmarks into a text file, edit the text file, and re-insert the bookmarks into the DjVu file?

Flux
  • 263
  • 1
  • 5

1 Answers1

3

Yes, you need to extract existing bookmarks to a file, edit it, and then set it back (old bookmarks will be overwriten):

# extract bookmarks
djvused -e "print-outline" my.djvu > bookmarks.txt

edit bookmarks.txt

set bookmarks back to document

djvused -s -e "set-outline bookmarks.txt" my.djvu

You may also find some GUI tools that will allow you to edit bookmarks, but basically they do the replacement under the hood.

truf
  • 141
  • 5
  • Is there a GUI tool you know of? Djvusmooth is obsolete, alas... – Maxim Aug 15 '23 at 06:10
  • never tried any of them. Perhaps Pdf & DjVu Bookmarker – truf Aug 15 '23 at 15:00
  • truf -- that's a Windows-only tool :( – Maxim Aug 16 '23 at 03:25
  • may be https://sourceforge.net/projects/handyoutlinerfo/ – truf Aug 16 '23 at 13:56
  • thank you for your comment! Even though the web page for the handyoutliner claims that their program is cross-platform, they only provide the Windows executable in their downloads! Very unfair... -- Thank you again! -- m. – Maxim Aug 17 '23 at 10:43
  • 1
    @Maxim, well it still does work, at least it could be lauched. Didn't checked it after GUI has been started. On a morden linux you need to istall a few packagessudo apt install mono-runtime libmono-system-windows-forms4.0-cil, then download and unpack app archieve, Then grant "start-linux" script execution rights with chmod +x ./start-linux. Then launch it with ./start-linux. The executable is a .NET code so it can be launched on Linux with mono in some cases. – truf Aug 19 '23 at 22:19
  • thank you so so much for taking your time and explaining everything in detail!

    I was able to run the HandyOutliner after installing libmono-system-windows-forms4.0-cil, as you suggested.

    I got an error with the first DjVu file I tried the program with: it already has a partial outline I created previously with DjvuSmooth which uses UTF-8 (this particular outline needs Cyrillic characters); the Handy outliner produced an error stating that it would only take the (legacy) Windows 1251 encoding for the Cyrillic. So I gave up... Might try it on another file where the outline will be

    – Maxim Aug 25 '23 at 12:16
  • (continuation) where the outline will be in English; but I regularly use three languages for creating outlines; and forcing WIndows encoding in 2023 seems strange...) (It did not even agree to open the file to erase the current TOC and create a new one!)

    Otherwise, did I understand correctly that you are the author of the legendary Scantailor? If so, may I drop you a line?

    Thank you again!

    – Maxim Aug 25 '23 at 12:18
  • 1
    @Maxim Legendary scantailor's author is Joseph Artsimovich. I'm just maintaining one of its forks (Universal), and not the most popular (Advanced) one. You may drop me a line, but I barely have a time to do anything related to djvu nowadays. Also you may better to ask about GUI tools here or here. I'm pretty sure these guys know all existing djvu tools. – truf Aug 25 '23 at 19:33