Closed ghost closed 2 years ago
Does what it's supposed to. LGTM. I'm checking links before approving.
Please @dan-kir and @NobodySpecial256 , have a review at this as it modifies the entire document and simplifies it. And makes the document 1300 lines shorter. I'm certain we will have significant less issues with exporting to PDF after getting rid of all non numbered end-notes of type, leaving only the actual references [^number]
. Now the credit doesn't go to me. I made some initial regexes and a basic sed commands without success. Someone from StackOverFlow changed it to awk and then to gawk which had to be updated to the latest version (Ubuntu 22.04 install, easy with Windows WSL). And then it took like 3 hours to finally reach the "right command", even for that cool person. But in the end. It's done. This would have taken weeks by hand.
Appendix B6 isn't in master yet.
I know, working on it
Cool. Actually, it is, just not the ToC.
All should be okay now
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.
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
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"