<?xml version='1.0' encoding='utf-8' ?>

<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>Ordinary Day</title>
  <link>https://annathepiper.dreamwidth.org/</link>
  <description>Ordinary Day - Dreamwidth Studios</description>
  <lastBuildDate>Sat, 25 Nov 2023 10:05:44 GMT</lastBuildDate>
  <generator>LiveJournal / Dreamwidth Studios</generator>
  <lj:journal>annathepiper</lj:journal>
  <lj:journaltype>personal</lj:journaltype>
  <image>
    <url>https://v2.dreamwidth.org/417218/143160</url>
    <title>Ordinary Day</title>
    <link>https://annathepiper.dreamwidth.org/</link>
    <width>100</width>
    <height>100</height>
  </image>

<item>
  <guid isPermaLink='true'>https://annathepiper.dreamwidth.org/2044093.html</guid>
  <pubDate>Sat, 25 Nov 2023 10:05:44 GMT</pubDate>
  <title>Gallery restoration status at 70 percent</title>
  <link>https://annathepiper.dreamwidth.org/2044093.html</link>
  <description>&lt;p&gt;I spent a good chunk of today trying to figure out if I could automate some of the work of rebuilding my galleries. Answer: yes, though it took some research to learn how to do!&lt;/p&gt;



&lt;p&gt;Because here&amp;#8217;s the thing y&amp;#8217;all: I had several elements in place that would allow for at least &lt;em&gt;some&lt;/em&gt; of the restoration work to be done in a scripted fashion rather than manually.&lt;/p&gt;



&lt;p&gt;Namely:&lt;/p&gt;



&lt;ol&gt;
&lt;li&gt;A known directory structure&lt;/li&gt;



&lt;li&gt;One or more screenshot files in each directory in the structure&lt;/li&gt;



&lt;li&gt;A known file called metadata.json in each directory, which contained the metadata for all of the screenshots in the same directory, and which contained a known structure that I should be able to parse&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;And here&amp;#8217;s the process I&amp;#8217;ve been following to rebuild the galleries:&lt;/p&gt;



&lt;ol&gt;
&lt;li&gt;Work my way forward in chronological order through the broken galleries&lt;/li&gt;



&lt;li&gt;For each one, find the corresponding directory on the server&lt;/li&gt;



&lt;li&gt;Manually import each screenshot in that directory into the WordPress media library&lt;/li&gt;



&lt;li&gt;Review contents of metadata.json, and copy and paste all of the relevant data out of that file onto the files added to the media library&lt;/li&gt;



&lt;li&gt;Using the FileBird plugin, create a new folder in the media library to contain the added files&lt;/li&gt;



&lt;li&gt;Using the FooGallery plugin, create a new gallery using the files in the new FileBird folder&lt;/li&gt;



&lt;li&gt;Add the newly created gallery to the relevant album of galleries, and remove the broken one&lt;/li&gt;



&lt;li&gt;Update the gallery shortcode in the relevant playthrough post from the broken gallery to the new replacement&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;So, a lot of steps here, right?&lt;/p&gt;



