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.
Best Way To Handle Markdown File Of Links
-
I have a file (bloglinks.md) with links to all my blog posts in. (I'm OK with maintaining it manually as part of my posting workflow.)
The point of it is to make it easier to link from one blog post to another by embedding links to previous posts.
What would be the best way of popping up a list of these links - showing the title not the URL - so I could inject a link or several into the blog post I'm working on?
Happy to build a script. But wondering if I need to.
Preference would be to have such a pop up list not obscure the line of text I'm working on.
-
Your blog maintains this list of titles and urls for you... The following snippet uses bs4, requests, etc. to create two local files:
Martin_Packer_blog.json
contains an OrderedDict of title, url for your 390 blog entries in reverse chronological order.Martin_Packer_blog.md
contains markdown for a numbered list of titles that are hyperlinks to the corresponding urls.
-
Thanks for this, @ccc. This automates creating a file with the links in - presumably in Markdown form. It's going to be useful to me.
But the other bit of it is how to make the list more useful than just being a Markdown file. I'd like to e.g. pop it up in a scrolling list and pick one or two of the entries for inclusion at the cursor.
-
This works in Pythonista but probably needs modification to work in Editorial.