Closed cdrini closed 3 years ago
Full table for reference:
@cdrini I would like to work on this issue.
Here are the db results:
pv ol_dump_2020-10-31.txt.gz | zcat | grep -i -E '\{\{(AlertChanges|AlertTour|AllPagination|AuthorEditRow|EditionCount|EditionEditRow|EnrollUsergroup|FormatExpiry2|FullTextCount|GoButton|HasFulltext|HelpWikilanguage|MergeHistory|ModifyTemplate|MostRecent|MostRecentHome|NavigationDev|QueryCarousel|RowButtons|SponsorCarousel|UniqueIPcount|databarMerge|databari18n|miframe)' > ~/macro_matches.txt
for macro in AlertChanges AlertTour AllPagination AuthorEditRow EditionCount EditionEditRow EnrollUsergroup FormatExpiry2 FullTextCount GoButton HasFulltext HelpWikilanguage MergeHistory ModifyTemplate MostRecent MostRecentHome NavigationDev QueryCarousel RowButtons SponsorCarousel UniqueIPcount databarMerge databari18n miframe; do echo "$macro | $(grep -i -F $macro ~/macro_matches.txt | cut -f2 | tr '\n' ' ')"; done
Awesome, thank you @Yashs911 ! Anything with "None" in both columns should be deleteable :)
I will also start deleting the files :D
Ah, my apologies @ArunTeltia ! That's my bad, I didn't realize you wanted to work on it as well 🙇
No Problem I will look into other issues :D @cdrini
There are a lot of macros which are no longer used. Lets delete them.
Here are the macros without any usages in the repo:
(Determined with this command:
for f in *.html; do echo "$f | \`$(grep --exclude-dir=.idea --exclude-dir=.vs --exclude-dir=.git --exclude-dir=build --exclude-dir=node_modules --exclude-dir=vendor --exclude-dir= venv --exclude-dir=venv-py3 --exclude-dir=coverage -F ${f/.html/} -l -r ../.. | sed 's:../..::' | tr '\n' ' ')\`"; done
)Since macros can also be used on regular pages in openlibrary (e.g.
{{AlertChanges(...)}}
), need to check there as well.(Note: This will only test for singly unused macros; it won't catch a cluster of interdependent unused macros.)
Stakeholder
@ArunTeltia