Skip to content

kenshin579/app-korean-catholic-bible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9703c6d · Aug 4, 2018

History

35 Commits
Jul 15, 2018
Jul 18, 2018
Aug 4, 2018
May 14, 2017
Jul 28, 2018
Jul 28, 2018
Jul 15, 2018
Jul 15, 2018
Jul 21, 2018
Jul 28, 2018
Jul 28, 2018

Repository files navigation

가톨릭 성경 ebook format (epub) 만들기

성경을 전자책(ex. 리디북스 페이퍼)에서도 읽을 수 있도록 여러 포맷(ex. epub, pdf)으로 생성한다

목차

Features

  • 전체 성경책 내용을 웹에서 scraping 해준다.
  • 명령어 실행으로 여러 전자책 포맷(ex. epub)을 생성한다.

추가 작업목록 - 2차 (누구나 참여 가능합니다)

필요한 패키지 설치

  • 실행 환경은 mac 기반으로 작성되었습니다.

1. python 설치

  • script 실행을 위해 python3을 설치한다
$ brew install python3

2. gitbook 관련 파일 설치

1.먼저 node를 설치한다

$ brew install node

2.gitbook-cli 설치

  • gitbook으로 여러 포맷을 생성하기 위해 global로 gitbook 명령어를 설치한다.
$ npm i gitbook-cli -g

3.cablire 설치

  • calibre는 gitbook에서 pdf로 렌더링할 때 필요한 프로그램이다.
$ brew cask install calibre
$ ln -s /Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin

3. 실행하기

$ cd scripts
$ ./get_bible_content.py -h
한글 성경 EPUB 파일로 만들기
Usage:  get_bible_content.py [-h|--help] [-f|--format] destination folder
   format : [epub, gitbook]

   -h,--help                 : help 메뉴
   -f,--format               : 생성하려는 포멧 (ex. epub, pdf, mob, gitbook
   * 참조: gitbook : scrape해서 markup으로 저장함 (1회성)

Examples: 
python3  get_bible_content.py -f epub ../

1.성경 내용 scraping 하기

  • 웹 서버에 많은 부하를 주지 않기 위해서 scraping 할때 time sleep을 주기 때문에 전체 성경을 가져오는 대는 시간이 걸린다.
$ cd ./scripts
$ ./get_bible_content.py -f gitbook ../

2.웹 스크래핑한 성경을 epub나 pdf로 생성하기

$ cd ./scripts
$ ./get_bible_content.py -f epub ../
$ open ../build/bible.epub

$ ./get_bible_content.py -f pdf ../
$ open ../build/bible.pdf

3.웹 스크래핑한 내용을 로컬 서버에서 실행해서 브라우져에서 확인하기

  • 웹 스크래핑한 내용을 github에 commit하면 gitbook.com 사이트에서도 확인이 가능하다
$ gitbook serve 

Releases

No releases published

Packages

No packages published