Coder Social home page Coder Social logo

costoffreedom / costoffreedom-book Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 4.0 7.48 MB

Cost of Freedom for Gitbook

Home Page: https://book.costoffreedom.cc

License: Creative Commons Zero v1.0 Universal

CSS 4.29% Shell 0.47% Makefile 0.04% TeX 95.19%
gitbook book-sprint book freebassel freedom

costoffreedom-book's Introduction

Cost of Freedom

The Cost of Freedom is a book that started with a book sprint in Pourrières, France from November 2nd to 6th, 2015, and contributions from around the world. The book is one of many projects inspired by and demanding freedom for Bassel Khartabil, loved and celebrated Internet volunteer detained in Syria since 15 March 2012. #FREEBASSEL!

The was published at the end of the book sprint, but the topic remains vital and mission unfulfilled. To facilitate further edits and enhancements, the book sources have been migrated to GitHub and published with GitBook. Feel free and encouraged to open issues, propose edits (or even entirely new chapters), make translations, fork, copy, excerpt, share, promote, and otherwise make your own.

Technical details

Source and issues are available at GitHub.

Current build is available on gitbook.com with the HTML version published to book.costoffreedom.cc.

Build manually

Follow instructions at Gitbook:

npm -g install gitbook
gitbook serve
gitbook build

To build PDF and Epub locally, you need ebook-convert (packaged in Calibre):

gitbook pdf . ./costoffreedom.pdf

As of writing there are bugs in the gitbook toolchain that prevent it from generating EPUB files that will pass all validation checks. In order to overcome these problems, you can use a forked version of gitbook.

Clone the forked version:

git clone -b custom [email protected]:christopheradams/gitbook.git ~/gitbook-custom
cd ~/gitbook-custom
npm install

Link the gitbook command to the custom version:

gitbook versions:link ~/gitbook-custom

Now every time you run the gitbook command, it will use the custom version.

gitbook epub . ./costoffreedom.epub

You can see what version you are using with the command:

gitbook versions

To stop using the custom version:

gitbook versions:uninstall latest

To upload on Lulu, you need to add proper metadata. Use the folowing script

sh bin/create_ebook.sh

Build clean PDF with Latex

latexmk and pandoc are required.

make pdf

you will need xelatex and Scherazade font for Arabic language

sudo apt-get install texlive-xetex fonts-sil-scheherazade

License

CC0-1.0

costoffreedom-book's People

Contributors

christopheradams avatar clemsos avatar hellekin avatar mlinksva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

costoffreedom-book's Issues

need a Makefile command to release PDF

Basically need to

  • build pdf
  • bump a version number
  • upload to different locations

Currently the pdf is located in costoffreedom/costoffreedom.cc and costoffreedom/costoffreedom-book

Get a clean PDF using Latex

Following #6 and the few options offered by gitbook regarding styling, it is way better to use Latex to generate a clean version for print.

This can be done already by using the make pdf command. It will first convert .md files to .tex following the order, then use the .cls Latex class and main file .tex in /tex folder to compile.

latexmk and pandoc are required

pdf.css

The rendered pdf https://www.gitbook.com/download/pdf/book/costoffreedom/costoffreedom-book has two behaviors I'd like to get rid of:

  • In the table of contents, displays (filename.html) next to each entry. I guess this could be useful for debugging purposes but doesn't help readers.
  • Chapter titles are shown twice, probably once as specified in chapter markdown title, once as specified in SUMMARY.md

Both of these behaviors are probably specified in pdf.css -- if I rename it, they both go away. But I can't figure out what in pdf.css specifies those behaviors. pdf.css seems to be very complicated, I suspect ought be blanked except for some minimum styles we explicitly want. @clemsos it looks like you created the pdf.css. I'm probably missing some obvious things. Thoughts?

Disappearing text with Safari?

Report from a friend:

One operational note: there is something funky with Gitbook. Your rant loads just fine, but if I move the mouse around, all the text disappears. This is repeatable with latest Safari on the lasted Mac OS X.

Get generated EPUB to pass epubcheck

To get an EPUB accepted at most online retailers, it has to pass a validation step. You can test an EPUB locally using epubcheck.

Unfortunately gitbook does not always generate error-free EPUB files, mostly due to the markdown parser not writing valid XHTML in some edge cases (e.g., footnotes, heading id's).

Assuming you've installed gitbook-cli, and cloned this book in your home directory, and downloaded epubcheck:

cd costoffreedom-book
gitbook epub . ~/costoffreedom.epub

cd ~/epubcheck-4.0.1
java -jar epubcheck.jar -out ~/epubcheck.xml ~/costoffreedom.epub

Here's the output:

costoffreedom-epubcheck.xml.txt

Images removed from book

@clemsos you deleted all the images with dc74ac4 ... the chaper tocs had them, and the collective-memory free bassel chapter consisted of only an image. Was this intentional?

double or triple printing of contributor bios

Contributors are listed with bios

  • bottom of each chapter
  • at end in contributor list
  • gratuitously again, one page for each contributor

At least the 3rd ought go.

I suggest the bio could appear just once, either in the first or second, probably second. Name(s) only for chapters.

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.