[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/doc-toc 56218310ba 08/84: fix funcitons and update docs
From: |
ELPA Syncer |
Subject: |
[elpa] externals/doc-toc 56218310ba 08/84: fix funcitons and update docs for djvu |
Date: |
Mon, 26 Sep 2022 13:58:34 -0400 (EDT) |
branch: externals/doc-toc
commit 56218310ba75c4acb6982d6e98ca94643259aab7
Author: Daniel Nicolai <dalanicolai@gmail.com>
Commit: Daniel Nicolai <dalanicolai@gmail.com>
fix funcitons and update docs for djvu
---
README.org | 11 ++++++++---
toc-mode.el | 15 ++++++---------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/README.org b/README.org
index 13bd922066..b5c0065c39 100644
--- a/README.org
+++ b/README.org
@@ -11,6 +11,11 @@ TOC via OCR will probably be added soon. Until then, the
python
[[https://pypi.org/project/document-contents-extractor/][documents-contents-extractor]]
package is recommended for extraction of TOC via
OCR.
+For djvu documents, only outlines with maximum level deepness of 1 are
correctly
+parsed. For outlines with level deepness of 2 not all levels are set to correct
+level because the algorithm in the =toc-parse-djvused= function does not parse
+such file correctly yet (you are welcome to 'repair' the algorithm).
+
* Requirements
Currently the package requires the ~pdftotext~ (part of poppler-utils),
~pdfoutline~
(part of
[[https://launchpad.net/ubuntu/bionic/+package/fntsample][fntsample]]) and
~djvused~ (part of
[[http://djvu.sourceforge.net/][http://djvu.sourceforge.net/]]) command
@@ -79,13 +84,13 @@ The =TAB= key jumps to the pagenumber of the current line.
=S-up/S-donw= in the
tablist window will scroll page up/down in the document window while
=C-up/C-down=
will scroll smoothly in that window.
-Type =C-c C-c= when done
+For pdf type =C-c C-c= when done. For djvu type =M-x toc-tablist-to-djvused=.
** TOC-mode (add outline to document)
The text of this buffer should have the right structure for adding the contents
to (for pdf's a copy of) the original document. Final adjusments can be done
but
-should not be necessary. Just type =C-c C-c= for adding the contents to the
-document.
+should not be necessary. For pdf just type =C-c C-c= for adding the contents
to the
+document. For djvu type =M-x toc-add-to-djvu=.
For pdf the a file =pdfwithtoc.pdf= is created in the same folder as the
original
pdf. For djvu, the TOC is simply added to the original djvu file.
diff --git a/toc-mode.el b/toc-mode.el
index 979e3fef19..3dc2dba2a2 100644
--- a/toc-mode.el
+++ b/toc-mode.el
@@ -391,16 +391,13 @@ Use with the universal argument (C-u) omits cleanup to
get the unprocessed text.
"combine with add-toc-to-djvu in add-toc-to-document when ready"
(interactive)
(save-buffer)
- (shell-command (shell-quote-argument
+ (shell-command (shell-command-to-string
(format
- "djvused -s -e 'set-outline \"%s\"' %s"
- (buffer-name)
- (concat (file-name-sans-extension (buffer-name)) ".djvu")))))
- ;; (call-process "djvused" nil "*djvused*" nil
- ;; "-s"
- ;; "-e"
- ;; (format "'set-outline \"%s\"'" (buffer-file-name))
- ;; (concat (file-name-sans-extension (buffer-name)) ".djvu")))
+ "djvused -s -e \"set-outline '%s'\" %s"
+ (buffer-name)
+ (shell-quote-argument
+ (concat (file-name-sans-extension (buffer-name))
".djvu"))))))
+
;;;; PDF-Tools functions (PDF-tools does not yet produce best layout, e.g. try
pdf-extract-page-lines)
- [elpa] branch externals/doc-toc created (now b4bb748aa3), ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 7c4eef518e 02/84: initial upload, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc fdb66ff587 04/84: delete old file(name) document-outliner, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 4c98932c65 05/84: create first version README, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 32803571a6 06/84: delete README.md, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc bcf2348d28 03/84: rename file to toc-mode, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 34d16c6c06 07/84: implement pdf navigation from TOC-tabular-mode, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 56218310ba 08/84: fix funcitons and update docs for djvu,
ELPA Syncer <=
- [elpa] externals/doc-toc b869d9c888 14/84: Update README with tesseract ocr info, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc f7aacf7e77 25/84: Set encoding and cleanup linefeeds, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc d1cc2e950c 26/84: UPDATE README add extract screencast, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc b22f6f0a2d 28/84: add golden-ratio-mode to toc-tablist, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc caa066b67d 29/84: Add spell check and correct start pagenumber, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 81f58d0871 35/84: Fix double-dash function names, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 36b7f88d6a 39/84: Declare more functions (for MELPA), ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 7208f4a987 40/84: Add featurep checks for publish on MELPA, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 3c7efe78d2 61/84: Implement pdf.tocgen functionality, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc c86a72abda 12/84: Implement replace original or ad toc to copy of pdf, ELPA Syncer, 2022/09/26