From 9ee8b220082898123690489bc029f34ae7ef08b2 Mon Sep 17 00:00:00 2001 From: Arnaud Legrand Date: Mon, 25 Mar 2019 10:11:02 +0100 Subject: [PATCH] [HTML] Try to correctly handle links to tgz files. --- bin/pandoc_fixer.pl | 2 ++ module2/ressources/emacs_orgmode.org | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/pandoc_fixer.pl b/bin/pandoc_fixer.pl index 65f05b3..5d37f10 100755 --- a/bin/pandoc_fixer.pl +++ b/bin/pandoc_fixer.pl @@ -31,6 +31,7 @@ my($output_temp) = $output."tmp"; my($input_path)=$input; $input_path =~ s|/[^/]*$||g; my($raw_path) = "https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/raw/master/".$input_path; +my($raw_path_percent) = $raw_path; $raw_path_percent =~ s/^http/%/g; my($tree_path) = "https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/tree/master/".$input_path; my($gitlab_origin)= "https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/blob/master/"; @@ -68,6 +69,7 @@ while(defined(my $line=)) { $line =~ s|img src="%|img src="http|g; $line =~ s|href="http|href="%|g; + $line =~ s|href="([^%][^"]*.tgz)"|href="$raw_path_percent/$1"|g; # ?inline=false $line =~ s|href="([^%][^"]*)"|href="$tree_path/$1"|g; # ?inline=false $line =~ s|href="%|href="http|g; diff --git a/module2/ressources/emacs_orgmode.org b/module2/ressources/emacs_orgmode.org index 77e273d..491044a 100644 --- a/module2/ressources/emacs_orgmode.org +++ b/module2/ressources/emacs_orgmode.org @@ -181,7 +181,7 @@ export FILE_LIST="rr_org/init.el rr_org/journal.org" tar zcf rr_org_archive.tgz $FILE_LIST #+end_src -Download [[https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/blob/master/module2/ressources/rr_org_archive.tgz][this archive]] and uncompress it. It contains the +Download [[file:rr_org_archive.tgz][this archive]] and uncompress it. It contains the following files and we will refer to them in the following: #+begin_src shell :results output :exports results @@ -273,7 +273,7 @@ make -C replicable_article/ all ../replicable_article.tgz #+RESULTS: -Download the following [[https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/replicable_article.tgz][archive]], uncompress it and simply =make= to generate the +Download the following [[file:replicable_article.tgz][archive]], uncompress it and simply =make= to generate the article. You should then be able to open the [[https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/blob/master/module2/ressources/replicable_article/article.pdf][resulting article]]. This is summarized in the following command: #+begin_src sh :results output :exports both -- 2.18.1