Welcome to Etherbox!
This pad text is synchronized as you type, so that everyone viewing this page sees the same text. Add __NOPUBLISH__ to prevent this pad from being archived.all_index=$(shell ls *.index)
html_for_index=$(all_index:%.index=%.html)
all: index2.html $(html_for_index) gallery
.PHONY: Makefile
Makefile:
etherdump pull --meta --text --dhtml --pub . --no-raw-ext Makefile
# fix tabs in the makefile
sed -i -e 's/^ /\t/g' Makefile
.PHONY: dump
# Dump the etherpad to files
dump:
etherdump pull --meta --text --dhtml --pub . --no-raw-ext
# fix tabs in the makefile
sed -i -e 's/^ /\t/g' Makefile
forcedump:
etherdump pull --force --meta --text --dhtml --pub . --no-raw-ext
# fix tabs in the makefile
sed -i -e 's/^ /\t/g' Makefile
backup:
eb_backup.sh
.PHONY: thumbnails
thumbnails:
makethumbnails.sh /home/pi/www/images/ /home/pi/www/images/thumbnails
.PHONY: gallery
gallery: thumbnails
gallery.py --docbase /home/pi/www/ /home/pi/www/images/ /home/pi/www/images/thumbnails/ /home/pi/www/images/gallery.html
# make the compact (grouped) alternative file index
index2.html: dump
etherdump index \
*.meta.json \
--templatepath /home/pi/www/include \
--template etherdump.template.html \
--title "Etherdump" > index2.html
# Generic rule to transform a markdown pad into HTML using pandoc
# $< is the right part input prereq $@ is the target
#%.html: %.md
# pandoc --from markdown \
# --standalone \
# --section-divs \
# --smart \
# --css style.css \
# --to html5 \
# $< -o $@
# Generic rule for turning foo.index -> foo.html
%.html: %.index dump
includeurls.py < $< --baseurl
http://etherbox.local/pad/p/
| \
pandoc --from markdown \
--table-of-contents \
--to=html5 \
--section-divs \
--standalone \
| \
html5tidy \
--script script.js \
--stylesheet_screen style.css \
--stylesheet_print print.css \
| \
localizeimages.py \
> $@
%.pdf: %.html
html_images_for_print.py --input $< | \
weasyprint - $@
# PDF to Postscript
%.m4.ps: %.m4.pdf
pdftops -paper match $< $@
# Postscript to PDF
%.pdf: %.ps
ps2pdf $< $@
# Ensure a PDF has a multiple of 4 pages
%.m4.pdf: %.pdf
pdftk_utils.py $< pad --multiple 4 --output $@
%.book.ps: %.m4.ps %.m4.pdf
psbook -s`pdftk_utils.py $*.m4.pdf count` $< $@
%.booklet.ps: %.book.ps
psnup -2 -PA4 $< $@