Getting data
First of all we need to get HTML/CSS and image files to local machine. On my machine it's as simple as:$mkdir ~/aosabook; cd ~/aosabook $wget -I en,images -nd -r -k -l 3 http://www.aosabook.org/enWe want to download all documents recursively but only from en and images directories, don't create directory structure to local copy and replace paths in html documents so they're locally referenced. For more details check man wget.
Convert to single HTML
Now we have all data downloaded in ~/aosabook and to check whether book is readable we just have to open file:///home/aosabook/ in browser.Because the structure of the web is multi-page, we have to do additional step. Convert the multi page document into single page. I've used htmldoc utility for this. Run htmldoc and do following:
- input tab
- choose Document Type: Book
- Use add files button to add all html files from ~/aosabook/
- Select cover image
- output tab
- set output to file
- set output path to ~/aosabook/aosabook.html
- set output format to html
No comments:
Post a Comment