<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://joelchrono.xyz/feeds/git.xml" rel="self" type="application/atom+xml" /><link href="https://joelchrono.xyz/" rel="alternate" type="text/html" /><updated>2026-08-17T21:29:37-06:00</updated><id>https://joelchrono.xyz/feeds/git.xml</id><title type="html">joelchrono’s blog</title><author><name>joelchrono</name><email>me@joelchrono.xyz</email></author><entry><title type="html">Updating a package for Void Linux</title><link href="https://joelchrono.xyz/blog/updating-a-package-for-void-linux/" rel="alternate" type="text/html" title="Updating a package for Void Linux" /><published>2023-01-10T12:00:21-06:00</published><updated>2023-01-10T12:00:21-06:00</updated><id>https://joelchrono.xyz/blog/updating-a-package-for-void-linux</id><content type="html" xml:base="https://joelchrono.xyz/blog/updating-a-package-for-void-linux/"><![CDATA[<p>I am very happy with my transition to Void Linux, I’ve come and gone many times, but I think that this one may finally stick.</p>

<p>I’ve known about the <a href="https://github.com/void-linux/void-packages">void-packages repository</a> for a while, it is quite similar to the AUR. Its a place where you can contribute new programs and libraries to be packaged in Void Linux, and its needed if you want to install some non-free packages like Discord.</p>

<p><a href="https://openlp.org">OpenLP</a> is a free and open source worship presentation software, mainly for churches. Basically, it lets you display Bible verses, lyrics and the like. Its a tool used in my local church and I find it quite great! Its latest stable release just came out a few days ago, and since I noticed Void didn’t have the update yet. I decided to try updating it myself.</p>

<p>I expected to do some complexstuff, but after a quick read of their <a href="https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md">contributing guide</a>, and after checking the history of commits previously done for the package I was going to work with, I realized it shouldn’t be too difficult.</p>

<p>In my case, I only changed the version and the checksum, I did <code class="language-plaintext highlighter-rouge">./xbps-src pkg OpenLP</code> and, like magic, I was able to build it and install it without a problems.</p>

<p>However, when I ran some tests (using the <code class="language-plaintext highlighter-rouge">-Q</code> flag in xbps-src) I noticed that it was mostly fine, but a few tests failed to run. I had already submitted a PR, and I decided to try and look for solutions.</p>

<h1 id="sidequest-irc-chat">Sidequest: IRC Chat</h1>

