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.


    Taskpaper & add project and task workflow

    Editorial
    3
    4
    3584
    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.
    • Beginner101
      Beginner101 last edited by

      Hi community.

      Need to pick your brains again.

      Trying to make a workflow for searching for a project name in a taskpaper document.
      if project name already exists - add a new task under it (THAT part I have covered...)
      if project name does not exist, move to end of document, add empty line, add project, empty line, add task (that is the 'driving me nuts' part :( ).

      here my workflow so far:
      http://www.editorial-workflows.com/workflow/5848635073888256/esJq8J99gPk

      the part after the 'end if' is actually just testing garbage.

      tried 'move caret' to end of document + 'replace selected text' with the two variables as input.

      tried 'select range' then 'move caret'+ 1, then 'replace selected text'.

      now I tried that script which is currently in the workflow.

      result of all my attempts: the new project name is never inserted and the new task is always inserted at the 2nd character in the existing document.

      if 'project' name exists, then everything is fine. new task is added right after the existing project name.

      final target is to have a WorkflowIOS workflow trigger this editorial workflow with handing over a section name (=project) and a book title (=task) to this editorial workflow.
      if section (i.e. scifi) exists, then add the new book there, if section not exist, then add new section at end of document and add book under it.

      THANKS a lot for any help! :)

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

        Some thing like this?

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

          @Beginner101 I hope this helps:

          http://www.editorial-workflows.com/workflow/5826510824931328/wwLMkefMzm4

          Note that I used a regular expression for searching, so it should work even if the section title appears somewhere else in your document. The section title in the document must end with a colon, but you don't have to include it in the text input dialog.

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

            Hello both of you.

            THANKS a lot for your time and input.
            Going to use your suggestions to build that workflow I have in mind.

            regards.

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