xctemplateutils provides a list of useful command line programs that helps ease the pain of manually dealing with messy .xctemplate files.
- Install
pip install xctemplateutils
- Generate and for element
generate_xctemplate.py -d <folder_name>
For example, suppose you have MagicalRecord copied into a subfolder MagicalRecord/ of your .xctemplate folder @ MyXCTemplate.xctemplate/MagicalRecord. You can:
cd MyXCTemplate.xctemplate; generate_xctemplate.py -d MagicalRecord
- Generate for element
generate_xctemplate.py -n <folder_name>
Once you verify the output, you can simply copy-and-paste the output into the respective and elements in your .xctemplate file to customize them.