Taken from https://raw.githubusercontent.com/cerg2010cerg2010/texttoolkit/master/cdg.py and add a small fix to get current dir for project path instead of '/your/project/path'
Comming from https://github.com/whatacold/texttoolkit fork https://raw.githubusercontent.com/cerg2010cerg2010/texttoolkit/master/cdg.py