I'm gonna do a silly thing that adds hundreds of posts to the quest board...

Continuing the discussion from Questing the games:

I’m trying to get through all these buckets of things I’ve been tracking, and I’d rather do other stuff than manually (and quit witfully) adding all the things I want to make note of for future reference so… I’m gonna automate this with scripts and stuff.

Here’s how:

  1. Get all the things in a text file
  2. Go through each one of the things and create a new post
  3. Create a link to Wikipedia and hope for the best

So, I have over 800 games in Steam. Gah. But there they are. I can use the SteamAPI to get a list of those, and then I can create a bash script to curl all those into #quest-board. When I create the message, I’ll include a Wikipedia link with the title at the end. That’ll probably work…

Let’s see!

Huh, the first step was easy enough. I had to sign up for a Steam API key, but getting the games was straightforward.


I took the JSON it returned, and ran it through the online converter they recommended at https://json-csv.com/. Normally I’d look up how to do this in a way that was more cool, but I don’t want to waste time. Here are the files:

games-owned.csv (118.5 KB)
games-owned.json.txt (191.6 KB)

I wanted the game details, so I used the following: https://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=XXX&steamid=76561198010211021&format=json&include_appinfo=1&include_played_free_games=1

I didn’t know how to add the &include_appinfo=1&include_played_free_games=1, but that is how. :slight_smile:

Huh… according to my calculations, the script I just ran should be done in about 45 minutes! And then 903 new posts will appear in #quest-board. And they will all point back to this post! So we get to see how Discourse handles that, as well. :slight_smile:

If this works, I share how I did it! I mean, I will either way, but I wanna see, first!

Wow, it might actually work! I can’t believe I got this lucky on the first try!

Well, sorta. Basically, I tested a few post earlier buy using curl to post new topics. That was so straightforward, I decided to just go for it, once I figured out how to loop through a file, in this case one containing the name of an item I have in Steam, on each line. Here is my gameon.sh:

while read -r game; do
    curl -X POST -d title="Discover $game" -d raw="This quest to discover $game was automagically added, as described at http://archive.v1.talkgroup.xyz/t/im-gonna-do-a-silly-thing-that-adds-hundreds-of-posts-to-the-quest-board/1464 ^_^" -d category="21" http://archive.v1.talkgroup.xyz/posts?api_key=XXXXXX&api_username=maiki ; sleep 3 ;
done < "$filename"

And that’s it, really.


1 Like

I didn’t do this part, because I have a lot of expansions and variant editions, and I didn’t want to create a huge number of obviously broken links. My goal is to organize knowledge, not to culture jam the good bits.

This feels like really basic stuff that I missed, because I’ve really only learned what I needed, and not a lot of foundational stuff, in scripting, coding, or system administration.

I know how that sounds, because I’ve spent a good while processing it. See, it is something akin to a toolset. I’ve been keeping notes on something I call an “emotional toolset”, but it works here as well.

See, I didn’t get to do stuff like how most people did. I did it, but often a little later, and a little bit differently. For instance, I didn’t own a computer until I was 22. Prior to that, I only had access to a computer one hour a day at school, and they all hours of the public library when I was kicked out of school for being homeless (yeah, in some ways they really opened the door to an amazing path of technical curiosity, with a lens honed for compassion and punching up instead of down).

And because my childhood circumstances developed an intelligence complex, where I worship intellect while being most afeared of not having it myself, I always surrounded myself by people who could seemingly do anything. I could never keep up, but I still felt like I thrived around them. And if I’m honest, I kinda attract a classic “nerd” type. So I bring social skills to the party, wherever I go!

Anyhow, because I’ve got to train Clover to be like, a good human, I’ve finally found the energy and will to confront myself and get over me. And in the last few years I’ve really thrived by valuing other aspects of myself. It is actually kinda easy to feel special, all you candy asses freaking out because of the world. I don’t like it either, but honestly, every year is like that for me. As I type this, the most insane sound is happening not ten feet away from me. That’s how I roll.

But embracing chaos is a bit like peeking behind the curtain. You start to see where the walls are, and which were cognitive delusions. And suddenly a lot of scaffolding comes together… :slight_smile:

Oh, all the games are uploaded! Yay! Go vote!

I wanted to make an official statement to the effect: I am not endorsing Steam. I think it is a horrible mess of a system, and gamers are fucking themselves by using it. I am doing this as a way to take what little data I actually own from the system, a list of digital artifacts I interacted with.

1 Like

I was thinking about making more elaborate imports, using a CSV with multiple values. I had some issues with IFS, because the titles had lots of characters, so it was difficult to find one to delimit them and get the results I wanted. However! I should have reversed the columns! Make the game titles last, so it picks up everything.

That’s useful: for future mass topic creation I’ll include URLs, and maybe other data, but nothing with strange characters. Also, will be able to add tags, with knowledge from How find tags id to add tags when create topic via API - support - Discourse Meta.

Combined with the XEPs, I posted a lot this month, and it is just getting started!