<p>I went to the []Libera IRC network](https://libera.chat) to chat in the <code class="language-plaintext highlighter-rouge">#openlp</code> chatroom and ask some questions. I eventually realized that there were some changes done in Python 3.11 that were not accounted for just yet in this latest release. Although a few MRs later they should be fixed.</p>

<p>Regardless, I now knew that the problems were on their side, and even if the tests failed, the program was working alright.</p>

<p>Then I felt like selhosting my own IRC web client to not miss any messages, just in case. So I went ahead on my Yunohost applications and ended up trying out <a href="https://github.com/thelounge/thelounge">The Lounge</a>, which can be easily installed. I found it quite good, and its always connected, which was incredibly useful for me. I was initially on <a href="https://web.libera.chat">Libera’s public Kiwi instance</a>, but I find TL to be quite good, and its also more up to date, relatively speaking.</p>

<h1 id="updating-dependencies">Updating dependencies</h1>

<p>So anywyays, I got a couple suggestions on <a href="https://github.com/void-linux/void-packages/pull/41526">my PR’s GitHub thread</a> and ended up updating two other Python dependencies in my PR, I was actually unaware of them, but another mantainer, who is also <a href="https://beckmeyer.us/">a fellow Joel</a>, sent me the patch so I could commit them myself without much trouble.</p>

<p>After adding a couple other lines to skip tests that still are not working on Python 3.11, building the package with <code class="language-plaintext highlighter-rouge">./xbps-src pkg -Q OpenLP</code> is now successful on my end.</p>

<h1 id="finishing-words">Finishing words</h1>

<p>By the time I write this, my PR is still not merged just yet. There is also a chance that the OpenLP devs make a new version by tomorrow and I have to update my PR once again.</p>

<p>For now, this was quite a fun project, I kind of wanna look for other simple programs and tools that kinda build themselves just fine, and contribute that way, even if I only change a couple of lines everytime.</p>

<p>I will update this blogpost if my PR is successful or some other news happen.</p>

<p>This is day 10 of <a href="https://100daystooffload.com">#100DaysToOffload</a></p>]]></content><author><name>joelchrono</name><email>me@joelchrono.xyz</email></author><category term="linux" /><category term="git" /><category term="foss" /><category term="distro" /><summary type="html"><![CDATA[This is not a tutorial, I only share my experience and side quests that led me to commiting a package for Void Linux, the distro I use, with relative success]]></summary></entry><entry><title type="html">Sharing my blogs to the Fediverse automatically</title><link href="https://joelchrono.xyz/blog/sharing-my-blogs-to-the-fediverse-automatically/" rel="alternate" type="text/html" title="Sharing my blogs to the Fediverse automatically" /><published>2022-06-10T20:00:34-05:00</published><updated>2022-06-10T20:00:34-05:00</updated><id>https://joelchrono.xyz/blog/sharing-my-blogs-to-the-fediverse-automatically</id><content type="html" xml:base="https://joelchrono.xyz/blog/sharing-my-blogs-to-the-fediverse-automatically/"><![CDATA[<p>There are many problems that come when you don’t use some CMS like Wordpress or Ghost, and this is one of them. When I <a href="https://joelchrono.xyz/blog/how-to-add-mastodon-comments-to-jekyll-blog/">chose Mastodon as commenting system for my blog</a> I realized it would be quite a process to share my post and get the comment section working. I had already <a href="https://joelchrono.xyz/blog/rofi-automated-blog/">automated the blog creation process</a>, but I still had to do all this:</p>

<ul>
  <li>finish writing</li>
  <li>git add, git commit, git push</li>
  <li>write toot on mastodon sharing my blogpost</li>
  <li>copy toot link</li>
  <li>paste toot link id on original blogpost</li>
  <li>git add, git commit, git push</li>
  <li>comments section now works!</li>
</ul>

<p>However, I decided to summon the power of the command line and bash scripting once again, and I finally managed to automate pretty much all of it.</p>

<p>It depends on some basic tools such as <code class="language-plaintext highlighter-rouge">sed</code>, <code class="language-plaintext highlighter-rouge">cut</code>, <code class="language-plaintext highlighter-rouge">grep</code>, but it also requires a very simple mastodon client for the command line, <code class="language-plaintext highlighter-rouge">toot</code>, you probably have it all installed already, and toot is not hard to setup either way.</p>

<p>There really is not a lot to talk about other than this. Here is the script, its not really super clean or anything (any suggestion are absolutely welcome) but at least its serviceable.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/usr/bin/bash</span>

<span class="k">if </span>git rev-parse <span class="nt">--git-dir</span> <span class="o">&gt;</span> /dev/null 2&gt;&amp;1<span class="p">;</span> <span class="k">then</span>
    : <span class="c"># This is a valid git repository</span>

    <span class="c"># All markdown files start with YYYY-MM-DD</span>
    <span class="nv">lastpost</span><span class="o">=</span><span class="si">$(</span>/usr/bin/ls <span class="k">${</span><span class="nv">markdown_posts_folder</span><span class="k">}</span>/<span class="k">*</span>.md | <span class="nb">sort</span> <span class="nt">-r</span> | <span class="nb">head</span> <span class="nt">-n</span> 1<span class="si">)</span> 
    <span class="nv">getdesc</span><span class="o">=</span><span class="si">$(</span><span class="nb">grep</span> <span class="s2">"description:"</span> <span class="nv">$lastpost</span> | <span class="nb">cut</span> <span class="nt">-d</span> <span class="s2">" "</span> <span class="nt">-f2-</span><span class="si">)</span>
    <span class="nv">geturl</span><span class="o">=</span><span class="si">$(</span><span class="nb">grep</span> <span class="s2">"permalink:"</span> <span class="nv">$lastpost</span> | <span class="nb">cut</span> <span class="nt">-d</span> <span class="s2">" "</span> <span class="nt">-f2-</span><span class="si">)</span>
    <span class="nv">gettags</span><span class="o">=</span><span class="si">$(</span><span class="nb">grep</span> <span class="s2">"tags:"</span> <span class="nv">$lastpost</span> | <span class="nb">cut</span> <span class="nt">-d</span> <span class="s2">" "</span> <span class="nt">-f2-</span> | <span class="nb">sed</span> <span class="nt">-r</span> <span class="s1">'s/([^ ]+)/#\1/g'</span><span class="si">)</span>
    <span class="nv">post</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="nt">-e</span> <span class="s2">"</span><span class="k">${</span><span class="nv">getdesc</span><span class="k">}</span><span class="s2"> </span><span class="se">\n\n</span><span class="s2">https://joelchrono.xyz/</span><span class="k">${</span><span class="nv">geturl</span><span class="k">}</span><span class="s2"> </span><span class="se">\n\n</span><span class="k">${</span><span class="nv">gettags</span><span class="k">}</span><span class="s2"> #blogpost"</span><span class="si">)</span>
    <span class="nv">posturl</span><span class="o">=</span><span class="si">$(</span>toot post <span class="s2">"</span><span class="nv">$post</span><span class="s2">"</span> | <span class="nb">cut</span> <span class="nt">-d</span>/ <span class="nt">-f5</span><span class="si">)</span>
    <span class="nb">echo</span> <span class="nv">$posturl</span>
    <span class="nb">sed</span> <span class="nt">-i</span> <span class="s2">"s/commentsid/</span><span class="nv">$posturl</span><span class="s2">/g"</span> <span class="s2">"</span><span class="nv">$lastpost</span><span class="s2">"</span>

    git add <span class="k">*</span>
    git commit <span class="nt">-m</span> <span class="s2">"automatically added comments"</span>
    git push

    <span class="nb">exit</span>

