les menus des resto universitaire de l'unistra - retour accueil
Anonyme, en lecture seule : git clone git://bebou.netlib.re/rumenu
Authentifié·e, en écriture : git clone ssh://git@bebou.netlib.re:1459/srv/git/rumenu
Log | Files | Refs | zip | tar.gz |
rumenu2 (746B)
1 #!/bin/sh
2
3 sortie="/tmp/rumenu.html"
4
5 form() {
6 sed '
7 1s/^/<details><summary>/
8 1s/$/<\/summary>/
9 $s/$/<\/details>/
10 '
11 }
12
13 <<fin cat > $sortie
14 <head>
15 <title>RuMenu</title>
16 <meta charset="UTF-8">
17 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
18 <link href="remenu.css" rel="stylesheet" type="text/css" media="all">
19 </head>
20 fin
21
22
23 curl -s https://www.crous-strasbourg.fr/restaurant/resto-u-gallia-2/ | htmlq ".post_title, .menu:first-child" | form >> $sortie
24 curl -s https://www.crous-strasbourg.fr/restaurant/resto-u-esplanade-2/ | htmlq ".post_title, .menu:first-child" | form >> $sortie
25 curl -s https://www.crous-strasbourg.fr/restaurant/resto-u-paul-appell/ | htmlq ".post_title, .menu:first-child" | form >> $sortie
26
27