The purpose of this utility is to extract the list of keys which were used in a certain questoinnaire in FT and have now been copied in MS to other related files.
To collect the necessary data, extract the keys from each XML file.
For each cycle (FT and MS), do the following:
- Change directory to the repository containing the
source
folder.
cd /path/to/common
- Run the script to extract keys from all XML files inside QQ batch folders:
bash /path/to/find-keys-of-duped-items/code/extract_keys.sh
- Rename output files to tag them with the cycle:
# cycle is either 'FT' or 'MS', e.g.
perl-rename 's/^/MS_/' *.txt
perl-rename 's/^/FT_/' *.txt
- Finally, move the keys files for both cycles to
data/keys
in this repo.
Run the following script to extract the keys that have been copied to another QQ file in MS:
python code/find_keys_of_relocated_items.py