Compare commits

...

3 commits

Author SHA1 Message Date
d2615eb021
add plaintext information 2025-02-03 14:20:10 +01:00
6c1cb67b50
add new projects 2025-02-02 19:40:23 +01:00
a6c95ed07d
simplify awk commands, remove org generation 2024-12-08 02:01:10 +01:00
5 changed files with 51 additions and 44 deletions

View file

@ -30,7 +30,6 @@ target="www"
defaultLang="fr" defaultLang="fr"
header="header.html" header="header.html"
footer="footer.html" footer="footer.html"
org=0
testDocker=0 testDocker=0
################################################################################ ################################################################################
@ -54,7 +53,6 @@ Les options suivantes seront codées dans un futur proche :
fr par défaut fr par défaut
-n génère la langue dans le nom du fichier et non dans le chemin -n génère la langue dans le nom du fichier et non dans le chemin
(example.org/fr/index.html -> example.org/index.fr.html) (example.org/fr/index.html -> example.org/index.fr.html)
-o génère les fichiers org
EOF EOF
} }
@ -69,9 +67,6 @@ fi
while [ -n "$1" ] while [ -n "$1" ]
do do
case $1 in case $1 in
"-o") # génération des fichiers org
org=1
;;
"-c") # on nettoie les fichiers "-c") # on nettoie les fichiers
# TODO si on précise un dossier, nettoyer ce dossier # TODO si on précise un dossier, nettoyer ce dossier
echo "Nettoyage de $target" echo "Nettoyage de $target"
@ -97,7 +92,7 @@ do
done done
############################################################################### ###############################################################################
# Génère un fichier header propre à une langue # Génère un fichier header temporaire propre à une langue
# #
# $1 : le chemin vers le fichier header.link # $1 : le chemin vers le fichier header.link
############################################################################### ###############################################################################
@ -111,26 +106,16 @@ function generate_header {
FS = ":" FS = ":"
code = 0 code = 0
} }
{ /^%endlinks%$/ { code = 0 }
if ($0 ~ /^%links%$/) { code == 1 && ! /^#/ {
code = 1 gsub(/ $/, "", $1); gsub(/^ /, "", $2)
next print " <a href=\""$1"\">"$2"</a>"
} else if ($0 ~ /^%endlinks%$/) { }
code = 0 /^%links%$/ { code = 1 }
} ' $1 >> $tmpHeader
if (code && $1 !~ /^#/) {
gsub(/ $/, "", $1); gsub(/^ /, "", $2)
print " <a href=\""$1"\">"$2"</a>"
}
}' $1 >> $tmpHeader
echo -e " </div>\n" >> $tmpHeader echo -e " </div>\n" >> $tmpHeader
} }
if [ $testDocker -eq 1 ] if [ $testDocker -eq 1 ]
then then
docker build . --tag site && echo -e \ docker build . --tag site && echo -e \
@ -245,29 +230,17 @@ cp -t $target -r $annexes
echo "Generate default index page..." echo "Generate default index page..."
cp $target/$defaultLang/index.html $target cp $target/$defaultLang/index.html $target
for c in $(awk 'BEGIN {
FS = "\n"; # on récupère les numéros des lignes à modifier
code = 0 for c in $(awk 'BEGIN { code = 0 }
} /\/div/ { code = 0 }
{ code == 1 { print NR }
if ($0 ~ /id="header-links"/) { /id="header-links"/ { code = 1 }
code = 1 ' $target/index.html)
next
} else if ($0 ~ /\/div/) {
code = 0
} if (code) {
print NR
}
}' $target/index.html)
do do
sed -i -e "$c s/href=\"/href=\"$defaultLang\//" $target/index.html sed -i -e "$c s/href=\"/href=\"$defaultLang\//" $target/index.html
done done
echo "Link Links (lul)" #echo "Link Links (lul)"
ln -s $pathLinks $target #ln -s $pathLinks $target
if [ $org -eq 1 ]
then
echo "Generate org files..."
#emacs -u $USER --script publish.el
fi

View file

@ -86,6 +86,14 @@ rel="stylesheet" href="/css/projets.css"
<td><a href="https://ilearned.eu/comprendre-licences.html">Comprendre les différentes licences</a></td> <td><a href="https://ilearned.eu/comprendre-licences.html">Comprendre les différentes licences</a></td>
<td><a href="https://ilearned.eu/about.html#licence">CC-BY-NC-SA</a></td> <td><a href="https://ilearned.eu/about.html#licence">CC-BY-NC-SA</a></td>
</tr> </tr>
<tr>
<td><a href="https://github.com/sueszli/notionBackup">notionBackup</a></td>
<td>export Notion pages into HTML pages</td>
<td>Python</td>
<td>sueszli</td>
<td><a href="https://github.com/sueszli/notionBackup/commit/efbb9a442d4da36684ede8b262d770ccdf006f05">efbb9a4</a></td>
<td><a href="https://github.com/sueszli/notionBackup/blob/main/LICENSE">GNU AGPL v3</a></td>
</tr>
<tr> <tr>
<td><a href="https://github.com/orgalan/">Orgalan</a></td> <td><a href="https://github.com/orgalan/">Orgalan</a></td>
<td>Organization with some tools to manage LAN, plane mirror</td> <td>Organization with some tools to manage LAN, plane mirror</td>
@ -118,6 +126,14 @@ rel="stylesheet" href="/css/projets.css"
<td><a href="https://github.com/pentoo/pentoo-overlay/commit/eeb881ae4d115adb80b1b80e9d5b1d9488b3cd74">liblnk</a></td> <td><a href="https://github.com/pentoo/pentoo-overlay/commit/eeb881ae4d115adb80b1b80e9d5b1d9488b3cd74">liblnk</a></td>
<td>GNU GPL v2</td> <td>GNU GPL v2</td>
</tr> </tr>
<tr>
<td><a href="https://github.com/pwndbg/pwndbg.github.io">pwndbg.github.io</a></td>
<td>Web site of pwndbg</td>
<td>Astro</td>
<td>pwndbg community</td>
<td><a href="https://github.com/pwndbg/pwndbg.github.io/commit/4a34553e014b7e9f7bcc9959c89bd5f77f9d20d5">4a34553</a></td>
<td>None</td>
</tr>
<tr> <tr>
<td><a href="https://github.com/mantisbt-plugins/source-integration">source-integration</a></td> <td><a href="https://github.com/mantisbt-plugins/source-integration">source-integration</a></td>
<td>MantisBT plugin to add commits coming from Git servers.</td> <td>MantisBT plugin to add commits coming from Git servers.</td>

View file

@ -38,6 +38,7 @@
<p>cf. previous section</p> <p>cf. previous section</p>
<hr /> <hr />
<h3>Mail</h3> <h3>Mail</h3>
<p>If possible, write a <a href="https://useplaintext.email/">plain text</a> email.</p>
<ul> <ul>
<li>rick [at] gnous [dot] eu</li> <li>rick [at] gnous [dot] eu</li>
</ul> </ul>

View file

@ -38,6 +38,7 @@
<p>cf. section précédente</p> <p>cf. section précédente</p>
<hr /> <hr />
<h3>Mail</h3> <h3>Mail</h3>
<p>Si possible, au format <a href="https://useplaintext.email/">texte simple</a> (lien en anglais).</p>
<ul> <ul>
<li>rick [at] gnous [dot] eu</li> <li>rick [at] gnous [dot] eu</li>
</ul> </ul>

View file

@ -86,6 +86,14 @@ rel="stylesheet" href="/css/projets.css"
<td><a href="https://ilearned.eu/comprendre-licences.html">Comprendre les différentes licences</a></td> <td><a href="https://ilearned.eu/comprendre-licences.html">Comprendre les différentes licences</a></td>
<td><a href="https://ilearned.eu/about.html#licence">CC-BY-NC-SA</a></td> <td><a href="https://ilearned.eu/about.html#licence">CC-BY-NC-SA</a></td>
</tr> </tr>
<tr>
<td><a href="https://github.com/sueszli/notionBackup">notionBackup</a></td>
<td>exporter les pages Notion en pages HTML</td>
<td>Python</td>
<td>sueszli</td>
<td><a href="https://github.com/sueszli/notionBackup/commit/efbb9a442d4da36684ede8b262d770ccdf006f05">efbb9a4</a></td>
<td><a href="https://github.com/sueszli/notionBackup/blob/main/LICENSE">GNU AGPL v3</a></td>
</tr>
<tr> <tr>
<td><a href="https://github.com/orgalan/">Orgalan</a></td> <td><a href="https://github.com/orgalan/">Orgalan</a></td>
<td>Organisation contenant du code pour gérer des LANs, miroir de plane</td> <td>Organisation contenant du code pour gérer des LANs, miroir de plane</td>
@ -118,6 +126,14 @@ rel="stylesheet" href="/css/projets.css"
<td><a href="https://github.com/pentoo/pentoo-overlay/commit/eeb881ae4d115adb80b1b80e9d5b1d9488b3cd74">liblnk</a></td> <td><a href="https://github.com/pentoo/pentoo-overlay/commit/eeb881ae4d115adb80b1b80e9d5b1d9488b3cd74">liblnk</a></td>
<td>GNU GPL v2</td> <td>GNU GPL v2</td>
</tr> </tr>
<tr>
<td><a href="https://github.com/pwndbg/pwndbg.github.io">pwndbg.github.io</a></td>
<td>Site web de pwndbg</td>
<td>Astro</td>
<td>Communauté pwndbg</td>
<td><a href="https://github.com/pwndbg/pwndbg.github.io/commit/4a34553e014b7e9f7bcc9959c89bd5f77f9d20d5">4a34553</a></td>
<td>Aucune</td>
</tr>
<tr> <tr>
<td><a href="https://github.com/mantisbt-plugins/source-integration">source-integration</a></td> <td><a href="https://github.com/mantisbt-plugins/source-integration">source-integration</a></td>
<td>Plugin MantisBT pour ajouter les commits venant de serveurs Git</td> <td>Plugin MantisBT pour ajouter les commits venant de serveurs Git</td>