Open luzpaz opened 6 years ago
yes, I also wrote in the forum that features like autosave would be really nice: https://forum.freecadweb.org/viewtopic.php?f=8&t=23464#p198009
the menu from webtools is already very good, maybe i can merge the two workbenches
still thinking about this project. What have we learned up till now ?
I have this workbench active all the time - no crashes so far :D
but: paths are delivered as unicode and those need to be sanitized for git - if a folder/file contains umlauts this is not good...
Unfortunately I had not much time to work on this project :/
but: paths are delivered as unicode and those need to be sanitized for git - if a folder/file contains umlauts this is not good...
@loooo could you possibly provide some assistance with this issue?
Ah wait, I just looked at the issue... It's easier than you think:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 45, in hookedSaveFunction
File "/home/reox/.FreeCAD/Mod/FreeCAD_GitProject/GitWrapper.py", line 19, in commitchanges
FreeCAD.Console.PrintMessage("{} is not a git repo...\n".format(os.path.dirname(f)))
<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode characters in position 16-17: ordinal not in range(128)
The Issue is that PrintMessage does not like unicode...
If you remove this log line it works fine.
@reox so what you are saying is if FreeCAD.Console.PrintMessage()
could correctly interpret unicode then this feature would work?
It already works; the functionality does not depend on PrintMessage. I'll see if I can fix the log messages.
@luzpaz that wasnt too hard to fix... just use a unicode string. i.e. PrintMessage(u"sdf") works fine.
I also added the ability to create a repo.
Lot of features are still missing though...
can you make a list of TODOs ?
kind of todo list: https://github.com/reox/FreeCAD_gitproject#features
CC @yorikvanhavre
Just thought you'd like to keep your eye on this.
https://github.com/yorikvanhavre/WebTools Specifically: https://github.com/yorikvanhavre/WebTools/blob/master/Git.py