konomospace

a blog about *nix and pates

010: How to export to an A4 PDF using Org mode

March 20, 2021 — ~konomo

I am back with sharing knowledge that I spent way too long to gain.

By default, emacs creates US Letter PDFs. I am not in the US, I don’t have US Letter sheets, and I prefer to have A4 in every single aspect. But I know nothing about LaTeX, so would I have to export to ODT and then change the page style to A4?

Now that I have the solution, I don’t. And for your sake I will share the solution with you. If you have a better one, please don’t be afraid to tell me, so we can all benefit from it.

You’ll need * Emacs with Org mode installed * LaTeX, or TeXlive in my case┬╣

What you do is add the following LaTeX options to your Org document (minus the backslashes┬▓): \#+LATEX_CLASS: article
\#+LATEX_CLASS_OPTIONS: [a4paper]

That’s it.

read more...

009: How to add cover art to a FLAC file in the command line

March 04, 2021 — ~konomo

This is essentially a repackaging of a Life of a Geek Admin post1, but I decided to re-phrase it and leave out the Mp3Tag stuff.

read more...

008: Removing the stream of consciousness

February 13, 2021 — ~konomo

Hey there,

as of a few minutes ago, I removed the stream of consciousness link from my index.gmi page. It is now deprecated in favour of a twtxt.txt file, that you can find on HTTPS1 and Gemini2.

One thing I’ve noticed with the stream of consciousness app is that the twtxt-compatible file it creates is reversed, compared to a twtxt.txt file written by the twtxt client. I don’t know if this really is a problem, but this was one of the reasons I shut it down now.

The stream of consciousness page will remain for archival (read: if something breaks I will revert back to it.)

I’ve built a way for the last twtxt update to show on my Gemini page now, maybe you’ll enjoy that. In the future, I might integrate it into my HTTPS page too, but for now, it’s in the Gemini page.

tags: gemini

007: Tildecats

January 19, 2021 — ~konomo

About time I write something here again :3 I came up with the idea of Tildecats when I saw a picture full of named cats in a discord (boo?) server I’m in. I wanted to do something similar, and as I’ve always drawn simple cats ever since I joined this tilde (and the fediverse), I decided to do this too now.

So far I got two people (except me) who already have their very own Tildecat: kiiwiiwastaken and nihilazo. Going to my homepage shows the JPEG of the cat image with an imagemap allowing you to click on it and be taken to their respective homepages. Currently it seems like the canvas only has place for 6 cats, so I will have to extend space by adding a second one to allow more in the future, but the future is not now, so there is no need to worry.

tags: cat

006: Thoughts on gemini ‘Styling’

December 22, 2020 — ~konomo

My last two posts have been somewhat related to gemini. That indicates that I’ve been thinking with and about it for the last few weeks.

What interested me in particular was the lack of server-side styling in gemtext. Unlike in HTML, gemtext does not allow you to change fonts, colours, or any other point of styling beyond the markup, since this is all handled by the client itself. This has its up and downsides: On the one hand, lack of styling forces the author to come to the point, and it gives the reader the freedom to style the markup as they wish, allowing a uniform browsing experience to happen. On the other hand, HTML supports more artistic expression than gemtext, in the form of server-side CSS.

As much as I love simple CSS designs, it is a fact we need to accept that granting an author the freedom of design will lead to questionable and anti-reader design choices (cookie banners, for example). Though, to be fair, some of these design decisions were not caused by design-freedom alone, but due to the problems that HTTP has created itself.

I try to keep my web pages minimal, in a way that there shouldn’t be that much of a difference if switching from eww to elpher. Obviously there is some difference in it, due to differences in the structure of both browsers. For example, eww uses a sans font by default while elpher uses the default emacs code font. But, with a little bit of determination I could make them look the same.

tags: gemini

005: Away with the dirty hack (and hello to a new one!)

December 16, 2020 — ~konomo

If you have read my (gem|b)log before, you may have noticed that I used to write the date of the time of writing the post into the content itself.

Why would I do that?