<span class="c"># directory may not be the top level.</span>
<span class="c"># Check the output of the git rev-parse command if you care</span>
<span class="k">else</span>
    : <span class="c"># this is not a git repository</span>
    <span class="nb">echo</span> <span class="s2">"Run this inside of website folder"</span>
    <span class="nb">exit

</span><span class="k">fi</span>
</code></pre></div></div>

<p>There you go, I hope you find it useful, maybe you can improve it even further. If so, make sure to let me know, I am still learning these things.</p>]]></content><author><name>joelchrono</name><email>me@joelchrono.xyz</email></author><category term="blog" /><category term="tutorial" /><category term="coding" /><category term="bash" /><category term="linux" /><category term="git" /><category term="webdev" /><category term="blog" /><summary type="html"><![CDATA[I always share my blogposts on Mastodon when I am done writing them, but it has always been a little annoying to do so. Not anymore.]]></summary></entry><entry><title type="html">Adventures with ssh, git and rofi scripts</title><link href="https://joelchrono.xyz/blog/adventures-ssh-git-rofi-script/" rel="alternate" type="text/html" title="Adventures with ssh, git and rofi scripts" /><published>2021-07-01T07:54:58-05:00</published><updated>2021-07-01T07:54:58-05:00</updated><id>https://joelchrono.xyz/blog/adventures-with-ssh-git-and-rofi-scripts</id><content type="html" xml:base="https://joelchrono.xyz/blog/adventures-ssh-git-rofi-script/"><![CDATA[<p>This day has been kinda tiresome, but also quite successful, I learned a ton of stuff, and I am happy for it.</p>

<p>The terminal is a place that I have enjoyed for months now, and I really like being on it. But there were a lot of things that I didn’t really do on a terminal, simply because I was already used to other ways. Like downloading files, or transferring it from a computer to my phone.</p>

<p>Since I joined a tilde, a public UNIX server that is accessed via ssh, I had to learn a few more things, or do them in different ways.</p>

<h1 id="getting-familiar-with-ssh">Getting familiar with ssh</h1>

<p>I had been using ssh with my website’s git repo for a while now, in fact, I have my local repos all connected to GitHub via ssh, and I had had no problems with it. However, when I created my tilde account, I got access to tildegit.org, and I decided to give it a try!</p>

<p>Tildegit is a Gitea instance, and its pretty good. It allows me to export my GH repos with ease (at least the public ones), and I am considering to make it my primary Git service. But right now, I would like to keep both. But how am I supposed to do so? There is a “This repo is a mirror” checkmark, but I decided to make the sync from my local repo.</p>

<p>I read this <a href="https://gist.github.com/rvl/c3f156e117e22a25f242">gist</a> guide and set up my git to push to both services, I also learned about the ssh config file, from <a href="https://friendo.monster/log/ssh_config.html">this blog</a> by Drew, so I setup my ssh config for something like this:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Host cafe
    Hostname tilde.cafe
    User chrono
    Identityfile ~/.ssh/cafe
    PubkeyAuthentication yes

Host tildegit
    Hostname tildegit.org
    Identityfile ~/.ssh/tildegit
    User git
    PubkeyAuthentication yes

Host github
    Hostname github.com
    Identityfile ~/.ssh/id_ed25519
    User git
    PubkeyAuthentication yes
</code></pre></div></div>

<p>So, as far as I knew, everything should have worked, <em>except it didn’t</em>, the Tildegit ssh connection did not work. I could go on and on, but the trick was simple.</p>

<p>Running <code class="language-plaintext highlighter-rouge">ssh -vT git@tildegit.org</code> did not work, that command does some tests to try and login to the server, but its output was</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git@tildegit.org: Permission denied (publickey).
</code></pre></div></div>

