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.


    A Simple Workflow?

    Editorial
    2
    3
    2332
    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.
    • Denrael
      Denrael last edited by

      I'm hoping this might be out there already, or one of the Python or Grep experts can point me in the right direction. I am looking to add a newline to the end of every line of text in a document. That is all it has to do. I would like to make this a workflow as it is something I do often with articles copied from a web page for reference.

      Thoughts or ideas?
      Thanks

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

        Double spacing a piece of single spaced text can executed in Python by:

        text = '\n\n'.join(text.splitlines())
        
        1 Reply Last reply Reply Quote 0
        • Denrael
          Denrael last edited by

          @ccc said:

          text = '\n\n'.join(text.splitlines())

          Thanks! That worked perfectly in my workflow.

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