Agent of the Terran Empire (Flandry, #3)
Review:I had fond memories of reading Anderson and other classic SciFi of the same vintage when I was a kid. |
Review:I had fond memories of reading Anderson and other classic SciFi of the same vintage when I was a kid. |
Since I wrote tapita to automatically create book covers, it was absurdly easy to turn it into a site where you can create book covers.
So, you can go to Covers.ralsina.me and create book covers.
Fun part: this is the whole backend for the site:
from json import loads
from tapita import Cover
from io import BytesIO
import base64
def handle(req):
"""handle a request to the function
Args:
req (str): request body
{
"title": "foo",
"subtitle": "bar",
"author": "bat",
}
"""
try:
args = loads(req)
except Exception:
return "Bad Request", 400
c = Cover(**args)
byte_arr = BytesIO()
c.image.save(byte_arr, format="JPEG")
return (
f'<img src="data:image/jpeg;base64, {base64.b64encode(byte_arr.getvalue()).decode("utf-8")}">',
200,
{"Content-Type": "text/html"},
For reasons I won't discuss, I needed to create a bunch of ebook covers. Looking around I found some code to do it programmatically, so I adapted/rewrote it and now published my version.
More information at the tapita github repo
And here's an example cover:
It does enough for what I need, but happy to work a bit more on it if anyone wants it.
This is a longer-term update on the state of my home server. You can read more about it in these 1 2 3 4 5 6 posts.
Since the last update I have added a few new services:
I added a web-based filebrowser. It's ... Filebrowser
Why? Because sometimes I need to manage some files. No big deal, almost never use it.
It's Kavita and it's pretty good, if a little too basic. I use it to manage an epub collection, and it works. Writing scripts to automatically tag and add metadata to random crappy ebooks was fun.
A snippet/pastebin thing called snips.sh and it's really nice. I added a small shell script so I can just pipe things to it. I am making the HTTPS public at snips.ralsina.me and keeping the SSH private in my VPN thank you very much.
Had some trouble making it work on ARM because of a tensorflow dependency, but it's running fine.
Watchtower is a tool that monitors your running containers and will daily check if there are new versions. If there are, it will upgrade them. Nice to have things update unattended.
Server is stable
Review:Not going to make this long, since it's just a short story, but it's a nice combination of really outdated writing and an ear for a kind of dialog that no human ever used :-) |