The answer: I couldn’t be bothered to do it a cleaner way. :P As you may know, this blog is also visible on Gemini1. The default configuration, however, doesn’t gather the post date, so I had to get creative. The reason why I included the date was because I parsed the input Markdown file for that date and then simply included that in the gemini page.

Now, I present to you, the code that made it all possible:

postdate=$(awk '{if(NR==3) print $0}' $post)
postdate=$(echo $postdate | sed 's/[*]//g')

It reads the third line of each document and then prints it. Obviously, this relies on human intervention and can break horribly if I ever decide to change the formatting of my blog posts. I am happy I stopped it this early, so I wouldn’t have to edit dozens of blog posts ;)

Now, the code looks like this:

postdate=$(grep "bashblog_timestamp" $clearname.html | awk '{print $3}' | sed 's/#//g;s/.\{7\}$//;s/./&-/6;s/./&-/4')

The variable $clearname refers to the filename without a file extension, which the script adds html to. Then it parses out the bashblog timestamp , filters out only the date and adds the dashes. The output is the same, but it seems much cleaner to me.

P.S. Obviously my filter would break if I applied it the same way as it says in the source code.

tags: gemini

004: Small update to my gemlog and also new stuff

December 14, 2020 — ~konomo

There are now 2 new things I have introduced to my gemini site. One is a wrapper for the feels engine and the other one is a Stream of Consciousness, written by khuxkm. I am, uh, not sure now I feel about the feels engine (pun, ha ha :P). It is a nice idea for sure, but compared against Stream of Consciousness or this (gem|b)log I don’t think it can keep up. I’m not going to delete any of my feels just yet, I am probably just going to use it less. The Stream of Consciousness1 is a thing that interested me as soon as I saw it, so I set it up, had problems with that, opened a bug report, got the problem fixed by khuxkm (Thanks a lot! :3), then deployed the working version, and, well, it’s amazing. I like how I’m able to post to it using my gemini browser using a client certificate.

Also, after reading swiftmandolin’s gemlog post2 about formatting gemini documents, I realized that I didn’t include a “Back” link in most of my gemtexts. I relied on using elpher’s “go back” function to go back from my sites. The problem is that I rely on the elpher client to be able to go back. For example I don’t know bombadillo keybindings, I don’t know how to go back in history! D:

So, to solve that, I added a back link to every page and CGI script on my gemini pages.

Though, I may have missed some. If I have, please tell me!

tags: gemini

003: Rambling about Pates (pt. 1/???)

December 06, 2020 — ~konomo

I finally gave my project some structure and put it into expandable categories. This should now also be portrayed in the gemini page (remind me to make it accessible for the web too).

I gave it all a name, Pates, which is both the easiest to pronounce of all the ideas I’ve had, and also sounds the best.

In the coming time period I hope to put more time into Akatarhta, the first region of Pates. When that’s done, I will hopefully be able to begin creating a few documents detailing this place even more.

tags: pates, fantasy

002: Emacs, yay!

November 29, 2020 — ~konomo

I was always an emacs fan, however, recently, I discovered it again after a period of not using it. before, I was content with using kate or atom as an editor, however the extensibility of emacs brought me all the way back here.

I started with trying out the concept of literate programming using org’s tangling features. I cloned a repo of another fellow emacs user and minimised and adapted it to my needs. And it worked great. That’s ironic, given that I tried that a year ago and failed miserably.

Then I found out about elpher, which is a gopher/gemini browser for emacs and has since replaced AV-98, Castor or any other client I have used prior.

Now I have abandoned my hopes of ever learning Markdown in favour of learning Org-mode and using LaTeX from within emacs, as I can generate a PDF file using a few button presses. Oh, did I forget to mention I can open PDF files in emacs? Yeah, that is pretty nice too.

tags: emacs, flame-war

001: Arrival in the team

November 14, 2020 — ~konomo

A few days ago, I entered this tilde. My expectations were large, very large in fact. And yet being on here for such a short time even has exceeded all expectations I had.

I’m thrilled to socialize with the community. I would like to thank ~ben for helping me sign up and connect, I appreciate you!

tags: introduction