omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    3
    11
    3959
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SpotlightKid
      SpotlightKid last edited by

      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')
      
      1 Reply Last reply Reply Quote 0
      • polymerchm
        polymerchm last edited by

        For your first suggestion, the export action is not present in this situation.

        1 Reply Last reply Reply Quote 0
        • ccc
          ccc last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • polymerchm
            polymerchm last edited by

            Used Git commit to get the files up. Will try PackUI at some point. See my question regard multiple pyui files.

            1 Reply Last reply Reply Quote 0
            • SpotlightKid
              SpotlightKid last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • polymerchm
                polymerchm last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • polymerchm
                  polymerchm last edited by

                  There is now a script, make_asl_dir.py to build a simple test "book" for demo purposes.

                  1 Reply Last reply Reply Quote 0
                  • ccc
                    ccc last edited by

                    When I download and try to run these files into the directory <documents path>/UI/Flashcards_UI/ then things do not work as expected because make_asl_dir.py creates <documents path>/UI/Flashcards_UI/ASL but Flashcard_UI.py is looking for <documents path>/ASL.

                    Putting root_doc_dir = os.path.dirname(__file__) on line 253 of Flashcard_UI.py makes the both scripts use the same <documents path>/UI/Flashcards_UI/ASL.

                    1 Reply Last reply Reply Quote 0
                    • polymerchm
                      polymerchm last edited by

                      I've posted a short video on YouTube describing pythonista and this program in specific

                      1 Reply Last reply Reply Quote 0
                      • polymerchm
                        polymerchm last edited by

                        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.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB Forums | Contributors