&lt;p&gt;The problem I wanted to solve was automating steps 3 and 4, because the most time-consuming part of this process has been adding hundreds and hundreds of files into my media library, and copy and pasting the metadata in for them. (And as a reminder: these files weren&amp;#8217;t in the media library already, because the broken galleries had been previously reading all the relevant files and data right off the server file structure. Since I can&amp;#8217;t do that now, I have to pull all of this stuff directly into the WordPress media library.)&lt;/p&gt;



&lt;p&gt;And solving this problem required doing these major things:&lt;/p&gt;



&lt;ol&gt;
&lt;li&gt;Installing &lt;a href=&quot;https://make.wordpress.org/cli/handbook/guides/installing/&quot;&gt;wp-cli&lt;/a&gt;, the command line tool for managing WordPress installations&lt;/li&gt;



&lt;li&gt;Learning how to use the &lt;a href=&quot;https://developer.wordpress.org/cli/commands/media/import/&quot;&gt;wp media import&lt;/a&gt; command, including how to make it work with a multi-site installation, which is what I have; Anna Plays Skyrim is part of a multi-site WordPress network&lt;/li&gt;



&lt;li&gt;Learning how to use &lt;a href=&quot;https://manpages.org/jq&quot;&gt;jq&lt;/a&gt;, which is a command line JSON parser&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;I threw some threads out on Mastodon today on the WordPress hashtag, asking for recommendations on how to accomplish what I wanted to do. So now I have a two-command solution to do steps 3 and 4 above, like so.&lt;/p&gt;



&lt;p&gt;For step 3, I&amp;#8217;m running this scary-looking thing which basically chugs through metadata.json in the current working directory, and spits out a full &amp;#8220;wp media import&amp;#8221; command for every file covered in the JSON file. Then it saves that list into temp.sh.&lt;/p&gt;



&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;jq -r &apos;.items&amp;#91;] | @sh &quot;wp media import \(.file) --caption=\(.caption) --title=\(.caption) --desc=\(.description) --alt=\(.alt) --url=https://skyrim.annathepiper.org/&quot;&apos; metadata.json &amp;gt; temp.sh&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Then I need to run those commands:&lt;/p&gt;



&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;sh temp.sh&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Lastly, I pop into the media library and confirm that:&lt;/p&gt;



&lt;ol&gt;
&lt;li&gt;All the files in the working directory now appear in the media library&lt;/li&gt;



&lt;li&gt;All the metadata on the files is correct (and I&amp;#8217;m correcting typos where I spot them)&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;Then I can proceed to making the FileBird directories and the new galleries.&lt;/p&gt;



&lt;p&gt;So this is still taking some effort; it&amp;#8217;s not just a matter of doing a mass import of the entire directory structure. Which I&amp;#8217;m actually okay with, on the grounds that having to go through each directory &lt;em&gt;is&lt;/em&gt; letting me doublecheck that the files and their metadata are getting imported okay. &lt;em&gt;And&lt;/em&gt; look for any typos I want to fix as well.&lt;/p&gt;



&lt;p&gt;As of this writing, I&amp;#8217;m now at about 70 percent complete on the restoration effort. The &lt;a href=&quot;https://skyrim.annathepiper.org/faanshi-playthrough/&quot; data-type=&quot;page&quot; data-id=&quot;30942&quot;&gt;Faanshi Playthrough&lt;/a&gt; and &lt;a href=&quot;https://skyrim.annathepiper.org/shenner-playthrough/&quot; data-type=&quot;page&quot; data-id=&quot;31002&quot;&gt;Shenner Playthrough&lt;/a&gt; galleries are now done.&lt;/p&gt;



&lt;p&gt;Galleries now in active progress of being fixed are the ones for Gyllerah, Tembriel, Harrowhark, and Kendis.&lt;/p&gt;



&lt;p&gt;More on this tomorrow. And thanks to everybody on Mastodon who offered advice!&lt;/p&gt;
&lt;p style=&quot;text-align: right&quot;&gt;&lt;small&gt;Read more on &lt;a href=&quot;https://skyrim.annathepiper.org/2023/11/25/gallery-restoration-status-at-70-percent/&quot; title=&quot;Read original post.&quot;&gt;Anna Plays Skyrim&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=annathepiper&amp;ditemid=2044093&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://annathepiper.dreamwidth.org/2044093.html</comments>
  <category>screenshots</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://annathepiper.dreamwidth.org/2043385.html</guid>
  <pubDate>Wed, 22 Nov 2023 06:36:10 GMT</pubDate>
  <title>Ysani&amp;#8217;s screenshots now restored</title>
  <link>https://annathepiper.dreamwidth.org/2043385.html</link>
  <description>&lt;p&gt;Gallery reconstruction work continues on Anna Plays Skryim, and now &lt;a href=&quot;https://skyrim.annathepiper.org/screenshots/ysani-demers-screenshots/&quot; data-type=&quot;page&quot; data-id=&quot;30728&quot;&gt;all galleries&lt;/a&gt; for &lt;a href=&quot;https://skyrim.annathepiper.org/ysani-playthrough/&quot; data-type=&quot;page&quot; data-id=&quot;29324&quot;&gt;Ysani&amp;#8217;s playthrough&lt;/a&gt; have been restored.&lt;/p&gt;



&lt;p&gt;I currently have 576 total galleries (because BOY HOWDY do I have a lot of screenshots for Skyrim, as well as Morrowind, Oblivion, and ESO). Of these, 227 are now confirmed functional. (Alarrah&amp;#8217;s galleries never broke as I had never converted hers over to the gallery type I lost access to, but I&amp;#8217;m counting hers in this count.)&lt;/p&gt;



&lt;p&gt;Which means my galleries currently stand at about 40 percent restored.&lt;/p&gt;



&lt;p&gt;For the time being I&amp;#8217;m putting a pause on playing anything else, while I focus on restoring all these galleries and &lt;em&gt;then&lt;/em&gt; working on writing backlogged posts. So it&amp;#8217;ll be probably at least another week or so before I put up new content. Stand by, y&amp;#8217;all!&lt;/p&gt;



&lt;p&gt;The next round of updates will start working on three playthroughs at once, Faanshi&amp;#8217;s, Shenner&amp;#8217;s, and Tembriel&amp;#8217;s. Because I&amp;#8217;m working my way forward in chronological order through all the galleries as previously created, just because that seems the most orderly way to me to proceed.&lt;/p&gt;



&lt;p&gt;And oh yes, one more aspect of interest to this:&lt;/p&gt;



&lt;p&gt;When I started converting the impacted galleries back to the gallery type that pulls directly out of the WordPress media library, I had a non-zero level of worry that I&amp;#8217;d repro the same problem that broke the galleries back in the middle of Delga&amp;#8217;s playthrough. That issue was basically causing older galleries to lose track of their assigned screenshots.&lt;/p&gt;



&lt;p&gt;I was worried, once I made it into Delga&amp;#8217;s screenshots, that I&amp;#8217;d repro that same issue. But as of this post I&amp;#8217;ve just finished Ysani&amp;#8217;s restoration, and I&amp;#8217;m now well past the point (in terms of number of active galleries) at which the previous issue showed up.&lt;/p&gt;



&lt;p&gt;So &lt;em&gt;so far&lt;/em&gt; it looks like I&amp;#8217;ll no longer reproduce the issue, which is good. Though I&amp;#8217;m still a little nervous about this because I don&amp;#8217;t know &lt;em&gt;what caused the issue in the first place&lt;/em&gt;. And as a person whose career is software testing, a problem I don&amp;#8217;t have a root cause for always makes me nervous.&lt;/p&gt;



&lt;p&gt;Any number of things could have fixed it, though. Because all of these apply since the original problem occurred:&lt;/p&gt;



&lt;ul&gt;
&lt;li&gt;We had a change in internet provider&lt;/li&gt;



&lt;li&gt;Operating system updates on the server&lt;/li&gt;



&lt;li&gt;Multiple updates to WordPress&lt;/li&gt;



&lt;li&gt;Multiple updates to the FooGallery code&lt;/li&gt;



&lt;li&gt;I just installed a plugin called FileBird to help me manage the media library for this site, because I have a few thousand screenshots at this point and this makes for a very large and unwieldy library to manage without some help&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;Any one of these, or any combination of these, could have stabilized things enough that I no longer reproduce the earlier issue. What&amp;#8217;ll &lt;em&gt;also&lt;/em&gt; be interesting is whether a &lt;em&gt;different&lt;/em&gt; issue I&amp;#8217;ve been seeing on the site lately starts reproducing again&amp;#8211;where galleries on older posts would render badly and I&amp;#8217;d have to clear the site&amp;#8217;s cached CSS data to make them work again.&lt;/p&gt;



&lt;p&gt;Let&amp;#8217;s hope things stay stable, anyway! Onward!&lt;/p&gt;
&lt;p style=&quot;text-align: right&quot;&gt;&lt;small&gt;Read more on &lt;a href=&quot;https://skyrim.annathepiper.org/2023/11/21/ysanis-screenshots-now-restored/&quot; title=&quot;Read original post.&quot;&gt;Anna Plays Skyrim&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=annathepiper&amp;ditemid=2043385&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://annathepiper.dreamwidth.org/2043385.html</comments>
  <category>screenshots</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://annathepiper.dreamwidth.org/1961258.html</guid>
  <pubDate>Sat, 27 Aug 2022 08:19:07 GMT</pubDate>
  <title>How to Get Screenshots off a Steam Deck</title>
  <link>https://annathepiper.dreamwidth.org/1961258.html</link>
  <description>&lt;p&gt;We interrupt my regular playthrough posts with this important news bulletin:&lt;/p&gt;



&lt;p&gt;I FINALLY GOT MY STEAM DECK YOU GUYS! 😍 🤩 &lt;/p&gt;



&lt;p&gt;I&amp;#8217;tm about to do TWO posts about this. One with general overall impressions of the thing, and also &lt;em&gt;this&lt;/em&gt; post, which is going to be about the hoops I had to jump through in order to get at the screenshots I love to take for my playthrough posts. This did, I feel, deserve a whole separate post because it&amp;#8217;s one of the few things I &lt;em&gt;don&amp;#8217;t&lt;/em&gt; like about the Deck so far. And I wanted to write up the steps I followed for my workaround, in case any other gamers out there also finally getting Decks want to do the same thing.&lt;/p&gt;



&lt;p&gt;This is going to be long, so here&amp;#8217;s a More tag, y&amp;#8217;all:&lt;/p&gt;



&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://annathepiper.dreamwidth.org/1961258.html#cutid1&quot;&gt;Read the rest of this entry &amp;raquo;&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;p style=&quot;text-align: right&quot;&gt;&lt;small&gt;Mirrored from &lt;a href=&quot;https://skyrim.annathepiper.org/2022/08/27/how-to-get-screenshots-off-a-steam-deck/&quot; title=&quot;Read original post.&quot;&gt;Anna Plays Skyrim&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=annathepiper&amp;ditemid=1961258&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://annathepiper.dreamwidth.org/1961258.html</comments>
  <category>steam deck</category>
  <category>screenshots</category>
  <category>warpinator</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
</channel>
</rss>
