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.


    Use IO module to extract clipboard?

    Pythonista
    clipboard rtf rich text
    2
    2
    2115
    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.
    • GospelTheGrey
      GospelTheGrey last edited by

      Hello, I m new to Pythonista but not new to programming. I want to extract URLs from an RTF object I pasted to the clipboard. How, do I get the RTF object into Pythonista? Can I create a file in Pythonista from the clipboard? Or, can I use the IO module to extract the RTF object from the clipboard contents?

      Also, once I get the RTF object into a scripct, is there a module to parse Rich Text?

      Thanks!
      Steven

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

        Your best bet is to create an appex module, which lets you use the share module to open the file.

        You could use pyrtf to read the file, or there are some objc methods that can convert rtf to text.

        it might help if you describe what app you are starting from, and whether you just need text extracted, or care about formatting?

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