diff --git a/.travis.yml b/.travis.yml index 64d4c33..5b476db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,8 @@ sudo: required services: - docker -before_install: -- sudo make script: -- sudo make book +- sudo make deploy: provider: releases api_key: @@ -12,5 +10,4 @@ deploy: file: "./book/RiichiBook1.pdf" skip_cleanup: true on: - repo: loopfz/riichi-book-1 branch: master diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 4039794..0000000 --- a/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM hrektts/texlive -MAINTAINER loopfz@gmail.com - -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y nkf bzip2 mftrace fontforge tex-gyre \ - && rm -rf /var/lib/apt/lists/* - -ADD build-tile-font.sh / -ADD build-bxptool.sh / -RUN chmod +x /build-tile-font.sh && bash /build-tile-font.sh -RUN chmod +x /build-bxptool.sh && bash /build-bxptool.sh diff --git a/Makefile b/Makefile index 942fab2..90489ba 100644 --- a/Makefile +++ b/Makefile @@ -7,12 +7,9 @@ MAIN_FILE = RiichiBook1 LATEX_FILES = ${SRC_FOLDER}/*.tex TARGET = ${SRC_FOLDER}/${MAIN_FILE}.pdf -DOCKER_IMAGE = loopfz/riichi +DOCKER_IMAGE = loopfz/riichi-latex -all: build - -build: - @docker build --tag=${DOCKER_IMAGE}:latest . +all: book book: ${TARGET} diff --git a/README b/README index 968d47a..ac51082 100644 --- a/README +++ b/README @@ -1,6 +1,43 @@ -To generate the book: +This project is an ongoing french translation of the wonderful +japanese mahjong (riichi) strategy ebook written by Daina Chiba. +Original ebook: http://riichi.dynaman.net + +------------------------------------------------------------------------------ + +ATTENTION FRENCH SPEAKERS : + +ON ACCEPTE LES CONTRIBUTIONS :) + +L'ebook est écrit en Latex, et utilise des packages assez exotiques notamment +pour afficher les tuiles de mahjong, ce qui le rend complexe à compiler. + +Cependant, nous avons automatisé autant que possible le processus, et le PDF +de l'ebook est automatiquement re-généré à chaque pull request acceptée, +puis uploadé dans la section releases. + +Vous n'avez pas besoin de connaître Latex pour participer ! + +------------------------------------------------------------------------------ + +To manually generate the book under Linux: /!\ Requires Docker /!\ sudo make -sudo make book + +------------------------------------------------------------------------------ + +IF YOU ARE INTERESTED IN PURSUING A TRANSLATION PROJECT IN ANOTHER LANGUAGE + +You may reuse our tech however you want ! + +Things of interest: +- The custom Docker image designed to embed everything needed to build + the ebook (see https://github.com/loopfz/riichi-latex ) +- The patches done in book/RiichiBook1.tex for compatibility with lualatex +- The .travis.yml file that automatizes the PDF build, using the Docker image + +It should be very easy to set up everything in another repository, +do not hesitate to contact me for help: + + loopfz@gmail.com diff --git a/build-bxptool.sh b/build-bxptool.sh deleted file mode 100644 index 7fcb50f..0000000 --- a/build-bxptool.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -TEXDIR=/usr/share/texmf - -TEMPDIR=/tmp/bxptool - -[[ -d "$TEMPDIR" ]] || mkdir -p $TEMPDIR -cd $TEMPDIR - -wget https://github.com/zr-tex8r/BXptool/archive/master.zip -unzip master.zip -cd BXptool-master - -mkdir -p $TEXDIR/tex/latex/BXptool - -cp *.{sty,def} $TEXDIR/tex/latex/BXptool -mktexlsr - -cd - -rm -rf "$TEMPDIR" diff --git a/build-tile-font.sh b/build-tile-font.sh deleted file mode 100644 index e94b6ba..0000000 --- a/build-tile-font.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -# Need to install: -# texlive (obviously !) -# nkf -# bzip2 -# fontforge -# mftrace - -TEXDIR=/usr/share/texmf - -TEMPDIR=/tmp/mahjong-tile-font - -[[ -d "$TEMPDIR" ]] || mkdir -p $TEMPDIR -cd $TEMPDIR - -wget http://riichi.dynaman.net/RiichiBooks/piemf-2.0.2.tar.bz2 - -tar xjvf piemf-2.0.2.tar.bz2 - -cd piemf-2.0.2/macros -mkdir work -for f in *.sty -do - nkf $f > work/$f - mv work/$f . -done - -cd .. - -mkdir -p $TEXDIR/{fonts/{source,tfm,type1,map/dvips},tex/latex}/piemf - -cp src/*.mf $TEXDIR/fonts/source/piemf/ -cp macros/*.{sty,fd} $TEXDIR/tex/latex/piemf/ -mktexlsr - -mkdir -p type1 -cd type1 -mftrace --magnification=4000 --encoding=tex256.enc pie -t1binary pie.pfa pie.pfb - -cat > pie.map <