Include list of unused data json files in checkrefs.py
Having fewer files to translate is good. To find unused files automatically, it should be integrated into the python script checkrefs.py
.
Aura
Technologies
shell function
used for finding unlisted data json files in the simulation folder
function unusedJSON {
CURRENT_DIR=$(pwd)
cd ~/0ad/binaries/data/mods/public/simulation/data/auras || return 1
printf "\e[1;97mList unused Auras:\e[0m\n"
for a in $(find . -name "*.json" | sed 's|./||;s|.json||'); do
if [[ $(grep --include=\*.xml -rw ~/0ad/binaries/data/mods/public/simulation -e "$a" | wc -c) -eq 0 ]]; then
echo "$a"
fi
done
cd ~/0ad/binaries/data/mods/public/simulation/data/technologies || return 1
printf "\e[1;97m\nList unused Technologies:\e[0m\n"
for t in $(find . -name "*.json" | xargs grep -Le 'autoResearch.*true' | sed 's|./||;s|.json||'); do
if [[ $(grep --include={*.xml,test_Researcher.js,pair_unlock*.json} -rw ~/0ad/binaries/data/mods/public/simulation -e "$t" | wc -c) -eq 0 ]]; then
echo "$t"
fi
done
cd "${CURRENT_DIR}" || return 1
}
Change History
(10)
Owner: |
set to marder
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Description: |
modified (diff)
|
Priority: |
Should Have → If Time Permits
|
Resolution: |
fixed
|
Status: |
closed → reopened
|
Summary: |
List of unused data json files → Include list of unused data json files in checkrefs.py
|
Type: |
defect → enhancement
|
Patch: |
Phab:D4663 → Phab:D4663 Phab:D4725
|
Description: |
modified (diff)
|
Resolution: |
→ fixed
|
Status: |
reopened → closed
|
Description: |
modified (diff)
|
Nice findings. I suppose they should be reported by checkrefs -u