User:Clàudia/t4pp-fancy-book

From XPUB & Lens-Based wiki
< User:Clàudia
Revision as of 14:10, 4 November 2016 by Clàudia (talk | contribs) (Created page with "<div style="font-size: 12px; margin-bottom:100px;"> = Recipie = <ul> <li> Get the content from a website </li> wget http://anjagroten.com/ <li> Using Pandoc, change the for...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Recipie

  • Get the content from a website
  • wget http://anjagroten.com/
  • Using Pandoc, change the format from html to markdown
  • pandoc document.html -f html -t markdown -s -o document.md
  • Change some characters for < span class='a'> WHATEVER YOU WANT TO REPLACE THE CHARACTER FOR
  • sed "s/a/< span class='a'> @ <\/span>/g" document.md > document1.md sed "s/e/< span class='e'> { <\/span>/g" document1.md > document2.md sed "s/k/< span class='k'> * <\/span>/g" document2.md > document3.md sed "s/r/< span class='r'> ??? <\/span>/g" document3.md > document4.md
  • Using Pandoc, convert the document from markdown to html
  • pandoc document4.md -f markdown -t html -s -o document4.html
  • Create a css style sheet editing the classe you have insert into span
  • touch style.css echo ".a{color-background:red; color: white; font-size:30pt; font-family:Helvetica;}" >> style.css
  • To finish, using Weasyprint, convert the document from html to pdf, inserting the style.css
  • weasyprint document4.html -s style.css final-document.pdf