Opened 2 years ago
Last modified 23 months ago
#6544 closed enhancement
Include list of unused data json files in checkrefs.py — at Version 4
Reported by: | Langbart | Owned by: | marder |
---|---|---|---|
Priority: | If Time Permits | Milestone: | Alpha 26 |
Component: | Simulation | Keywords: | |
Cc: | Patch: | Phab:D4663 |
Description (last modified by )
Having fewer files to translate is good. To find unused files automatically, it should be integrated into the python script checkrefs.py
.
Aura
Name | Removed from template with | Removed from the Game |
---|---|---|
[25561] | [26900] | |
unused in the main game | [26900] | |
[26898] | [26900] |
Technologies
Name | Removed from template with | Removed from the Game |
---|---|---|
| unused in the main game | [26900] |
| unused in the main game | [26900] |
| [26469] | [26900] |
han_hero_wei_qing_3.json | [26980] |
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" | grep -oe '[A-Za-z0-9_].*' | sed 's|.json||'); do if [[ $(grep --include=\*.xml -rnw ~/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' | grep -oe '[A-Za-z0-9_].*' | sed 's|.json||'); do if [[ $(grep --include={*.xml,test_Researcher.js,pair_unlock*.json} -rnw ~/0ad/binaries/data/mods/public/simulation -e "$t" | wc -c) -eq 0 ]]; then echo "$t" fi done cd "${CURRENT_DIR}" || return 1 }
related tickets
- #3800 (4/Mar/16)
Change History (4)
comment:1 by , 2 years ago
comment:3 by , 2 years ago
Patch: | → Phab:D4663 |
---|
comment:4 by , 23 months ago
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 |
- Adding a new unused json file from [26980]
- The ticket should only be closed if the
checkrefs.py
script can find these files.
Note:
See TracTickets
for help on using tickets.
Nice findings. I suppose they should be reported by checkrefs -u