Stormblood [4.0]: Post may contain potential spoilers.

Kugane Castle

Lets see. I think two more screenshots till I hop on over to the next zone. I do need a to space it out appropiately to where I can hit the 300 mark at the last zone of this expansion. Oh yeah, something great to hear is that I finally fixed my flipping scripts. I can now go back to the sweet luxury knowing that I no longer have to touch anything other than uploading and moving files around. Atleast till something breaks again. (which is bound to happen) However! Its “nearly” foolproof this time. Just a slight bug exists with the script at this time. Which you know could outright destroy my previous posts and all. You know what Lets show my two scripts that handle my posts now.

Code Stuff

picconvert.sh

#!/bin/bash

cd /home/somename/solitem/static/ffxivscreenshots

today=$(date +%-d)

sinceStart=$(ls -lv | egrep -o [0-9]+ |tail -1)

days=$(( $sinceStart + 1 ))

file=$(find -type f -name "* $today *")

mv "$file" ffxivscreenshotaday$days.png

cwebp -q 90 ffxivscreenshotaday$days.png -o ffxivscreenshotaday$days.webp
cwebp ffxivscreenshotaday$days.png -o ffxivscreenshotaday"$days"cover.webp

cd /home/somename/solitem

hugo new SSadPosts/SSaDFFXIV$days.md

expansion="Stormblood [4.0]"

cd /home/somename/solitem/content/SSadPosts

sed -i "s/###/$days/g;s/Expansion/$expansion/g" SSaDFFXIV$days.md

postUpdate.sh

#!/bin/bash

# Moves to appropiate directory and builds website

cd /home/somename/solitem/completedPosts

days=$(ls -lv |egrep -o [0-9]+ | tail -1)

file=$(find -type f -name "*$days*")

mv $file /home/somename/solitem/content/posts/$file

cd /home/somename/solitem

hugo

So the picconvert script is setup to find a file that has today’s numerical date. It will then rename it and create two additional copies of varying quality using webp. The cover is what you folks will see on the main page while the other is what you will see in the actuall post.

The picconvert script also edits some of the text inside the file to like the 228 number or the expansion.

As a side note. While I’ve been lazying about on making a gallery with the png versions of the screenshots. You can technically grab the png versions through the website if you are familiar enough of where it is in the subpaths.

The postUpdate script simply checks a specific folder and moves the completed post into the posts directory and it will run hugo to build the website. Resulting the post to be visible for anyone on the website.

The crucial “bug” is that I use incrontab to detect file creation or a file being moved to execute these scripts. Essentially, incrontab is a simple tool that reacts to file changes and or directories. Here’s a link to a manpage that goes into detail on how to utilize it.

https://linux.die.net/man/5/incrontab

The problem I’m dealing with is that the picconvert.sh script creates multiple posts in the SSadPosts directory due to it being excuted on file creation. Since the script creates two additional files in the same directory it in turn execute the script two more times. Thankfully, it doesn’t result in an endless loop. (I’ve dealt with that before while using these scripts) Probably, due to the very specific filename that the find command looks for. As such it fails to create additional files in the same directory. Although it does add an additional file into SSadPosts. I assume it would generate 3 in total, but only 2 are created which makes me confused a tad. My best guest is that because of the execution of the scripts is so fast that the second time it runs it creates the same name of the post like the first since it hasn’t noticed a change in post number.

One last thing to mention is that some people will sit there and critique the living hell of my “code”. All I’ll say is too bad. My main goal was to try and automate this whole process without relying on variables inside of some file left inside the folder. I originally was going to use Julian numerical dates as a way to determine the number for the post, but I didn’t want to do the math and decided to use the previous screenshot files as a way to determine the next post number. Its nice in a way since I don’t have to worry about the number post being off due to the day being wrong.

While I have a solution in mind for the “bug” and I may not be concerned of people’s critique. I won’t be implementing the solution tonight maybe sometime later. The reason why not tonight is because I spent my entire day making this cursed video down below.

The Great Kugane Leap

A small step for Popotos and a great leap for all of Eorzeans.

So yeah yesterday’s tease was a compliation of me “intentionally” missing the lamp post.

I believe I have about 37 clips of me missing the lamp post. Although, some may have noticed my health at the beginning before the “first” climb was a bit low. That was because my first attempt recording my entire way up the tower actually succeeded on landing on top of the lamp post. As such, I immediately walked off and restarted the whole scene forgetting that my health was low. To be quite honest, I was planning to do a lot more jumps than was shown in the video, but I decided to just bring it to a concise end since I don’t want to turn into a perfectionist.

I won’t guarantee me doing more of these, but if people find this video enjoyable to watch I will consider on doing more. (Although, I need to find more jump puzzles like this one. I suppose the leatherworker’s guild will work.) I think this might be the first time I’ll ever be opening the Table of contents by default since I feel like people might want to ignore the top bit and jump straight to here since they will be comming from the video.

Lastly, I apologize if the audio isn’t great. Personally, I have no idea if the audio levels I use is even high or low for others. I don’t really have a good frame of reference to use. Maybe there’s some standarized way, but never looked for it.

Dagnabit. I just realized that I didn’t include as to why I mentioned the “Also known as the 7 dollar joke.” I made a short clip showing the end to a few friends before making the rest of the clip. In order to finalize the joke of me falling I needed the play dead emote which you can only get via the mogstation. It was 7 bucks and I didn’t hesitate one bit. That is why I added in the alternate title inside the description.