A "Post to Forums" workflow for Editorial/Pythonista?
I'd like an action that can post to editorial/Pythonista forums. Any scheme for it? Workarounds?
If not, sounds like a good idea.
I agree, this would be a really nice thing to have. There are two ways I came up with that might work.
First, there's the easy way, which is launching the forums in Safari. You could ideally just encode the title/text into the URL, and you could even have a popup to choose the option in the General/Share Code/Questions menu. The problem is that the forum page doesn't support this. I'm not sure what software is used, or if it's custom. Some forms allow you to do this, though. In fact, you can already choose the popup option here. Try for example https://omz-forums.appspot.com/pythonista/new?category=Questions and you'll see that option already is selected. I tried to replicate it but I'm not sure which conditions dictate when this can and can't be done. The benefit to this option would be that you'd be using the official site and you'd be authenticated in Safari. (Bonus points for passing those parameters through the login page if you're not already logged in)
The second way is basically to build a custom client. This would be the most seamless way to do it, and it could post without ever leaving Pythonista or Editorial. The disadvantage is that you'd be posting blind, i.e. you wouldn't be able to see the website's preview and you'd have to ensure your Markdown was perfect before posting. That's a good reason to do the website redirect. If there was an official API for the forum it would be easier. But it might also open things up to spam if you had the ability to easily automate posts like that.
A third way would be copying the text to the clipboard and just opening the new post URL - it does require pasting it in but it's almost as good as the other options.
Maybe we could get the URL parameter parsing added to the post pages so we could send the title and contents.
That example will suffice for now. I can just do a quick copy to clipboard. I wonder if a little javascriot can find the posting area and the submit button?
You could also open it in the app's built-in browser, but you'd have to authenticate separately. I prefer to keep authentications within Safari whenever possible.
Then, to post, just name your file with the desired title and type out your post. Trigger the workflow and wait for the page to load. Then, run the bookmark and you should see your content filled out.
Thanks Rainman! I might be able to use this with the new Workflow app also.
ClareMacrae last edited by
If you were happy to use the built-in browser to do your post, you could:
- Change the 'Open URL' step in the workflow, to use 'In-App Browser'
- Make sure that the same 'Open URL' step has 'Wait until Loaded' turned on
And I believe this would give you a single step, with no need to set up the JS bookmarklet in Safari.
ClareMacrae last edited by
Thanks Clare and Rainman! Clare, your version is what I was looking for.
zrzka last edited by
I just wrote this workflow to start discussion in Pythonista / Editorial forums.
I will check it out. Thanks!