BIBLIOGRAPHY

History

[2025-04-05 Sat 16:48] Converting epub to HTML with unbook and SingleFile

unbook : Reading on the web-browser with

[2023-10-25 Wed 11:54]

다음 가봐라. Alice’s Adventures in Wonderland - unbook.ludios.org 깔끔하지?! epub 을 깔끔하게 변환하여 HTML 파일로 만든다.

설치 방법은 빌드해야 한다.

Linux:
    Install a recent version of Calibre using your package manager.
    Install a stable Rust compiler using rustup.
    cargo install --locked --git https://github.com/ludios/unbook

사용법. 퀄리티는 완벽하다.

unbook --max-width 6in --inside-bgcolor white a.epub -o a.html

이 다음에 번역기를 사용하면 책을 한 번에 번역할 수 있다.

 
 --outside-bgcolor <OUTSIDE_BGCOLOR>
          Background color (any CSS color) to use on the outside margin of the book, i.e. the <html> where there is no text. Use "unset" for no color
          [default: #888]
 --inside-bgcolor <INSIDE_BGCOLOR>
          Background color (any CSS color) to use for the text of the book, i.e. the <body>. Use "unset" for no color
          [default: #e9e9e9]
Usage
 
Write .html file to the same directory:
 
$ unbook PATH_TO_EBOOK
 
Write HTML to some path:
 
$ unbook PATH_TO_EBOOK -o out.html
 
Replace output HTML if it already exists:
 
$ unbook -f PATH_TO_EBOOK
 
Replace typefaces even when there is more than one distinct font stack:
 
$ unbook --replace-serif-and-sans-serif always PATH_TO_EBOOK
 
Don't set any background colors:
 
$ unbook --outside-bgcolor unset --inside-bgcolor unset PATH_TO_EBOOK
 
Use a wider body width:
 
$ unbook --max-width 6in PATH_TO_EBOOK
 
Show all options:
 
unbook --help
 
click to see --help
 
Convert many files and overwrite existing conversions:

https://unbook.ludios.org/

unbook is a command-line program for converting a DRM-free .epub, .mobi, .azw, .azw3, .lit, or .chm ebook to a self-contained HTML file. FDP is not supported. In the HTML output, all images are included inline as data: URIs, inspired by SingleFile. unbook adds some CSS to render things nicely on both large screens and mobile. You can open unbook’s output HTML in any browser (JavaScript is not required); you’ll experience normal scrolling behavior and you can use whatever browser extensions and bookmarklets you like.

unbook 은 DRM 이 없는 .epub, .mobi, .azw, .azw3, .lit 또는 .chm 전자책을 독립된 HTML 파일로 변환하는 명령줄 프로그램입니다. PDF 는 지원되지 않습니다. HTML 출력에서는 모든 이미지가 인라인으로 데이터로 포함됩니다: 싱글파일에서 영감을 얻은 URI 입니다. unbook 은 대형 화면과 모바일 모두에서 보기 좋게 렌더링하기 위해 몇 가지 CSS 를 추가합니다. 언북의 출력 HTML 은 모든 브라우저에서 열 수 있으며(자바스크립트 필요 없음), 정상적인 스크롤 동작을 경험할 수 있고 원하는 브라우저 확장 프로그램과 북마클릿을 사용할 수 있습니다.

Read entire books in your browser because you like it or because it provides functionality not available in e-readers or ebook software e.g. bookmarklets, extensions like 10ten Japanese Reader Skim or search many ebooks using your browser Share a book with someone who has a browser but no e-reader or ebook software Link someone to a passage in a book using your browser’s “Copy link to highlight” feature Text-index books with software that supports HTML but not ebook formats

마음에 들거나 전자책 리더나 전자책 소프트웨어에서 사용할 수 없는 기능(예: 북마클릿, 10 텐 일본어 리더와 같은 확장 프로그램)을 제공하기 때문에 브라우저에서 전체 책 읽기 브라우저를 사용하여 많은 전자책을 훑어보거나 검색하기 브라우저는 있지만 전자책 리더나 전자책 소프트웨어가 없는 사람과 책 공유하기 브라우저의 ‘강조 표시 링크 복사’ 기능을 사용하여 책의 한 구절로 다른 사람을 연결하기 전자책 형식이 아닌 HTML 을 지원하는 소프트웨어로 책의 텍스트 색인 생성하기

SingleFile : Web Extension

[2023-10-25 Wed 11:54]

브라우저 활용

Web Extension and CLI tool for saving a faithful copy of a complete web page in a single HTML file

https://github.com/gildas-lormeau/SingleFile

DONT 2023-12-11 marker

git clone https://github.com/VikParuchuri/marker.git
  • tesseract 는 우분투 패키지 5 버전 이용.
  • Install system requirements
    • Install ghostscript > 9.55 by following these instructions or running scripts/install/ghostscript_install.sh.
    • Install other requirements with cat scripts/install/apt-requirements.txt | xargs sudo apt-get install -y

 
bash scripts/install/ghostscript_install.sh
 
scripts/install/apt-requirements.txt | xargs sudo apt-get install -y
 
poetry install
 
# pip install torch 보다 우분투 패키지 이용
sudo apt-get install python3-torch
 
# shell실행
poetry shell
 
# pdf epub mobi 커버
 
# python convert_single.py /path/to/file.pdf /path/to/output.md --parallel_factor 2
# DEFAULT_LANG
# --max_pages 10
 
# 한번 잘 안되던 책을 뽑아내보자.
 
python convert_single.py ~/Documents/pdf/Web_Development_with_Clojure.pdf ~/Documents/pdf/Web_Development_with_Clojure.md --parallel_factor 2
 

convert_single : pdf/epub/mobi

[2023-12-11 Mon 10:23]

결과는?!

python convert_single.py ~/Documents/pdf/Web_Development_with_Clojure.pdf ~/Documents/pdf/Web_Development_with_Clojure.md --parallel_factor 2

완벽한 방법 놀랄만큼 epub

[2023-09-08 Fri 13:24] 파일 다운 받는다. epub 으로 받으라.

그리고 판독으로 아래와 같이 하면 된다. org 모드에 이미지 링크까지 들어간다.

docx 를 만들 때 epub 에서 바로 만들지 않는다. org 로 가서 검토 하고 바꾸는게 퀄리티가 더 좋다.

 $ pandoc WTW.epub -o WTW.org
 $ pandoc WTW.epub --extract-media=./
 .
└── Images
    ├── 00001.jpg
    ├── 00002.jpg
    ├── 00003.jpg
    ├── 00004.jpg
    ├── 00005.jpg
    ├── 00006.jpg
    ├── 00007.jpg
    ├── 00008.jpg
    ├── 00009.jpg
    ├── 00010.jpg
    ├── 00011.jpg
    ├── 00012.jpg
 
 $ pandoc kellyWhatTechnologyWants2010-en.org -o kellyWhatTechnologyWants2010-en.docx
 $ pandoc kellyWhatTechnologyWants2010-ko.docx -o kellyWhatTechnologyWants2010-ko.org

TODO 비용을 절약하려면

[2023-09-08 Fri 15:13] deepl 변환 제한이 있으므로…

org 로 변환 후, Markdown 웹서버로 띄워서 브라우저 번역으로 하면 된다.

추후에 이맥스에 번역 기능 넣을 것이다. 문서 번역 기능 보다 훨씬 편리할 듯