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.


    Issue importing multiple tasks to Appigo ToDo

    Pythonista
    3
    6
    4340
    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.
    • Jtg7850
      Jtg7850 last edited by

      Hello,
      I'm new to Python so apologies in advance for a newbie question. I would like to create a pythonista program that can copy a list of tasks from my clipboard and pass them to either Appigo ToDo or Reminders.

      The clipboard data may contain:
      Buy lettuce
      Buy laundry detergent
      Buy tomatoes

      The code below appears to function for only the first task in the list stored in the clipboard.

      Does anyone know how I can modify this to work with Appigo Todo? Alternatively, does anyone know if there is a URL scheme to access Reminders?

      Thanks in advance!
      -jtg

      ---code below---
      <pre>import clipboard
      import urllib
      import webbrowser

      todo = 'appigotodo://x-callback-url/import?name='
      text = clipboard.get()
      tasks = text.split('\n')

      for index in range(len(tasks)):
      task = urllib.quote(tasks[index])
      webbrowser.open(todo + task)</pre>

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

        I'm not really familiar with Appigo Todo, so I'm not sure if their URL scheme supports adding multiple todos in one go. What happens in your script is that as soon as you open the first URL, Pythonista exits and Appigo Todo is opened, so the script doesn't continue. That is in general how URL schemes work, you would have to find a way (if possible) to add multiple tasks in <em>one</em> URL.

        There is no URL scheme for Apple's built-in reminders app.

        Btw, there's no need to use the index in your for-loop, just write:

        <pre>for task in tasks:
        ...</pre>

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

          Thank you for the quick response OMZ! This makes sense. I think I'll inquire with Appigo regarding whether it's possible to add multiple tasks in one URL.

          Thanks,
          jtg

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

            Just realized that I had bought Appigo Todo at some point, so I've experimented a little, but it doesn't seem to be possible to add multiple tasks by opening one URL...

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

              OMZ - thanks for trying to look into this further!

              Viticci - thank you for sending that. It's a similar use case and might be worth checking out Due if it supports sequential tasks. Thanks!

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

                Just curious; my understanding is that Reminders is at it's core iCal style calendars. Would it be possible to update entries in Reminders by approaching it that way?

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