Posts tagged 'silos'

“Boost your post.” “Publish a post.”

Facebook, you sound desperate and pushy.

Syndicating Audio Posts with WNYC's Audiogram Generator

I publish a few different podcasts and often find myself advertising new episodes by syndicating new posts to various social media silos.

Sadly, few social media services consider audio to be "a thing", despite often having robust support for video.

I'm certainly not the first person to notice this, and the fine folks at WNYC have taken this audio sharing problem head-on.

Enter the Audiogram Generator, an open source project that runs on NodeJS and uses FFMPEG to take samples from your audio files and munge them into short videos for sharing on social networks.

Here's a quick rundown of how I got the Audiogram Generator running on my macOS laptop using Docker.

I use Homebrew, so first I installed docker and docker-machine and created a new default machine:

  brew install docker docker-machine
  docker-machine create -d virtualbox default

Once that finished, I set my environment variables so the docker command line utility can talk to this machine:

eval $(docker-machine env)

Next, it was time to download the source for the audiogram generator from GitHub and build the Docker container for it:

  git clone https://github.com/nypublicradio/audiogram.git
  cd audiogram
  docker build -t audiogram .

Finally, I could run it:

  docker run -p 8888:8888 -t -i audiogram
  npm start

Once up, I pointed my browser at http://192.168.99.100:8888/ and I saw pretty much the interface that you see in the screenshot above.

The basic usage steps are:

  • Choose an audio file
  • Choose a template
    • Templates w/ images are hardcoded into the app, so if you want to use them with your own images you'll have to make changes to the source.
  • Choose a selection of the audio that is less than 300 seconds long
  • Add any text if the template requires it
  • Generate!
  • Download
  • Upload to silos!

I made a sample post to my own site using a selection of an interview and then syndicated that post by uploading the same video to MastodonTwitter, and Facebook.

I don't yet know exactly how I'll choose what portions to share on each silo, what text and links to accompany them to encourage folks to listen to the full episodes, and so on. There are also some quirks to learn. For example, Twitter has a maximum length of 2:20 for videos, and its cropping tool would glitch out and reset to defaults unless I stopped it "near" the end.

Thankfully, there is a very detailed Audiogram Generator usage doc with lots of examples and guidelines for making attention-getting posts.

For the near term I want to play with the tool to see what kinds of results I can make. Long-term I think this would be a really neat addition to my Screech tool, which is designed for posting audio to your own website.

How do you feel about audiograms? I'd love to hear other folks' thoughts!

🔖 Bookmarked http://idlewords.com/talks/notes_from_an_emergency.htm
Notes From An Emergency

“Silicon Valley brings us the worst of two economic systems: the inefficiency of a command economy coupled with the remorselessness of laissez-faire liberalism.”

“Silicon Valley brings us the worst of two economic systems: the inefficiency of a command economy coupled with the remorselessness of laissez-faire liberalism.”

Site Updates: Importing Old Posts, Disqus Comments

Jonathan Prozzi and I have challenged one another to make a post about improving our websites once a week. Here’s mine!

Back in 2008 I started a new blog on Wordpress. It seemed like a good idea! Maybe I would post some useful things and someone would offer me a job! I wanted to allow discussion without the dangers of letting strangers submit data directly to my server, so I set up the JavaScript-based Disqus comments service. I made a few posts per year and it eventually tapered off and I largely forgot about it.

In February 2011 I participated in the Thing-a-Day project on Posterous. It was the first time in a long time that I had published consistently, so when it was announced that Posterous was going away, I worked hard to grab my content and stored it somewhere.

Eventually it was November 2013, Wordpress was "out", static site generators were "in", and I wanted to give Octopress a try. I used Octopress' tools to import all my Wordpress content into Octopress, forgot about adding back the Disqus comments, and posted it all back online. In February 2014, I decided to resurrect my Posterous content, so I created posts for it and got everything looking nice enough.

In 2015 I learned about the IndieWeb, and decided it was time for a new approach to my identity and content online. I set up a new site at https://martymcgui.re/ based on Jekyll (hey! static sites are still "in"!) and got to work adding IndieWeb features.

Well, today I decided to get some of that old content off my other domain and into my official one. Thankfully, with Octopress being based on Jekyll, it was mostly just a matter of copying over the files in the _posts/ folder. A few tweaks to a few posts to make up for newer parsing in Jekyll, my somewhat odd URL structure, etc., and I was good to go!

"Owning" My Disqus Comments

Though I had long ago considered them lost, I noticed that some of my old posts had a section that the Octopress importer had added to the metadata of my posts from Wordpress:

meta:
  _edit_last: '1'
  _wp_old_slug: makerbot-cam-1-wiring
  dsq_thread_id: '604226727'

All of my Wordpress posts had this dsq_thread_id value, and that got me thinking. Could I export the old Disqus comment data and find a way to display it on my site? (Spoiler alert: yes I could).

Disqus actually has a export feature: https://disqus.com/admin/discussions/export/

You can request a compressed XML file containing all of your comment data, organized hierarchically into "category" (which I think can be configured per-site), "thread" (individual pages), and "post" (the actual comments), and includes info such as author name and email, the date it was created, the comment message with some whitelisted HTML for formatting and links, whether the comment was identified as spam or has been deleted, etc.

The XML format was making me queasy, and Jekyll data files often come in YAML format for editability, so I did the laziest XML to YAML transform possible, thanks to some Ruby and this StackOverflow post.

require 'active_support/core_ext/hash/conversions'
require 'yaml'
file = File.open("disqus_export.xml", "r")
hash = Hash.from_xml(file.read)
yaml = hash.to_yaml
File.open("disqus.yml", "w") { |file| file.write(yaml) }

This resulted in a YAML formatted file that looked like:

---
disqus:
  xmlns: http://disqus.com
  xmlns:dsq: http://disqus.com/disqus-internals
  xmlns:xsi: http://www.w3.org/2001/XMLSchema-instance
  xsi:schemaLocation: http://disqus.com/api/schemas/1.0/disqus.xsd http://disqus.com/api/schemas/1.0/disqus-internals.xsd
  category:
    dsq:id: ...
    forum: ...
    ...
  ...

I dropped this into my Jekyll site as _data/disqus.yml, and ... that's it! I could now access the content from my templates in site.data.disqus.

I wrote a short template snippet that, if the post has a "meta" property with a "dsq_thread_id", to look in site.data.disqus.disqus.post and collect all Disqus comments where "thread.dsq:id" was the same as the "dsq_thread_id" for the post. If there are comments there, they're displayed in a "Comments" section on the page.

So now some of my oldest posts have some of their discussion back after more than 7 years!

Here's an example post: https://martymcgui.re/2010/02/16/000000/

Example of old Disqus comments on display.

I was (pleasantly) surprised to be able to recover and consolidate this older content. Thanks to past me for keeping good backups, and to Disqus for still being around and offering a comprehensive export.

As a bonus, since all of the comments include the commenter's email address, I could give them avatars with Gravatar, and (though they have no URL to link to) they would almost look right at home alongside the more modern mentions I display on my site.

Update: Yep, added Gravatars.

Old Disqus comments now with avatars by Gravatar