icontool.py is a simple tool which can be used to automatically add/remove icons and sort appfilter.xml links in alphabetical order.
icontool [-m] [-h]
add (a) svg component name
link (l) svg component name
remove (r) component [-d]Adding the flag -m will generate a list item (depending on the subcommand) that looks like this:
* App Name (component info)
python3 icontool.py add /path/to/icon com.app.app/com.app.app.appActivity "App Name"The .svg extension for icon.svg is optional, since the program automatically adds them.
python3 icontool.py link icon com.app.app/com.app.app.appActivity "App Name"Note that icon.svg should be an SVG file located in the svgs/ directory. The .svg extension for icon.svg is optional as well.
python3 icontool.py remove com.app.app/com.app.app.appActivitypython3 icontool.py remove com.app.appSimply pass the -d or --delete flag:
python3 icontool.py remove com.app.app -dNote that the SVG file's name is based on the drawable attribute of the first <item> element.