diff --git a/.gitignore b/.gitignore index b040e2e..76073d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.html *.epub *.pdf +!cover.pdf diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1615a9b --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 Abhay Rana + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index b393cbc..7dd0880 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ # ickabog-ebook -Generates ebooks for The Ickabog by J.K Rowling. Original text from https://www.theickabog.com/home/ +Generates ebooks for The Ickabog by J.K Rowling. Original text from https://www.theickabog.com/ ## Dependencies: - `wget` - [`pup`](https://github.com/ericchiang/pup) - [`pandoc`](https://pandoc.org/) +- [`pdftk`] ## How to run @@ -16,13 +17,18 @@ You should have `ickabog.epub`, and `ickabog.pdf` in your directory after the sc ## Known Issues -1. Currently no cover is available. If you'd like to submit a cover for this book, please let me know. I think a kid-drawn illustration would be perfect, keeping with the theme of the contest. 2. The PDF is optimized for few pages of printing, so has a small font size by default. If you'd like a kid-friendly version, install context to get `ickabog-large.pdf` file. ## Extra -A list of my other EBook generation projects: https://captnemo.in/ebooks/, includes a link to other related projects as well +A list of my other EBook generation projects: https://captnemo.in/ebooks/, includes a link to other related projects as well. + +## Credits + +The cover art is [Avanyu](http://edan.si.edu/saam/id/object/1979.144.85) by Julian Martinez. Used under Creative Commons license. + +> Julian Martinez, Avanyu, ca. 1923, watercolor, ink, and pencil on paper, Smithsonian American Art Museum, Corbin-Henderson Collection, gift of Alice H. Rossin, 1979.144.85 ## License -Licensed under the [MIT License](https://nemo.mit-license.org/). See LICENSE file for details. +The little code in this repository is licensed under the [MIT License](https://nemo.mit-license.org/). See LICENSE file for details. diff --git a/cover.jpg b/cover.jpg new file mode 100644 index 0000000..b00ea81 Binary files /dev/null and b/cover.jpg differ diff --git a/cover.ora b/cover.ora new file mode 100644 index 0000000..59714f6 Binary files /dev/null and b/cover.ora differ diff --git a/cover.pdf b/cover.pdf new file mode 100644 index 0000000..28fcf85 Binary files /dev/null and b/cover.pdf differ diff --git a/generate.sh b/generate.sh index 89a6351..489a08c 100755 --- a/generate.sh +++ b/generate.sh @@ -20,7 +20,7 @@ done echo "" >> "$HTML_FILE" pandoc --from=html --to=pdf \ - --output=ickabog.pdf \ + --output=ickabog1.pdf \ --metadata title="The Ickabog" \ --metadata author="J.K Rowling" \ --pdf-engine=xelatex \ @@ -30,15 +30,18 @@ pandoc --from=html --to=pdf \ -V geometry=margin=1.5cm \ "$HTML_FILE" +pdftk cover.pdf ickabog1.pdf cat output ickabog.pdf + pandoc --from=html --to=epub \ --output=ickabog.epub \ --epub-metadata=metadata.xml \ + --epub-cover-image=cover.jpg \ --metadata title="The Ickabog" \ "$HTML_FILE" pandoc --from=html --to=pdf \ -V fontsize=18pt \ - --output=ickabog-large.pdf \ + --output=ickabog2.pdf \ --metadata title="The Ickabog" \ --metadata author="J.K Rowling" \ --pdf-engine=context \ @@ -50,4 +53,4 @@ pandoc --from=html --to=pdf \ -V lang=en-US \ "$HTML_FILE" - +pdftk cover.pdf ickabog2.pdf cat output ickabog-large.pdf