hello,
je sais pas si ça t'aide mais pour un projet de polar j'ai un script qui concatène les fichiers .txt avant de générer un epub
#a script to concatenate dokuwiki text files in a single file
#hint: exclude dw concat page start.txt and 1st page, so the epub generator works well
cat $(ls *.txt | grep -v start.txt | grep -v 00aaatitle.txt) > ../all.txt
#putz previous/next
replace '[<>]' '' -- ../all.txt