cahiers-de-gutenberg.body.sh
 1	#!/usr/bin/env sh
 2	
 3	
 4	
 5	cat << %
 6	<style>
 7		article{width:min(100%,190ch);max-width:none}
 8		div{display:inline;margin:0}
 9		.row{display:flex;flex-wrap:wrap;align-items:baseline}
10	
11		h3 {display:block}
12	
13		a{display:inline;}
14		/*a[href*="item"]{display:block;}*/
15		details > div{display:grid;margin-left:2ch;grid-template-columns: 0fr 10fr 10ch;}
16		details > div:before{content:'• ';padding-right:1ch;}
17		details > div:has(h3):before{content:'';padding-right:1ch;}
18		div:has(h3){display:none}
19		details > div > div:last-of-type{opacity:.5}
20		details > div:hover > div:last-of-type{opacity:1}
21	
22		a img {display:none}
23	
24		a:after,a:hover:after{content:'' !important}
25	
26		a[href*="search?"]{color:var(--color);text-decoration:none}
27		a[href*="search?"]:after{display:none;content:''}
28	</style>
29	%
30	
31	echo "<ul>"
32	find ~/medias/texte/cahiers-de-gutenberg/issues/ -type f |sort| while read f; do
33		echo "<li><details open><summary>"
34		cat $f | htmlq "title" --text | xargs
35		echo "</summary>"
36		cat $f| htmlq ".row .row" | sed 's	href="	href="https://www.numdam.org	g	'
37		echo "</details></li>"
38		#echo "</ul>"
39	done | sed -E '
40			s	 style=".*"		g
41			s	 class=".*"		g
42			#s	</?div>		g
43			s	</?span>		g
44				/^ *$/d
45			'
46	
47	echo "</ul>"