Hacker Public Radio

HPR4133: Mastodon as a way to comment to HPR episodes


Listen Later

Mastodon as a way
to comment to HPR episodes
Prompted by Knightwise
  • I should be easier for listeners to discuss shows.
  • There have been several times I have intended to leave a comment on
  • a show, but I forget by the time I get back to my PC
  • Mastodon is made for community interaction.
  • If you are active on mastodon, replying to a mastodon post is
  • probably easier than the HPR comment form.
    HPR Bot
    • HPR has a mastodon bot that makes a post when a new show is
    • released
    • The Bot's post and replies can be used as a comment system for
    • HPR
    • https://botsin.space/@hpr
    • Easy
      Methods to including Mastodon on a static page
      • Each post has an embed link, but it does not include replies.
      • JavaScript can be used to display the post and replies
        • Example
        • https://carlschwan.eu/2020/12/29/adding-comments-to-your-static-blog-with-mastodon/
        • Carl Schwan - KDE developer
        • Neither of these is ideal
        • Mastodon API
          • Mastodon has an API that can be used to pull a list of status
          • updates.
          • The comments can be pulled from the API and added to the static
          • site.
            Proof of concept
            • HPR site using RSS feeds as the data source
            • https://gitlab.com/norrist/hprfeed2db
              • Full episode feed
              • Comments feed.
              • HPR Episodes 3637 and 3654
                • https://hpr.norrist.xyz/episodes/HPR3637.html
                • https://hpr.norrist.xyz/episodes/HPR3654.html
                • Add a new step to pull in the HPR Bot post replies as comments.
                • As a demo https://hpr.norrist.xyz will have mastodon comments on
                • recent episode pages.
                  get_mastodon_comments.py
                  • load_comments_from_bot()
                    • look for status updates regex
                    • "New Episode: hpr(\d+) :: "
                    • get_thread_comments()
                      • builds list of descendants - aka comments
                      • update_db()
                        • loops through list of comments
                        • extracts - author, content, , pubdate, ...
                        • inserts into sqlite database along with data from full episode and
                        • comment feeds.
                        • HTML template displays mastodon comments underneath the comments
                        • from the comment RSS feed.
                          Mastodon Comment Moderation
                          • I didn't implement any moderation, but there are a few possible ways
                          • to do so
                            1. Maintain a list of approved contributors. When an
                            2. unapproved commenter posts
                              • notify the admin that there are comments by a new commenter
                              • skip adding any comments to the database until the commenter is
                              • added to the approve list
                              • Maintain a list of approved comments
                                • comments have unique id
                                • Add approved comment ID to a database
                                • Only display approved comments.
                                • Going Forward
                                  • Even without including mastodon comments on the HPR Page
                                  • Increase awareness of HPR on Mastodon
                                    1. Follow the HPR bot on mastodon.
                                    2. Tag yourself when one of your shows is posted by the HPR.
                                    3. Add your mastodon account to your HPR profile / show notes.
                                    4. Comment on the HPR bots mastodon post.
                                    5. Links
                                      • My mastodon account - https://noc.social/@norrist
                                      • Python to get mastodon comments -
                                      • https://gitlab.com/norrist/hprfeed2db/-/blob/main/get_mastdon_comments.py
                                      • Example page with Mastodon Comments -
                                      • https://hpr.norrist.xyz/episodes/HPR4126.html
                                        • This page may not have any mastodon comments depending on when you
                                        • check the page.
                                        • Check a more recent page if there are no mastodon comments.
                                        • ...more
                                          View all episodesView all episodes
                                          Download on the App Store

                                          Hacker Public RadioBy Hacker Public Radio

                                          • 4.2
                                          • 4.2
                                          • 4.2
                                          • 4.2
                                          • 4.2

                                          4.2

                                          34 ratings


                                          More shows like Hacker Public Radio

                                          View all
                                          The Changelog: Software Development, Open Source by Changelog Media

                                          The Changelog: Software Development, Open Source

                                          289 Listeners

                                          Defensive Security Podcast - Malware, Hacking, Cyber Security & Infosec by Jerry Bell and Andrew Kalat

                                          Defensive Security Podcast - Malware, Hacking, Cyber Security & Infosec

                                          373 Listeners

                                          LINUX Unplugged by Jupiter Broadcasting

                                          LINUX Unplugged

                                          268 Listeners

                                          SANS Internet Stormcenter Daily Cyber Security Podcast (Stormcast) by Johannes B. Ullrich

                                          SANS Internet Stormcenter Daily Cyber Security Podcast (Stormcast)

                                          653 Listeners

                                          Curious Cases by BBC Radio 4

                                          Curious Cases

                                          826 Listeners

                                          The Strong Towns Podcast by Strong Towns

                                          The Strong Towns Podcast

                                          423 Listeners

                                          Late Night Linux by The Late Night Linux Family

                                          Late Night Linux

                                          164 Listeners

                                          Darknet Diaries by Jack Rhysider

                                          Darknet Diaries

                                          8,039 Listeners

                                          Cybersecurity Today by Jim Love

                                          Cybersecurity Today

                                          181 Listeners

                                          CISO Series Podcast by David Spark, Mike Johnson, and Andy Ellis

                                          CISO Series Podcast

                                          189 Listeners

                                          TechCrunch Daily Crunch by TechCrunch

                                          TechCrunch Daily Crunch

                                          42 Listeners

                                          Strict Scrutiny by Crooked Media

                                          Strict Scrutiny

                                          5,809 Listeners

                                          2.5 Admins by The Late Night Linux Family

                                          2.5 Admins

                                          98 Listeners

                                          Cyber Security Headlines by CISO Series

                                          Cyber Security Headlines

                                          138 Listeners

                                          What the Hack? by DeleteMe

                                          What the Hack?

                                          221 Listeners