satwikkansal / wtfpython

What the f*ck Python? 😱
Do What The F*ck You Want To Public License
35.78k stars 2.66k forks source link

Ebook version? #66

Open satwikkansal opened 6 years ago

satwikkansal commented 6 years ago

Hey guys,

I was preparing a pdf for the collection, while a friend of mine recommended me to put in some extra effort to release an ebook version for the same.

I have absolutely no experience with this and I doubt if it'd be an overkill. That's why I've opened up this issue, maybe someone having prior experience with all this can help me in figuring out what to do and if it actually makes sense to do so 😅

dirksteindorf commented 6 years ago

Hi satwikkansal,

I would try converting your README.md with pandoc at first, just to see if the results are okay: https://pandoc.org/getting-started.html https://pandoc.org/demos.html https://pandoc.org/epub.html

Pandoc support a huge list of formats, including pdf and epub, so that could help you a lot. Maybe you just need to do some formatting and then be done with it, if you're lucky.

Code can be quite tricky in ebooks, because of the different display sizes of the readers. Maybe you could just stick to one size or one ebook reader at first. Amazons Kindle Textbook Creator could be helpful for this: https://www.amazon.com/gp/feature.html?docId=1002998671

I hope that helps a bit. :)

satwikkansal commented 6 years ago

Hey @dirksteindorf

Thanks for the suggestion. Let's give these tools a try! If it works well, we can share the pdf this way for the time being.

satwikkansal commented 6 years ago

I had another general query as well. I feel that books are supposed to be more formal, organized: following a proper format, and descriptive than wtfpython is right now (maybe I'm wrong believing that).

So if someone can help me figure out if this project is actually worth a book, and up to how much extent (according to them) should we work in formalizing the structure and content, then it'd make things easier to plan.

dufferzafar commented 6 years ago

I created this using Pandoc. Had to modify the Readme a bit to please Pandoc/LaTeX etc.

The output looks pretty decent to me. It has working table of contents and is only ~400 KB in size.

Download WTF Python.pdf

Command: pandoc -f gfm --pdf-engine=xelatex --template=jgm.tex -V geometry:margin=1.1in README.md -o WTF.pdf

satwikkansal commented 6 years ago

Hi @dufferzafar

Thank you so much for this, and yes, it looks pretty neat.

There's one minor issue, the hyperlinks in TOC aren't still working in some cases. Trying to figure our the reason why...

satwikkansal commented 6 years ago

Ah, got it. All the titles ending with non alphanuerice characters (like * and !) aren't properly functioning in TOC hyperlinks.

satwikkansal commented 6 years ago

I think for now, I can remove those characters at the end and generate the pdf. And I'll create an upstream issue for it, so that we can have a better approach later on.

nifadyev commented 1 month ago

Hi @satwikkansal , could you please pin this issue to elaborate the progress? Also, it shall be moved to 3.1 release

satwikkansal commented 1 month ago

Yes, let's move it 3.1 release, I think now there are better tools to do this, once we're closer to the release we can play around with the latest README at the time and see which tool does the job.

dufferzafar commented 1 month ago

@satwikkansal What are you planning to use here? I would still suggest using pandoc but going via typst route rather than latex.

satwikkansal commented 1 month ago

@dufferzafar I'm not sure yet. The last time I tried Pandoc, the issue was that the TOC wasn't functioning properly and maybe going via the typist route fixes that. If not, will consider researching something else.