From 4a435bf8ae0e9f009346d89ebc424d8884f33cea Mon Sep 17 00:00:00 2001 From: dvs1 Date: Wed, 22 Jan 2025 21:01:59 +1000 Subject: Replace cmark-gfm and lcmark with luamark. Plus YAR, yet another rewrite. --- SuckItPm | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'SuckItPm') diff --git a/SuckItPm b/SuckItPm index a7c1321..fe7efb3 100755 --- a/SuckItPm +++ b/SuckItPm @@ -17,12 +17,9 @@ find /opt/pmwiki/wiki.d ${filter} \ do base=`echo "${line}" | cut -d '.' -f 1` file=`echo "${line}" | cut -d '.' -f 2` -# page="?n=${line}" mkdir -p PmWiki/$base mkdir -p combined/$base echo "Converting ${URL}/?n=${base}.${file}?action=print -> PmWiki/${base}/${file}.md" -# pandoc -f html -t markdown --self-contained ${URL}/?n=${base}.${file} >PmWiki/${base}/${file}.md - # TODO - try curl, to see what is actually downloaded, and maybe not download unchanged pages. curl to .HTM # Doesn't help with redownloads, coz natch a dynamic site isn't cached. But I can at least comment out the curl command during testing to save time. # curl --no-progress-meter ${URL}/?n=${base}.${file}?action=markdown -o PmWiki/${base}/${file}.MD curl --no-progress-meter ${URL}/?n=${base}.${file}?action=print -o PmWiki/${base}/${file}.HTM @@ -45,11 +42,9 @@ do -e "s/class='vspace'//g" \ -e "s/class='wikilink'//g" \ -e "s/style='.*;'//g" -# -e "s/style='background-color: #.*;'//g" \ -# -e "s/style='font-size: .*;'//g" - pandoc -f html -t commonmark_x --self-contained PmWiki//${base}/${file}.HTM >PmWiki/${base}/${file}.md # pandoc -f markdown -t commonmark_x --self-contained PmWiki//${base}/${file}.MD >PmWiki/${base}/${file}.md + pandoc -f html -t commonmark_x --self-contained PmWiki//${base}/${file}.HTM >PmWiki/${base}/${file}.md cp PmWiki/${base}/${file}.md PmWiki/${base}/${file}.md_ORIGINAL # Attempt to clean things up, badly. @@ -68,10 +63,6 @@ do # Don't need this, the parts we are grabbing already include that link at the bottom. # echo -e "****\n[Original page](${URL}/${base}/${page}) where maybe you can edit it." >> PmWiki/${base}/${file}.md - -# pandoc -t html -f commonmark_x --self-contained PmWiki/${base}/${file}.md > PmWiki/${base}/${file}.htm -# cmark-gfm -t html -e footnotes -e table -e strikethrough PmWiki/${base}/${file}.md > PmWiki/${base}/${file}.body -# ln -frs PmWiki/${base}/${file}.body combined/${base}/${file}.body ln -frs PmWiki/${base}/${file}.md combined/${base}/${file}.md if [ -f xx01 ]; then -- cgit v1.1