<p>Why wasn’t it picking up my tildegit key? I don’t know, but my repo’s git config had this:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># repo/.git/config
...
[remote "origin"]
	url = git@github.com:joelchrono12/joelchrono12.ml.git
	fetch = +refs/heads/*:refs/remotes/origin/*
	pushurl = git@tildegit.org:chrono/joelchrono12.ml.git
	pushurl = git@github.com:joelchrono12/joelchrono12.ml.git
...
</code></pre></div></div>

<p>So I tried something. My ~/ssh/config file names the <code class="language-plaintext highlighter-rouge">Host</code> as <code class="language-plaintext highlighter-rouge">tildegit</code> and nothing else. So I decided to run <code class="language-plaintext highlighter-rouge">ssh -vT tildegit</code>, and after <del>typing my passphrase</del> autotyping  my passphrase with <code class="language-plaintext highlighter-rouge">rofi-pass</code>, this was the output.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Hi there, chrono! You've successfully authenticated with the key named tilde.cafe, but Gitea does not provide shell access.
</code></pre></div></div>

<p>And so, after countless useless commits and failed pushes, I got it, I just changed the pushurl to <code class="language-plaintext highlighter-rouge">tildegit:username/repo</code> and it all worked out fine! I did the same for GH.</p>

<h2 id="using-ssh-agent">Using ssh-agent</h2>

<p>Its worth noting that all this time, I knew I could use the <code class="language-plaintext highlighter-rouge">ssh-agent</code>, but I didn’t really feel like it. I don’t think its bad, but for some reason it does not autostart on my system and while it would probably be easy to set it up, I use <code class="language-plaintext highlighter-rouge">pass</code> to store my passwords, and I decided to just use that and autotype it every time.</p>

<h1 id="some-script-fixing">Some script fixing</h1>

<p>Now, in my previous blog I mentioned that I started using <a href="https://gitlab.com/uoou/blop">Blop</a> to produce a simple, more minimal mirror of this website on my tilde <a href="https://chrono.tilde.cafe">here</a>. However, the script uses <code class="language-plaintext highlighter-rouge">sed</code> to change a bunch of stuff, and after reading it, I found a few things I could apply to my current rofi scripts, so I renewed it and made it better, I also removed some blank spaces that were getting added and caused some weird behavior, like having my HTML end with a dash like <code class="language-plaintext highlighter-rouge">this-file-.html</code> and other things.</p>

<p>Now it looks like this!</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#! /bin/bash</span>
<span class="nv">path</span><span class="o">=</span>/home/joelchrono12/git/joelchrono12.ml/_posts/
<span class="nv">title</span><span class="o">=</span><span class="si">$(</span>rofi <span class="nt">-l</span> 0 <span class="nt">-width</span> 50 <span class="nt">-p</span> <span class="s2">"Title:"</span> <span class="nt">-dmenu</span><span class="si">)</span>
<span class="nv">filen</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="nv">$title</span> | <span class="nb">tr</span> <span class="s2">" ,.!"</span> <span class="s2">"-"</span>| <span class="nb">awk</span> <span class="s1">'{print tolower($0)}'</span><span class="si">)</span>
<span class="k">if</span> <span class="o">[</span> <span class="nt">-z</span> <span class="nv">$title</span> <span class="o">]</span><span class="p">;</span> <span class="k">then
	</span><span class="nb">exit
</span><span class="k">fi
</span><span class="nv">today</span><span class="o">=</span><span class="si">$(</span><span class="nb">date</span> +<span class="s2">"%Y-%m-%d"</span><span class="si">)</span>
<span class="nv">filename</span><span class="o">=(</span><span class="nv">$today</span>-<span class="nv">$filen</span><span class="o">)</span>
<span class="nv">description</span><span class="o">=</span><span class="si">$(</span>rofi <span class="nt">-l</span> 0 <span class="nt">-width</span> 60 <span class="nt">-height</span> 20 <span class="nt">-p</span> <span class="s2">"Description:"</span> <span class="nt">-dmenu</span><span class="si">)</span>
<span class="nv">tags</span><span class="o">=</span><span class="si">$(</span>rofi <span class="nt">-l</span> 0 <span class="nt">-width</span> 45 <span class="nt">-p</span> <span class="s2">"Tags:"</span> <span class="nt">-dmenu</span><span class="si">)</span>
<span class="nv">num</span><span class="o">=</span>0
<span class="k">while</span> <span class="o">[</span> <span class="nv">$num</span> <span class="o">=</span> 0 <span class="o">]</span><span class="p">;</span> <span class="k">do
	</span><span class="nv">choice</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="nt">-e</span> <span class="s2">"Edit file</span><span class="se">\n</span><span class="s2">Edit title</span><span class="se">\n</span><span class="s2">Edit description</span><span class="se">\n</span><span class="s2">Edit tags</span><span class="se">\n</span><span class="s2">Cancel"</span> | rofi <span class="nt">-width</span> 15 <span class="nt">-l</span> 5-p <span class="s2">"Now?:"</span> <span class="nt">-dmenu</span><span class="si">)</span>

	<span class="k">if</span> <span class="o">[[</span> <span class="nv">$choice</span> <span class="o">=</span> <span class="s2">"Edit file"</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then
  	</span><span class="nb">touch</span> <span class="nv">$path</span>/<span class="nv">$filename</span>.md
  	<span class="nb">echo</span> <span class="nt">-e</span> <span class="s2">"---</span><span class="se">\n</span><span class="s2">title: </span><span class="nv">$title</span><span class="se">\n</span><span class="s2">header: </span><span class="nv">$title</span><span class="se">\n</span><span class="s2">description: </span><span class="nv">$description</span><span class="se">\n</span><span class="s2">tags: </span><span class="nv">$tags</span><span class="se">\n</span><span class="s2">permalink: /blog/</span><span class="nv">$filen</span><span class="s2">/</span><span class="se">\n</span><span class="s2">layout: post</span><span class="se">\n</span><span class="s2">date: </span><span class="nv">$today</span><span class="s2"> </span><span class="si">$(</span><span class="nb">date</span> +<span class="s2">"%T"</span><span class="si">)</span><span class="s2"> -0500</span><span class="se">\n</span><span class="s2">"</span><span class="o">&gt;&gt;</span> <span class="nv">$path</span>/<span class="nv">$filename</span>.md
		<span class="nv">num</span><span class="o">=</span>1
		alacritty <span class="nt">-e</span> nvim <span class="nv">$path</span>/<span class="nv">$filename</span>.md &amp; <span class="nb">disown</span>
        <span class="c">#cp $path/$filename.md ~/Documents</span>
	<span class="k">elif</span> <span class="o">[[</span> <span class="nv">$choice</span> <span class="o">=</span> <span class="s2">"Edit title"</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then
		</span><span class="nv">title</span><span class="o">=</span><span class="si">$(</span>rofi <span class="nt">-l</span> 0 <span class="nt">-width</span> 50 <span class="nt">-p</span> <span class="s2">"Title:"</span> <span class="nt">-dmenu</span><span class="si">)</span>
	<span class="k">elif</span> <span class="o">[[</span> <span class="nv">$choice</span> <span class="o">=</span> <span class="s2">"Edit description"</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then
		</span><span class="nv">description</span><span class="o">=</span><span class="si">$(</span>rofi <span class="nt">-l</span> 0 <span class="nt">-width</span> 60 <span class="nt">-height</span> 20 <span class="nt">-p</span> <span class="s2">"Description:"</span> <span class="nt">-dmenu</span><span class="si">)</span>
	<span class="k">elif</span> <span class="o">[[</span> <span class="nv">$choice</span> <span class="o">=</span> <span class="s2">"Edit tags"</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then
		</span><span class="nv">tags</span><span class="o">=</span><span class="si">$(</span>rofi <span class="nt">-l</span> 0 <span class="nt">-width</span> 45 <span class="nt">-p</span> <span class="s2">"Tags:"</span> <span class="nt">-dmenu</span><span class="si">)</span>
	<span class="k">else
		</span><span class="nv">num</span><span class="o">=</span>1
	<span class="k">fi
done</span>
</code></pre></div></div>

<h1 id="the-end">The end</h1>

<p>Remember all of the metadata is adapted to work with Jekyll, but it is easy to edit the script for whatever you need. I am using <code class="language-plaintext highlighter-rouge">sed</code> and <code class="language-plaintext highlighter-rouge">tr</code> to remove commas and dots from the filename, and to add dashes instead of spaces, it will duplicate some dashes sometimes, but that’s fine. In the end I managed to learn a bit more about how computers work and stuff like that.</p>

<p>Also, I am almost done with school, I did a couple more icons for the Arcticons icon pack, and I should be cleaning up my room today, I have visits soon and its quite a mess!</p>

<p>This is day 47 of <a href="https://100DaysToOffload.com">#100DaysToOffload</a></p>]]></content><author><name>joelchrono</name><email>me@joelchrono.xyz</email></author><category term="coding" /><category term="linux" /><category term="blog" /><category term="tilde" /><category term="git" /><summary type="html"><![CDATA[Playing with SSH and Git and some fixes I added to my rofi post making script]]></summary></entry></feed>