There is this great tool for collaborative writing and version control, using github-like mechanism: https://www.penflip.com/
My question is: does anyone have an idea how to put Editorial to work with git? Is there any simple solution to download and push files to git repo using python?
Thanks in advance!
JonB last edited by
Not sure if editorial has a console? If so, you should be able to use shellista, which is a bash like shell, and includes git commands.
Thanks for this clue. Editorial has a console, but there seems to be some differences in paths between Editorial and Pythonista. When running Shellista I get this output for every module it tries to download and install:
Requires dulwich ... attempting to download. Downloading to "dulwich.tar.gz" untar: /private/var/mobile/Applications/86CD7929-9C33-474D-B8E7-A0B5F1D6F660/Library/Application: No such file ! Skipping: Not found - /private/var/mobile/Applications/86CD7929-9C33-474D-B8E7-A0B5F1D6F660/Library/Application ! Skipping: Not found - Support/Commands/.shellista_tmp/dulwich.tar mv: dulwich/*/dulwich: No such file Error importing dulwich, continuing without.
Is there a way to make it compatible with Editorial?
peterh86 last edited by
Penflip sounds just what I need.
Yes, the folder structure in Editorial is different to Pythonista. You can find it out by running short scripts in the console scratchpad; use
os. .... Though this might not help with your problem.
JonB last edited by
_import_optional, you will see
This needs to point to someplace writable.
I suspect the default editorial path is under Library, and is not writable.
What does os.path.expanduser('~') return?
os.chdir('../../../Documents')before the do_mkdir.(or whatever it takes to get to Documents.. Might need to play around with os.chdir and os.curdir, and os.listdir.)
Also, inside Shell init:
self._bash.env_vars['$HOME'] = os.path.expanduser('~/Documents')
Your should this to point to the Editorial Documents folder, which I'm guessing might be
self._bash.env_vars['$HOME'] = os.path.expanduser('~/../../../Documents')
If you get it working, be sure to post back, or post a pull request or issue into the repo. we can try to add some kind of detection into shellista to detect editorial vs pythonista,etc.
Thanks for all the clues. I've been trying to figure it out but my knowledge of python and iOS file system is too limited. Maybe someone smarter will be able to make this work. Integrating penflip with Editorial would be really great.