Iterating Again, Already

A few days ago I posted about updates to my little FreshRSS script. I already did some fairly quick simple updates, though some didn’t quite work out as hoped initially.

Firstly, I didn’t care for the big blob daily article file it pushed out to the archive. So now it spits out a bunch of individual articles, formatted “YYYY-MM-DD-Article Title.md.” this created my first issue. I got a “Filename too long error.” So I set up a check to truncate the article title to 100 characters, if its longer than 100 characters. I can’t just always slice it, because if its short, I will get an “index out of range” error. I then ran into a second issue. One of the articles I tagged was about the new Ranma 1/2 series. The system, totally choked on the / in 1/2.

I tried a few things to replace any /?%$&#@ symbols, because they all felt like potential catches. Working with slashes is a pain though since its “the escape character”. I ended up just untagging the article so the problem would go away for now.

The second change I made was to add a conditional for if the feed has a “Yes” under “Publish”. This allows me to add more feeds that simply, write articles, without posting links anywhere.

After running it, I noticed something though. None of the new non posting Notes or Recipes were making files. It seems they were all older than the “last run” time. Since I only needed them to work once, I just, force the feed to look at the last 1000+ hours.

This created another error with the WordPress module. These files only feeds don’t have URLs or usernames etc, so when the wp module called for this information, it just craps out. I moved the call to create the connection to inside the “should I post” conditional, which fixed the issue.

Another, thing I tried to do, though this is less coding and more convenience. the script runs in a virtual environment right now. Which is “good practice” but annoying to use. I’ve been trying to work out how to run it without all the hassle, though so far nothing I have found is real definitive. I have tried running the “version of python in the virtual environment, ie “venv/bin/python3 main.py”, but that doesn’t seem to work. I saw a suggestion fo using a hashang in the top line, which I tried, but that didn’t work. So I am just, back to “cd Scripts/Python/FreshRSS-Poster/” then “source venv/bin/activate” then “python3 main.py”, which is annoying, but it works.

There are still a few things I want to work out.

  • When I save files in other methods, it embeds images in them. I would like to adjust the formatting to mimic that.
  • The dates on the files are all the date run, though they should not be. I need to look into that.
  • I should sort the file outputs into directories based on the blog or topic tag.

おにぎり (Onigiri) aka, “Rice Balls”

I’ve been doing some experimenting recently making おにぎり (Onigiri) aka, “rice balls”.  I’ve been taking it very literally as being a ball and have not added any Nori wrapping yet.  I’ve been just sticking with variations of tuna and mayo that I read about online.  It’s a pretty simple and easy dish to make, and I end up with enough for 2-3 meals from one batch, which is nice.  Cook a cup (uncooked) or rice int he rice maker, dump it in a bowl with a can or two of tuna, spoon some mayo in, add whatever flavoring I want to try out, use an ice cream scoop to drop them onto a plate in “ball form”, and stick them in the fridge for an hour to cool.

Technically speaking, the ball part is kind of optional, but it feels “fancy” and makes them work really well with chopsticks.

Also, prepare for a bunch of images that all mostly look the same!

The first go at it was very basic, literally just tuna, mayo, white rice, and some teriyaki sauce.  I didn’t have any soy sauce, so I figured the teriyaki would be close enough.  They actually came out pretty tasty.

For Round 2, I invested in some proper soy sauce, and added some garlic to them.

I mixed it up again for round three, sticking with the soy sauce, but this time adding some curry powder to the mix.  These were probably my favorite of all the flavors I have tested so far.

My last attempt was much less great.

For the 4th try, I had some Hoisin sauce floating around and decided to see how it would fare.  The result wasn’t awful, but it was just kind of flavorless.  Like very vaguely sweet maybe.  This sauce also gave the rice balls a slightly more gooey consistency, so they didn’t stick together in ball form quite as well, which made them annoying to eat.