• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Digging the digital

  • /Now
  • Nieuw? Start hier
    • Blogroll
    • Tag Index
  • WordPress en Indieweb
    • WordPress en het indieweb
    • Hoe gebruik je IndieAuth met WordPress
    • WordPress en webmentions
    • WordPress en Micropub
    • WordPress en de Post Kind plugin
  • Notities
  • Bookmarks
  • Likes

An update to the Drummer to WordPress script

14 November 2021 by Frank Meeuwsen

A few weeks ago I published a Drumkit script that lets you publish your post from Drummer to WordPress. It works fine, but I had one small bug I needed to fix and one nice-to-have for myself. I can say I fixed both!
First, in the original Drumkit script I have a few lines with HTML in it. When you have an (inline) image in your post, you want it to show properly on your WordPress blog. So I surrounded it with the basic tags for an image. Unfortunately Drummer, where the script lives, mangles this HTML every now and again. It tries to render the HTML when you open the script and it adds a few characters. It was all kind of weird. An to be honest, using HTML in a script like this never felt good to me.
So when I read about Dave’s plans to include Markdown support an idea hit me. My WordPress blog supports Markdown as well. So why not send the blogpost as Markdown and let WordPress figure it all out? So that’s what I did, especially with the images. Instead of using HTML in the script, I surround the image with the Markdown equivalent.
Since I don’t pay enough attention to filenames, they sometimes can have spaces in them. I had to replace these with %20 so my Markdown processor in WordPress will not choke on it. Thank you for multipleReplaceAll in the Drumkit scripting language.
The second thing I wanted is to add a link back from the WordPress post to my Oldschool blog. I had some great help from Dave and Amit to figure out how to build the URL to my post. This script from Amit was all I needed. It just worked. I added the script to mine, build a small link back to the original blogpost and I can publish it.
Here is my new script to publish from Drummer to WordPress, using Markdown and have a link back to the original!

Eerder gepost op mijn Oldschool Drummer blog

Filed Under: bloggen Tagged With: drummer, Script, WordPress

Mentions

  • 💬 Frank Meeuwsen
  • 💬 Aaron Davis

Likes

  • 👍 john

Footer

Wat is dit?

Frank MeeuwsenDigging the Digital is de digital garden of commonplace book van Frank Meeuwsen. Onderwerpen variëren van indieweb tot nieuwsbrieven, bloggen, muziek en opvallende gebeurtenissen op het internet.

Meer Frank

Bloghelden - De definitieve geschiedenis van webloggend Nederland

On this Day

  • 4 years ago...
    • Bookmark: JLOG
  • 6 years ago...
    • Three Feet From God: An Oral History of Nirvana ‘Unplugged’
    • Scratching an itch met setlist.fm
    • Luie zaterdag
    • Meanwhile, in the next millennium…
    • What does product-market fit feel like?
    • Ik heb zojuist weer wat nieuwsbrieven...
    • net.wars: Moral machines
    • Meanwhile, in the next millennium…
  • 12 years ago...
    • De Incredible Leesmap #22
  • 21 years ago...
    • Kicke TV intro’s
    • DateJesus.com
    • Papieren Godzilla
    • Intel Prescott heatsinks the size of small elephants
    • IceCream Kicks
    • Impossible Objects
    • Scholars lecturing on ‘Buffy’
    • En waarom op logt.cc?
    • 1 juni…we zijn er weer!
  • 23 years ago...
    • No spyware, just plain and simple P2P software…

Archives

Copyright © 2025 · DTD Genesis on Genesis Framework · WordPress · Log in