arthur.bebou

Le site arthur.bebou.netlib.re - retour accueil

git clone git://bebou.netlib.re/arthur.bebou
Log | Files | Refs |

makearticlestsv (506B)


      1 #! /bin/sh
      2 
      3 getattr() {
      4 	grep -m1 "^$1" | cut -d: -f2- | cut -b2-
      5 }
      6 
      7 <<. paste -s -d'	'
      8 sh
      9 html
     10 titre
     11 desc
     12 publication
     13 author
     14 .
     15 
     16 for article in $(find contents -mindepth 2 -name 'index.sh')
     17 do
     18 	dest=$(echo "$article" | sed 's/^contents/public/;s/sh$/html/')
     19 	title=$(< "$article" getattr title:)
     20 	description=$(< "$article" getattr description:)
     21 	publication=$(< "$article" getattr publication:)
     22 	author=$(< "$article" getattr author:)
     23 	echo "$article	$dest	$title	$description	$publication	$author"
     24 done
     25