Generate epub file from https://www.divinumofficium.com. See Sample outputs.

Instalation

Use Docker

$ docker run --rm -v $(pwd):/tmp mbab1/doepub

On Windows use something like

C:\> docker run --rm -v /c/mydirectory:/tmp mbab1/doepub

Binaries

Binaries available only for Linux but program should compile on any platform which support Crystal lang. Download the latest release from the releases page. Rename file at Your will.

Build from source

Requirements:

  • Crystal

  • cmake (for depedency shard lexbor)

Use git to clone repository:

$ git clone https://gitlab.com/mbab1/divinumofficium.epub

or download convenient format source from releases page and unpack.

compile:

$ cd divinumoffium.epub
$ shards build --release

Usage

Warning
Running program without options, starts building epub with default values.

Explore options with:

$ doepub --help

Usage: doepub <arguments>
        default values in []
        possible vaulues in ()

Divinum officium options:
    -r RUBRICS, --rubrics=RUBRICS    ( Tridentine+1570 | Tridentine+1910 | Divino+Afflatu | Reduced+1955 | Rubrics+1960 | 1960+Newcalendar | Monastic | Ordo+Praedicatorum )
    -f DATE, --datefrom=DATE         start date MM-DD-YYYY ['tomorrow']
    -t DATE, --dateto=DATE           end date MM-DD-YYYY ['end of month of start date']
    -n NUMBER, --numofdays=NUMBER    give number of days instead of above - no defaults
    -H HORAS, --horas=HORAS          string consist horas ex. 'VesperaeCompletorium' [Omnes]
    -l LANGUAGE, --lang2=LANGUAGE    language for right side ( Latin | Dansk | Deutsch | English | Espanol | Francais | Italiano | Magyar | Polski | Portugues | Latin-Bea | Polski-Newer ) [English]
    -e VOTIVE, --votive=VOTIVE       ( none | Dedicatio | Defunctorum | ParvumBMV ) [none]
    --priest                         priest mode
    --oldhymns                       use pre Urban VII hymns
    --nonumbers                      do not number verses in psalms, canticles, biblical reading
    --noexpand                       do not expand common prayes
    --nofancychars                   use + for crosses, VR for ℣℟

Program options:
    -o FILE, --output=FILE           epub file name [do.epub]
    --overwrite                      overwrite output file
    -i TITLE, --title=TITLE          book title [Divinum officium]
    --nocover                        do not include cover
    --nocoverpage                    do not insert cover page
    -k COVERFILE, --cover=COVERFILE  cover image file
    --notitlepage                    do not insert title page
    --index                          insert index page
    --antepost                       insert page with Apéri & Sacrosánctæ
    --nocomments                     omit comments
    --noomitted                      omit omitted
    -s CSSFILE, --style=CSSFILE      style sheet file
    -S, --dumpcss                    show internal css style
    -d DIR, --fontdir=DIR            include fonts from directory
    -p SOURCE, --source=SOURCE       path/url to divinum officium in place of divinumofficium.com
    -c CFGFILE, --config=CFGFILE     read options from file
    -C, --dumpconfig                 show default configuration
    -q, --quiet                      do not report progress [false]
    --version                        show program version and exit
    -h, --help                       show this message and exit

Notes & Suggestions

  1. rubrics, language, horas, votive can be shortened as long as they are unequivocal eg.:

    $ doepub -r Mon --horas LVComp -l Fr

    make epub with Monastic version French as second language contains Laudes, Vespera and Completorium.

  2. recommended viewer is KoReader

  3. if you have own copy of divinumofficium (available from GitHub),
    you can use -p my_dir_with_divinumofficium
    option rather then -p http://localhost:8080

  4. save Your common options to file with dump config

    $ doepub -C > config.my

    then edit file and use it

    $ doepub -c config.my # ... You can add more options
  5. --votive Defunctorum ignores dates - produces only one day, use

    $ doepub --votive Def --horas VML

    if You want this start at Vespera.

Sample outputs

doepub --votive Def -k cover-def.jpg --noomitted --nocomments --nonumbers -o defunctorum.epub