Commit 548469b4 authored by Arnaud Legrand's avatar Arnaud Legrand

Remove all html generated files (from the 1st edition) and automate org -> markdown generation

parent a5fc7359
ressources-md:
for i in module1/ressources module2/ressources module3/ressources \
module4/ressources; do \
make -C $$i; \
done
%.md: %.org
pandoc -f org -t markdown_github -o $@ $^
# %.html: %.org
# emacs -batch $^ --funcall org-html-export-to-html
# sed -i -e 's/<pre /<pre style="padding-left: 30px; background-color: #f6f8fa;" /g' \
# -e 's/<li>/<li style="margin-bottom:0;">/g' \
# -e 's/<ul>/<ul style="margin:0 0;">/g' $@
# mv $@ $@.bak
# html_png_inliner.pl < $@.bak | grep -A $(NLINES) -e '<body>' | grep -B $(NLINES) -e '<div id="postamble" class="status">' | grep -v -e '<body>' -e '<div id="postamble" class="status">' > $@
# rm $@.bak
clean:
rm -f *~
all: introduction_to_markdown.html all: introduction_to_markdown.md
include ../../Makefile.ressources
NLINES=10000000
%.html: %.org
emacs -batch $^ --funcall org-html-export-to-html
sed -i -e 's/<pre /<pre style="padding-left: 30px; background-color: #f6f8fa;" /g' \
-e 's/<li>/<li style="margin-bottom:0;">/g' \
-e 's/<ul>/<ul style="margin:0 0;">/g' $@
mv $@ $@.bak
cat $@.bak | grep -A $(NLINES) -e '<body>' | grep -B $(NLINES) -e '<div id="postamble" class="status">' | grep -v -e '<body>' -e '<div id="postamble" class="status">' > $@
rm $@.bak
This diff is collapsed.
all: gitlab.html emacs_orgmode.html jupyter.html rstudio.html maintaining_a_journal.html all: emacs_orgmode.md jupyter.md maintaining_a_journal.md gitlab.md gitlab_fr.md rstudio.md rstudio_fr.md video_examples/README.md
NLINES=10000000 include ../../Makefile.ressources
%.html: %.org
emacs -batch $^ --funcall org-html-export-to-html
sed -i -e 's/<pre /<pre style="padding-left: 30px; background-color: #f6f8fa;" /g' \
-e 's/<li>/<li style="margin-bottom:0;">/g' \
-e 's/<ul>/<ul style="margin:0 0;">/g' $@
mv $@ $@.bak
html_png_inliner.pl < $@.bak | grep -A $(NLINES) -e '<body>' | grep -B $(NLINES) -e '<div id="postamble" class="status">' | grep -v -e '<body>' -e '<div id="postamble" class="status">' > $@
rm $@.bak
clean:
rm -f *~
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
all:
include ../../Makefile.ressources
all: resources_refs.html resources_environment.html exo1.html exo2.html exo3.html all: resources_refs.md resources_environment.md resources_refs_fr.md resources_environment_fr.md # exo1.html exo2.html exo3.html
NLINES=10000000 include ../../Makefile.ressources
%.html: %.org
emacs -batch $^ --funcall org-html-export-to-html
sed -i -e 's/<pre /<pre style="padding-left: 30px; background-color: #f6f8fa;" /g' \
-e 's/<li>/<li style="margin-bottom:0;">/g' \
-e 's/<ul>/<ul style="margin:0 0;">/g' $@
mv $@ $@.bak
html_png_inliner.pl < $@.bak | grep -A $(NLINES) -e '<body>' | grep -B $(NLINES) -e '<div id="postamble" class="status">' | grep -v -e '<body>' -e '<div id="postamble" class="status">' > $@
rm $@.bak
clean:
rm -f *~
#!/usr/bin/perl -w
use strict;
my($line);
while(defined($line=<STDIN>)) {
if($line =~ /^(.*)<img *src="([^"]*)"(.*)$/g) {
my($pre,$image,$post) = ($1,$2,$3);
$image =~ s|file://||;
# print "$image\n";
my $base64=`base64 -w 0 $image`;
my $format=$image;
$format =~ s/.*\.//g;
print $pre."<img src=\"data:image/$format;base64,".$base64.'"'.$post;
} else {
print $line;
}
}
This diff is collapsed.
...@@ -6,6 +6,19 @@ ...@@ -6,6 +6,19 @@
#+OPTIONS: num:nil toc:t #+OPTIONS: num:nil toc:t
#+PROPERTY: header-args :eval never-export #+PROPERTY: header-args :eval never-export
* Table of Contents :TOC:
- [[#getting-information-about-your-git-repository][Getting information about your Git repository]]
- [[#getting-information-about-python3-libraries][Getting information about Python(3) libraries]]
- [[#getting-information-about-your-system][Getting information about your system]]
- [[#getting-the-list-of-installed-packages-and-their-version][Getting the list of installed packages and their version]]
- [[#how-to-list-imported-modules][How to list imported modules?]]
- [[#saving-and-restoring-an-environment-with-pip][Saving and restoring an environment with pip]]
- [[#installing-a-new-package-or-a-specific-version][Installing a new package or a specific version]]
- [[#getting-information-about-r-libraries][Getting information about R libraries]]
- [[#getting-the-list-imported-modules-and-their-version][Getting the list imported modules and their version]]
- [[#getting-the-list-of-installed-packages-and-their-version-1][Getting the list of installed packages and their version]]
- [[#installing-a-new-package-or-a-specific-version-1][Installing a new package or a specific version]]
* Getting information about your Git repository * Getting information about your Git repository
When taking notes, it may be difficult to remember which version of When taking notes, it may be difficult to remember which version of
the code or of a file was used. This is what version control is useful the code or of a file was used. This is what version control is useful
......
...@@ -6,10 +6,18 @@ ...@@ -6,10 +6,18 @@
#+OPTIONS: num:nil toc:t #+OPTIONS: num:nil toc:t
#+PROPERTY: header-args :eval never-export #+PROPERTY: header-args :eval never-export
* Table des matières * Table des matières :TOC:
- Obtenir des informations sur votre dépôt Git - [[#obtenir-des-informations-sur-votre-dépôt-git][Obtenir des informations sur votre dépôt Git]]
- Obtenir des informations sur les librairies Python 3 - [[#obtenir-des-informations-sur-les-librairies-python-3][Obtenir des informations sur les librairies Python 3]]
- Obtenir des informations sur les packages R - [[#obtenir-des-informations-sur-votre-système][Obtenir des informations sur votre système]]
- [[#lister-les-packages-installés-et-leur-version][Lister les packages installés et leur version]]
- [[#lister-les-packages-importés-chargés-dans-une-session-python-et-leur-version][Lister les packages importés (chargés dans une session Python) et leur version]]
- [[#sauvegarder-et-restaurer-un-environnement-avec-pip][Sauvegarder et restaurer un environnement avec pip]]
- [[#installer-un-nouveau-package-ou-une-version-spécifique][Installer un nouveau package ou une version spécifique]]
- [[#obtenir-des-informations-sur-les-packages-r][Obtenir des informations sur les packages R]]
- [[#lister-les-packages-installés-et-leur-version-1][Lister les packages installés et leur version]]
- [[#lister-les-packages-importés-chargés-dans-une-session-r-et-leur-version][Lister les packages importés (chargés dans une session R) et leur version]]
- [[#installer-un-nouveau-package-ou-une-version-spécifique-1][Installer un nouveau package ou une version spécifique]]
* Obtenir des informations sur votre dépôt Git * Obtenir des informations sur votre dépôt Git
Lorsqu'on prend des notes, il peut être difficile de se rappeler Lorsqu'on prend des notes, il peut être difficile de se rappeler
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment