Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with PDF generation #29

Open
hmemcpy opened this issue Nov 25, 2018 · 16 comments
Open

Integrate with PDF generation #29

hmemcpy opened this issue Nov 25, 2018 · 16 comments

Comments

@hmemcpy
Copy link
Contributor

hmemcpy commented Nov 25, 2018

See hmemcpy/milewski-ctfp-pdf#161

@raulraja
Copy link
Member

In the spirit of making it easily modifiable in the future if there are any additions ... Should we organize the code in this repo differently so it matches the format you have in that PR?

I mean having each snippet in its very own file like you have here:

src/content/1.1/code/scala/snippet04.scala

@hmemcpy
Copy link
Contributor Author

hmemcpy commented Nov 25, 2018

I've arrived at this structure after struggling a bit with the macro to try a more convention-based approach. I think this is good, putting all samples into e.g. kotlin/snippet04.kt files, but perhaps this could be a post-build step, generating them from the markdown files? I suppose whatever's easier from Ank's point of view :)

@raulraja
Copy link
Member

sounds good, ank doesn't really care but for translation purposes the current layout comparing haskell and kotlin it's easier. We'll figure it out after they are all translated and ready and we can separate them there.

@raulraja raulraja added this to To do in Translation Progress Nov 26, 2018
@rachelcarmena rachelcarmena mentioned this issue Aug 27, 2019
@rachelcarmena
Copy link
Member

Hi! I was playing with some small scripts and I've just created #56 pull request to include them 🎉

@raulraja raulraja moved this from To do to Done in Translation Progress Aug 28, 2019
@rachelcarmena
Copy link
Member

rachelcarmena commented Aug 28, 2019

I've just created this issue in milewski-ctfp-pdfrepository, because we're including the translation of all the snippets (sections 1.7, 1.10 and 2.2) and some of them haven't been extracted for the translation in Scala.

@rachelcarmena
Copy link
Member

  • Good news! 🎉 Reviewed sections: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.9, 2.1 and 2.3.
  • Existing sections that are affected by this issue: 1.7 (still in progress), 1.10 and 2.2.
  • I've uploaded the drafts for the missing sections. They only include the considered snippets in the book until now.
  • I've updated READMEto comment the existence of drafts for next contributors. Maybe it can be announced at Slack or Twitter to encourage people (I'll try to help with some section as well 😉 ).

@hmemcpy
Copy link
Contributor Author

hmemcpy commented Aug 28, 2019

Hi! Thanks for listing the missing snippets. I'll look closely, but there are a few snippets that I know of: some parts were Haskell pseudocode which was not converted. Also, the snippets in the exercises were not converted.

@rachelcarmena
Copy link
Member

Thanks here as well, @hmemcpy !! When taking into account the Challenges section, the new list that I get for the issue is shorter and with a smaller number of snippets 👏

@rachelcarmena
Copy link
Member

rachelcarmena commented Aug 29, 2019

  • After having the new list in the issue:
    • I'll wait for an answer to review 1.7 (still in progress) and 2.2.
    • I'll review the additional snippets in 1.10 (not included in the list now)
  • Included hypothetical files for Scala in drafts/scala as a help to add the translation in Kotlin.
  • README: second last section Initial drafts updated with the previous point.

@rachelcarmena
Copy link
Member

Repository milewski-ctfp-pdf

Local environment requirements for creating the book:

  • Packages:
    • latexmk
    • texlive-xetex
    • texlive-fonts-extra
    • texlive-math-extra
  • Fonts:
    • Inconsolata LGC
    • Libertinus Math

This repository

  • Pending: reviewing and fixing 1.7, 1.10 and 2.2
  • 💡 by @i-walker!
    • Adding an additional task for checking the translation when pushing a contribution.
      • Dependency: it will be possible when 1.7, 1.10 and 2.2 are reviewed and fixed. Now there are errors with the numbers of snippets. If I activate this control now, all the builds will fail.

@hmemcpy
Copy link
Contributor Author

hmemcpy commented Aug 29, 2019

I really appreciate the awesome work you folks doing here, it's going to be amazing :)
If it helps, I recently hacked together (with lots of help!) a Nix installation shell script that pulls all the required LaTeX environment + packages + fonts, to be able to build the book without manually installing anything. I just added the instructions to the main README.

TL;DR Install Nix, then in the root of the project type nix-shell. It will work for a while, then ONE INTERNET LATER you will have an environment in which you could run the makefile. It will appear as a regular shell prompt, so you can navigate to src and run make.

Please see https://github.com/hmemcpy/milewski-ctfp-pdf/blob/master/shell.nix

(I needed to install a patched version of Pygments due to a highlighting bug in Scala, as well as pulling a github theme for Pygments which I couldn't install in nix directly, had to use a python virtualenv for that...)

@rachelcarmena
Copy link
Member

Wow, I didn't see it! That's a big treasure. Super useful, @hmemcpy !!

Thank you so much!!

@rachelcarmena
Copy link
Member

Related issue closed! ✔️

We can ask for help with the current drafts.

@rachelcarmena
Copy link
Member

I've just created #57 for adding extra checks with GitHub actions.

Those extra checks don't make the build fail for now.

They will be able to be activated when sections 1.7, 1.10 and 2.2 are reviewed and fixed.

@rachelcarmena
Copy link
Member

Sections 1.7, 1.10 and 2.2 have been reviewed and fixed.

There are 3 pull requests. Two of them are drafts where I need help.

I'll add 2 more checks:

  • The length of the lines (so far, there is a case outside the margins in the book )
  • Non empty snippets in Kotlin

@rachelcarmena
Copy link
Member

I've created a new PR for the mentioned checks. So... everything is ready!! 🎉

Only a comment: it will be necessary to review the Editor Note (there is a TODO mark at the end).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants