From 14a8e33e9c53b155c17cde4b95a275bcd3458c2f Mon Sep 17 00:00:00 2001
From: Arnaud Legrand
TITLE:\(.*\)
TITLE:\1
Date\1
${file%.*}.html" >> index.html || echo "ERROR $file";
+ bin/pandoc_fixer.pl ${file} > ${file}.new;
+ mv ${file}.new ${file};
done
# The next part is broken because pandoc is way too old on this image :(
# - for file in $(find -name "*.org"); do
diff --git a/bin/pandoc_fixer.pl b/bin/pandoc_fixer.pl
new file mode 100755
index 0000000..d6eb187
--- /dev/null
+++ b/bin/pandoc_fixer.pl
@@ -0,0 +1,38 @@
+#!/usr/bin/perl -w
+use strict;
+
+if($#ARGV!=0) {
+ die "Usage: pandox_fixer.pl input.md";
+}
+my($input)=shift(@ARGV);
+if(!($input =~ /.md$/)) {
+ die "Usage: pandox_fixer.pl input.md";
+}
+my($line);
+
+my($gitdate)=`git log $input | grep Date | head -n 1`;
+chomp($gitdate);
+$gitdate =~ s/Date: *//g;
+$gitdate =~ s/\s*\+.*$//g;
+
+
+$input =~ s/.md/.html/;
+
+open INPUT, $input or die;
+
+while(defined($line=)) {
+ $line =~ s|https://gitlab.inria.fr/learninglab/|https://learninglab.gitlabpages.inria.fr/|g; ## Not such a good idea!
+ if($input=~ /_fr.html/) {
+ $line =~ s|
AUTHOR:/) { next; } + print $line; +} + -- 2.18.1