Skip to content

gregoriopellegrino/epub-bash-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bash scripts for EPUB production #eprdctn

A collection of bash scripts (developed on Mac) that can help in the making of perfect crafted EPUBs.

Getting started

Scripts

assignTitles.sh

This script replace the <title> value of each HTML document in the EPUB with the first occurance of the most important heading in it.

Usage

/path_to/assignTitles.sh /path_to/OEBPS

mapEpubTypeToRole.sh

This script assigns ARIA role attribute to all HTML elements that have an epub:type attribute (as role is missing). The mapping is based on https://idpf.github.io/epub-guides/aria-mapping/

Usage

/path_to/mapEpubTypeToRole.sh /path_to/OEBPS

pxToEm.sh

This script converts px values (in CSS) to em.

Usage

/path_to/mapEpubTypeToRole.sh /path_to/OEBPS

Disclaimer

  1. Some of the scripts use regex for HTML manipulation: please note that HTML should not be regexed! The end is nigh.
  2. Pixels should not be transformed in em: pixels are an absolute unit of measures, ems depends on the parent element (https://stackoverflow.com/a/4575518)
  3. Use these script at your own risk!

License

MIT License https://github.com/gregoriopellegrino/epub-bash-scripts/blob/master/LICENSE

About

Bash scripts for EPUB production #eprdctn

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages