From 6211cd439fb54749e91876b31b3ab33437986e6b Mon Sep 17 00:00:00 2001 From: Arnaud Legrand Date: Tue, 4 Sep 2018 07:35:14 +0200 Subject: [PATCH] Copy HTML generating Makefile --- module4/ressources/Makefile | 15 +++++++++++++++ module4/ressources/html_png_inliner.pl | 17 +++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 module4/ressources/Makefile create mode 100755 module4/ressources/html_png_inliner.pl diff --git a/module4/ressources/Makefile b/module4/ressources/Makefile new file mode 100644 index 0000000..7b33bb9 --- /dev/null +++ b/module4/ressources/Makefile @@ -0,0 +1,15 @@ +all: resources.html + +NLINES=10000000 + +%.html: %.org + emacs -batch $^ --funcall org-html-export-to-html + sed -i -e 's/
/
  • /g' \ + -e 's/
      /
        /g' $@ + mv $@ $@.bak + html_png_inliner.pl < $@.bak | grep -A $(NLINES) -e '' | grep -B $(NLINES) -e '
        ' | grep -v -e '' -e '
        ' > $@ + rm $@.bak + +clean: + rm -f *~ diff --git a/module4/ressources/html_png_inliner.pl b/module4/ressources/html_png_inliner.pl new file mode 100755 index 0000000..2dcbe1f --- /dev/null +++ b/module4/ressources/html_png_inliner.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl -w +use strict; + +my($line); +while(defined($line=)) { + if($line =~ /^(.*)