Git Product home page Git Product logo

urbanoperationsresearchbook's Introduction

Summary

This project is an effort to convert the online version of Urban Operations Research book (first edition, Prentice-Hall © 1981) into a more readable ebook format (EPUB). This book is one of my favorites since I read it during my graduate school. Unfortunately, it's out of print and used copies are being sold at exorbitant prices. I thought it should be a nice exercise to scrape the online book and convert it into an EPUB that I can enjoy again.

Running

To produce the EPUB book, install dependencies and then run the following:

git clone https://github.com/rmahfoud/UrbanOperationsResearchBook.git
cd UrbanOperationsResearchBook
bin/run.py

The EPUB book will appear in /tmp/uor/uor.epub for you to enjoy on your favorite e-reader.

The settings (including file paths) are defined in UrbanOperationsResearchBook/settings.py.

These scripts do not cleanup after themselves (yet). You need to manually delete output directory /tmp/uor to cleanup.

Validation

The generated EPUB was validated using the online EPUB Validator (beta) tool.

It was also visually inspected with:

  • calibre on the desktop (Ubuntu and Windows).
  • Moon+ Reader Pro on an Android phone.
  • Kinldle: after conversion using calibre to .mobi it loaded fine in Kindle. Sections are interrupted by blank pages that I'm not sure where they come from (possibly due to use of <table> in layout). On my phone the quality of the text with inline images seems to suffer but on the tablet rendering looks fine.

Please report any additional issues in the EPUB on github.

Quality

The following are issues I found with the book as it's currently present online:

While doing the conversion I ignored many of the warnings/errors due to non-canonical XHTML because it turns out most good readers do not require canonical XHTML and will work and render pages just fine. I ended up doing the bare-minimum required translations. Some things you might encounter (and might want to submit fixes for) if you use a reader that doesn't entirely like the current XHTML:

  • The use of the <center> tag which is disallowed
  • The use of the <font> tag which is disallowed
  • The use of inline styles (e.g. <table cellpadding="5">, or <p align="center">) instead of CSS

Dependencies

On Ubuntu/Debian, run the following:

sudo apt-get install libffi-dev libssl-dev build-essential \
     g++-4.4 libboost-all-dev libsparsehash-dev \
     git-core perl ipython

or equivalent on non-Debian systems.

Then install the following python dependencies:

sudo pip install cryptography
sudo pip install scrapy

TODO

  1. Add images to manifest in OPF file
  2. Remove use of <font> tag
  3. Remove use of <center> tag
  4. Remove inline style and replace with CSS

Copyrights

These scripts and resulting EPUB are for personal enjoyment only. Please respect the copyright owners of the original book and do not distribute the ebook that's produced by these scripts.

License

This software is released under the MIT license.

urbanoperationsresearchbook's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.