gftools
gftools copied to clipboard
[wish] Refactor, move more advanced logic from `bin` scripts to Lib
@m4rc1e @felipesanches
GFTools is a collection of somewhat random scripts. Many of them are useful, but above all, many of them contain code that could be useful for other purposes. As an example, gftools-udhr.py contains a useful parser for UDHR XMLs, and it’d be good to move the classes to a separate module in the lib, and make the CLI tool very shallow.
For example, the classes could be in https://github.com/googlefonts/gftools/tree/main/Lib/gftools/udhr.py
and the script could just import that (for backwards compatibility, it could do from gftools.udhr import *
) and then do very minimal logic. Well, in fact that particular script does not really have any CLI stuff at all :)
What do you think?
sounds good
Agreed.
The fix scripts already have their own module, https://github.com/googlefonts/gftools/blob/main/Lib/gftools/fix.py
Fixed by #638.