Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Flashcard script
-
Find here a script for creating and viewing a set of flashcards using ui. As soon as I figure out how (help, help), I'll upload the views. Thanks to omz for an incredible programming environment for iOS.
-
You can open the
.pyui
files in the Pythonista editor as text files from the console:import editor editor.open_file('foo.pyui')
From there you can use the action menu to export it. Be sure that the
.pyui
file isn't already open in the view editor, it won't open in the text editor in this case.Or you can directly open it in another app (e.g. save it to Dropbox) via the
console.open_in()
function:import console console.open_in('foo.pyui')
-
For your first suggestion, the export action is not present in this situation.
-
I would highly recommend that you use PackUI to create a single file that contains both the .py and .pyui files into a single file that you can then store on GitHub. PackUI is discussed here.
-
Used Git commit to get the files up. Will try PackUI at some point. See my question regard multiple pyui files.
-
For your first suggestion, the export action is not present in this situation.
You're right. Should have checked ;) But the custom actions are present, as you have noticed.
-
Please note that I tried to build a zip file with some pictures in the desired hierarchy. Too big. I will put up a "test builder" to create a test set real soon now. Its easy enough using shellista and wget to roll your own. Just create 'ASL' folder in you root directory, and create subfolders in there with appropriate names and populate these with picture files. You can change the "base" folder to whatever/wherever you like. Also note new repository. It includes my original hydrogen based gui version.
-
There is now a script, make_asl_dir.py to build a simple test "book" for demo purposes.
-
When I download and try to run these files into the directory
<documents path>/UI/Flashcards_UI/
then things do not work as expected becausemake_asl_dir.py
creates<documents path>/UI/Flashcards_UI/ASL
butFlashcard_UI.py
is looking for<documents path>/ASL
.Putting
root_doc_dir = os.path.dirname(__file__)
on line 253 ofFlashcard_UI.py
makes the both scripts use the same<documents path>/UI/Flashcards_UI/ASL
. -
I've posted a short video on YouTube describing pythonista and this program in specific
-
I have posted a new version of the flashcard program. <br><br>o - the chapter chooser data source is now defined by a class and allows dynamic modification of individual cells. <br>o - when a flashcard is displayed, its chapter is highlighted in red. <br>o - the ASL directory (the main "book") resides in the same folder as the script.<br><br>There are two additional scripts. One to build a test "book" and one to download a book from a suitable webserver and create the "book" in the current folder.