Sign inSign up

storager/shapeup

By storager

•Updated almost 4 years ago

Image
0

500

storager/shapeup repository overview

⁠Shape up downloader

⁠What does it do?

This is a simple CLI application that downloads basecamps excellent free shape up book⁠ into a single, self-contained HTML file.

  • uses base64 images
  • uses document-internal links
  • only the bare minimum of CSS

⁠Why does this exist?

The book is currently available in an HTML format, where every chapter is one document and a PDF document where all chapters are in one self-contained file. While reading the book I was yearning for a way to read it on my e-book reader, but reading PDF on a Kindle sucks and converting PDFs to epub or mobi is wonky at best. The software used to generate this particular PDF combined some character combination (e.g. "tf") into a single UTF-8 codepoint with ligatures. This however trips up most converting software.

Thus, this project was born to download and combine all web documents into a single self-contained file without styling. You are not intended to read the book in that HTML format - but it can be used as a basis for further conversion steps.

To convert the file into more useful formats I recommend using calibres ebook-convert utility:

$ ebook-convert shape-up.html shape-up.epub \
    --authors "Ryan Singer" \
    --title "Shape Up: Stop Running in Circles and Ship Work that Matters" \
    --book-producer "Basecamp" \
    --publisher "Basecamp" \
    --language "en"

⁠Where can I download this HTML/EPUB/MOBI single page version?

I am not quite sure about the legal implications of hosting these files - thus I am not doing it. The code to download it yourself is here, but you must use it yourself.

⁠Usage

  1. Install PHP⁠
  2. Install Composer⁠
  3. Run php composer.phar install (or composer install in case composer is installed globally)
  4. Run php cli.php download:single-html

This will create a shape-up.html file in your current directory. That's it.

⁠Docker way

There is a way to not deal with php at all. For that it is enough to have docker engine installed.

Usage

docker build -t shapeup .
docker run -it --rm -v $(pwd)/output:/app/output shapeup epub

On the go it downloads singe html and converts it to the format chosen. All the available formats are there https://manual.calibre-ebook.com/generated/en/ebook-convert.html⁠. The approach has been tested with azw3, fb2 and epub options

Tag summary

Content type

Image

Digest

Size

174.8 MB

Last updated

over 5 years ago

docker pull storager/shapeup