all: run install: python3 -m venv venv ./venv/bin/pip3 install jinja2 ./venv/bin/pip3 install markupsafe==2.0.1 run: ./venv/bin/python3 -m http.server update: wiki wiki: # --- # update the materials from the wiki, save it as Unfolded.html ./venv/bin/python3 update.py @echo "Pulling updates from the wiki: Unfolded (wiki) --> Unfolded.html (file)" multi: # --- # multistamp Multi Remix on top of the pdf @pdfunite multi-remix/multi-remix.pdf multi-remix/multi-remix-empty.pdf multi-remix/multi-remix.pdf multi-remix/multi-remix-empty.pdf multi-remix/multi-remix-stamp.pdf @pdftk Unfolded.pdf multistamp multi-remix/multi-remix-stamp.pdf output Unfolded-with-Multi.pdf interior: multi # --- # take cover out of the PDF (only select pages 3-338 + 2 extra white pages) @pdftk Unfolded-with-Multi.pdf cat 3-342 output Unfolded-interior.pdf webversion: # --- # multistamp Multi Remix on top of the pdf @pdfunite multi-remix/multi-remix-web.pdf multi-remix/multi-remix-empty.pdf multi-remix/multi-remix-web.pdf multi-remix/multi-remix-empty.pdf multi-remix/multi-remix-web-stamp.pdf @pdftk Unfolded.pdf multistamp multi-remix/multi-remix-web-stamp.pdf output Unfolded-with-Multi.pdf # --- # taking out the extra 2 empty pages @pdftk Unfolded-with-Multi.pdf cat 1-340 343-344 output Unfolded-web.pdf # --- # resizing the web PDF @sh resample.sh Unfolded-web.pdf 300 @mv Unfolded-web-resampled.pdf Unfolded-web.pdf coverimage: # --- # taking only the cover page from the PDF @pdftk Unfolded-web.pdf cat 1 output Unfolded-cover-web.pdf # --- # turning the cover into CMYK @sh rgb2cmyk.sh Unfolded-cover-web.pdf overprint # --- # saving the cover as PNG file @pdftoppm Unfolded-cover-web-CMYK.pdf -png Unfolded-cover-web-CMYK upload: # --- # upload Paged.js preview to the Varia server scp -r Unfolded.html css js fonts varia:public_html/volumetric-regimes/ uploadimages: # --- # upload the images folder to the Varia server scp -r images varia:public_html/volumetric-regimes/ uploadpdf: # --- # upload interior PDF to the Varia server ./tools/resample Unfolded-interior.pdf 150 scp Unfolded-interior-resampled.pdf varia:public_html/volumetric-regimes/Unfolded.pdf @echo "Uploaded to: https://vvvvvvaria.org/~mb/volumetric-regimes/Unfolded.pdf"