(Large PR, Ready for final review) Getting rid of Archive.org , Wikiless , Nitter , Invidious cross-references
Created by: ghost
Probably the last super large PR, unavoidable I'm afraid.
Getting rid of Archive.org , Wikiless , Nitter , Invidious (and a few others) cross-references. See #129 (closed).
This should get rid of the remains of word processors (except some tables) and also help in exporting to other formats.
Command used:
gawk -v RS='</sup>|\n' -F ': ' '{sub(/\r$/, "")} FNR==NR {if (NF==2 && $1 ~ /^[[:blank:]]*\[[0-9]+]$/) map[gensub(/^[[:blank:]]+/, "", "1", $1)]=$2; next} match($0, /\[\[[^]]+]](\[[0-9]+])/, a) && a[1] in map {$0 = substr($0, 1, RSTART+RLENGTH-length(a[1])-1) "(" map[a[1]] ")" substr($0, RSTART+RLENGTH)} ORS=RT' file file > result
- Checked through editor (nano).
- Checked through local rendering using Jekyll.
- Double-checked.
- Checked by Pterocles with some fixes
- Added some final touch with some .onion links fixes
Ready for final review
Doing it section by section is not convenient/useful since you'd have to isolate the section AND the references that might be used by other links. Making the whole thing complicated.
Now this is just "checking one by one" instead of "doing it manually"