Use IO module to extract clipboard?
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?
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?