﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	phab_field
6544	Include list of unused data json files in checkrefs.py	Langbart	marder	"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 =||
||~~[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]  ||
||~~[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]  ||
||~~[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]  ||
|| ~~[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]  ||  [26992]  ||

=== Technologies

||= Name =||= Removed from template with =||= Removed from the Game =||
|| ~~[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]  ||
|| ~~[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]  ||
|| ~~[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]  ||



===== shell function
used for finding unlisted data json files in the simulation folder
{{{
#!sh
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
}
}}}

=== related tickets
* #3800 (4/Mar/16)"	enhancement	closed	If Time Permits	Alpha 26	Simulation	fixed			Phab:D4663 Phab:D4725
