Changes between Initial Version and Version 4 of Ticket #6544


Ignore:
Timestamp:
Jun 24, 2022, 5:16:24 PM (22 months ago)
Author:
Langbart
Comment:
  • Adding a new unused json file from [26980]
  • The ticket should only be closed if the checkrefs.py script can find these files.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6544

    • Property Status newreopened
    • Property Type defectenhancement
    • Property Summary List of unused data json filesInclude list of unused data json files in checkrefs.py
    • Property Priority Should HaveIf Time Permits
    • Property Owner set to marder
    • Property PatchPhab:D4663
  • Ticket #6544 – Description

    initial v4  
     1Having fewer files to translate is good. To find unused files automatically, it should be integrated into the python script `checkrefs.py`.
     2
    13=== Aura
    24
    3 ||= Name =||= Removed from template with =||
    4 ||[https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/auras/structures/rotary_mill.json structures/rotary_mill]||  [25561]  ||
    5 ||[https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/auras/units/han_minister_cost.json units/han_minister_cost]||  unused in the main game  ||
    6 ||[https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/auras/units/elephant_worker.json units/elephant_worker]||  [26898]  ||
     5||= Name =||= Removed from template with =||= Removed from the Game =||
     6||~~[https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/auras/structures/rotary_mill.json structures/rotary_mill]~~||  [25561]  ||  [26900]  ||
     7||~~[https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/auras/units/han_minister_cost.json units/han_minister_cost]~~||  unused in the main game  ||  [26900]  ||
     8||~~[https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/auras/units/elephant_worker.json units/elephant_worker]~~||  [26898]  ||  [26900]  ||
    79
    810=== Technologies
    911
    10 ||= Name =||= Removed from template with =||
    11 || [https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/technologies/upgrade_rank_advanced_crossbow.json upgrade_rank_advanced_crossbow] ||  unused in the main game  ||
    12 || [https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/technologies/upgrade_rank_elite_crossbow.json upgrade_rank_elite_crossbow] ||  unused in the main game  ||
    13 || [https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/technologies/pair_unlock_arrows_type.json pair_unlock_arrows_type] ||  [26469]  ||
     12||= Name =||= Removed from template with =||= Removed from the Game =||
     13|| ~~[https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/technologies/upgrade_rank_advanced_crossbow.json upgrade_rank_advanced_crossbow]~~ ||  unused in the main game  ||  [26900]  ||
     14|| ~~[https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/technologies/upgrade_rank_elite_crossbow.json upgrade_rank_elite_crossbow]~~ ||  unused in the main game  ||  [26900]  ||
     15|| ~~[https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/technologies/pair_unlock_arrows_type.json pair_unlock_arrows_type]~~ ||  [26469]  ||  [26900]  ||
     16|| [https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/data/auras/units/heroes/han_hero_wei_qing_3.json han_hero_wei_qing_3.json] ||  [26980]  ||    ||
     17
     18
    1419
    1520===== shell function
     
    1722{{{
    1823#!sh
    19 function dataU {
     24function unusedJSON {
    2025  CURRENT_DIR=$(pwd)
    21   cd ~/0ad/binaries/data/mods/public/simulation/data/auras
    22   echo "\e[1;97mList unused Auras:\e[0m"
     26  cd ~/0ad/binaries/data/mods/public/simulation/data/auras || return 1
     27  printf "\e[1;97mList unused Auras:\e[0m\n"
    2328  for a in $(find . -name "*.json" | grep -oe '[A-Za-z0-9_].*' | sed 's|.json||'); do
    24     if [[ $(grep --include=\*.xml -rnw ~/0ad/binaries/data/mods/public/simulation -e $a | wc -c) -eq 0 ]]; then
     29    if [[ $(grep --include=\*.xml -rnw ~/0ad/binaries/data/mods/public/simulation -e "$a" | wc -c) -eq 0 ]]; then
    2530      echo "$a"
    2631    fi
    2732  done
    28   cd ~/0ad/binaries/data/mods/public/simulation/data/technologies
    29   echo "\e[1;97m\nList unused Technologies:\e[0m"
     33  cd ~/0ad/binaries/data/mods/public/simulation/data/technologies || return 1
     34  printf "\e[1;97m\nList unused Technologies:\e[0m\n"
    3035  for t in $(find . -name "*.json" | xargs grep -Le 'autoResearch.*true' | grep -oe '[A-Za-z0-9_].*' | sed 's|.json||'); do
    31     if [[ $(grep --include={*.xml,*.js} -rnw ~/0ad/binaries/data/mods/public/simulation -e $t | wc -c) -eq 0 ]]; then
     36    if [[ $(grep --include={*.xml,test_Researcher.js,pair_unlock*.json} -rnw ~/0ad/binaries/data/mods/public/simulation -e "$t" | wc -c) -eq 0 ]]; then
    3237      echo "$t"
    3338    fi
    3439  done
    35   cd "${CURRENT_DIR}"
     40  cd "${CURRENT_DIR}" || return 1
    3641}
    3742}}}