一千萬個為什麽

搜索

如何將djvu文件轉換為某些文件?並使用djvused命令



當我使用這個命令時:

djvused aaa.djvu -e'select 10;保存頁面與b.djvu'

輸出是:

D:\Program Files\DjVuLibre>djvused  aaa.djvu -e 'select 10; save-page-with b.djvu'
Simple DjVu file manipulation program

Usage: djvused [options] djvufile
Executes scripting commands on djvufile.
Script command come either from a script file (option -f),
from the command line (option -e), or from stdin (default).

Options are
  -v               -- verbose
  -f <scriptfile>  -- take commands from a file
  -e <script>      -- take commands from the command line
  -s               -- save after execution
  -u               -- produces utf8 instead of escaping non ascii chars
  -n               -- do not save anything


Commands
--------
The following commands can be separated by newlines or semicolons.
Comment lines start with '#'.  Commands usually operate on pages and files
specified by the "select" command.  All pages and files are initially selected.
A single page must be selected before executing commands marked with a period.
Commands marked with an underline do not use the selection

   ls                     -- list all pages/files
   n                      -- list pages count
   dump                   -- shows IFF structure
   size                   -- prints page width and height in html friendly way
   select                 -- selects the entire document
   select             -- selects a single page/file by name or page number
   select-shared-ant      -- selects the shared annotations file
   create-shared-ant      -- creates and select the shared annotations file
   showsel                -- displays currently selected pages/files
 . print-ant              -- prints annotations
 . print-merged-ant       -- prints annotations including the shared annotations
 . print-meta             -- prints file metadatas (a subset of the annotations
   print-txt              -- prints hidden text using a lisp syntax
   print-pure-txt         -- print hidden text without coordinates
 _ print-outline          -- print outline (bookmarks)
 . print-xmp              -- print xmp annotations
   output-ant             -- dumps ant as a valid cmdfile
   output-txt             -- dumps text as a valid cmdfile
   output-all             -- dumps ant and text as a valid cmdfile
 . set-ant []    -- copies  into the annotation chunk
 . set-meta [<metafile>]  -- copies <metafile> into the metadata annotation tag
 . set-txt []    -- copies  into the hidden text chunk
 . set-xmp []    -- copies  into the xmp metadata annotation tag
 _ set-outline [] -- sets outline (bootmarks)
 _ set-thumbnails []  -- generates all thumbnails with given size
   remove-ant             -- removes annotations
   remove-meta            -- removes metadatas without changing other annotations
   remove-txt             -- removes hidden text
 _ remove-outline         -- removes outline (bookmarks)
 . remove-xmp             -- removes xmp metadata from annotation chunk
 _ remove-thumbnails      -- removes all thumbnails
 . set-page-title <title> -- sets an alternate page title
 . save-page        -- saves selected page/file as is
 . save-page-with   -- saves selected page/file, inserting all included files
 _ save-bundled     -- saves as bundled document under fname
 _ save-indirect    -- saves as indirect document under fname
 _ save                   -- saves in-place
 _ help                   -- prints this message

Interactive example:
--------------------
  Type
    % djvused -v file.djvu
  and play with the commands above

Command line example:
---------------------
  Save all text and annotation chunks as a djvused script with
    % djvused file.djvu -e output-all > file.dsed
  Then edit the script with any text editor.
  Finally restore the modified text and annotation chunks with
    % djvused file.djvu -f file.dsed -s
  You may use option -v to see more messages


D:\Program Files\DjVuLibre>

如何解決這個問題?

轉載註明原文: 如何將djvu文件轉換為某些文件?並使用djvused命令

一共有 1 個回答:

此問題的更簡單的解決方案是用雙引號更改單引號。在DOS/Windows命令提示符下具有與普通Linux shell不同的功能。

djvused  aaa.djvu -e "select 10; save-page-with b.djvu"

您可以通過執行以下操作輕松測試單引號和雙引號的不同工作方式:

python -c "import sys; print sys.argv[1:]" "abc def" 'uvw xyz'

它為您提供 3 元素列表:

['abc def', "'uvw", "xyz'"]