piblog/www/index.html

514 lines
21 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="author" content="dozens" />
<title>piblog</title>
<style>
html {
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 12px;
}
h1 {
font-size: 1.8em;
}
}
@media print {
html {
background-color: white;
}
body {
background-color: transparent;
color: black;
font-size: 12pt;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
svg {
height; auto;
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
font-size: 85%;
margin: 0;
hyphens: manual;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overflow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<link rel="alternate" type="application/rss+xml" href="http://tilde.town/~dozens/piblog/feed.xml" title="dozens pi blog">
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<header id="title-block-header">
<h1 class="title">piblog</h1>
<p class="subtitle">adventures with my raspberry pi</p>
<p class="author">dozens</p>
</header>
<nav id="TOC" role="doc-toc">
<h2 id="toc-title">entries</h2>
<ul>
<li><a href="#about" id="toc-about">about</a></li>
<li><a href="#audiobooks" id="toc-audiobooks"><time>2023-11-13</time> -
audiobooks</a></li>
<li><a href="#add-email-to-calibre-web"
id="toc-add-email-to-calibre-web"><time>2023-11-07</time> - add email to
calibre-web</a></li>
<li><a href="#abduco-dvtm-tmux-replacement"
id="toc-abduco-dvtm-tmux-replacement"><time>2023-10-28</time> - abduco +
dvtm = tmux replacement?</a></li>
<li><a href="#jellyfin" id="toc-jellyfin"><time>2023-10-11</time> -
jellyfin</a></li>
<li><a href="#dedrm" id="toc-dedrm"><time>2023-09-29</time> -
DeDRM</a></li>
<li><a href="#reboot" id="toc-reboot"><time>2023-09-29</time> -
reboot</a></li>
<li><a href="#rpg-library" id="toc-rpg-library"><time>2023-09-13</time>
- rpg library</a></li>
<li><a href="#mdns" id="toc-mdns"><time>2023-09-12</time> -
mDNS</a></li>
<li><a href="#miniflux" id="toc-miniflux"><time>2023-09-11</time> -
miniflux</a></li>
<li><a href="#calibre" id="toc-calibre"><time>2023-09-08</time> -
calibre</a></li>
<li><a href="#photoprism" id="toc-photoprism"><time>2023-09-03</time> -
photoprism</a></li>
<li><a href="#git" id="toc-git"><time>2023-08-30</time> - git</a></li>
<li><a href="#hello-world" id="toc-hello-world"><time>2023-08-28</time>
- Hello World</a></li>
</ul>
</nav>
<h2 id="about">about</h2>
<p>Hi! This is my journal about my experiences, exploits, and hijinks
while setting up a raspberry pi homelab. it is a Pi 3 Model B named
guyute</p>
<ul>
<li>www: tilde.town/~dozens</li>
<li>email: <a href="mailto:dozens@tilde.team"
class="email">dozens@tilde.team</a></li>
<li>fedi: <span class="citation" data-cites="dozens">@dozens</span><span
class="citation"
data-cites="tiny.tilde.website">@tiny.tilde.website</span></li>
<li>irc: dozens on {libera,tilde}.chat</li>
<li>webring:
<a href="https://tilde.town/~dozens/webring/dozens/index.html?name=piblog&dir=prev">prev</a>
<a href="https://tilde.town/~dozens/webring/dozens/index.html">index</a>
<a href="https://tilde.town/~dozens/webring/dozens/index.html?name=piblog&dir=next">next</a></li>
</ul>
<!-- BEGIN //-->
<h2 id="audiobooks"><time>2023-11-13</time> - audiobooks</h2>
<p>okay so tomasino reminded me today that i used to love listening to
audiobooks.</p>
<p><a href="https://labs.tomasino.org/audiobooks/"
class="uri">https://labs.tomasino.org/audiobooks/</a></p>
<p>but i havent done it as fanatically as i used to in a long time. for
a while, i didnt have a commute. and now i do, but i often carpool. but
sometimes i have a solo, quiet commute. ideal for some audiobooks!</p>
<p>further complications: i am unable to download and archive audiobooks
from overdrive the same way i used to be able to. because they barely
support their desktop apps anymore, and instead push really hard for
everybody to use their streaming apps.</p>
<p>but i learned that if i spoof my user-agent</p>
<p><a
href="https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/"
class="uri">https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/</a></p>
<p>then i can get a Have overdrive for mac/windows? link upon checkout
that will enable me to download the odm file. which i can then use to
download the mp3s thanks to this special little script.</p>
<p><a
href="https://github.com/jamestomasino/dotfiles-minimal/blob/master/bin/overdrive"
class="uri">https://github.com/jamestomasino/dotfiles-minimal/blob/master/bin/overdrive</a></p>
<p>so thats great! while i was troubleshooting all of this, i
downloaded a book to my linux laptop, because the download link is
already readily available there, and then transferred it over to the
pi.</p>
<p>so now i guess im going to start collecting and archiving audiobooks
on the pi too! i might look into jellyfin in earnest so i can serve them
and download them over my home network.</p>
<p>i might also have to start really considering a vpn so i can access
my files away from the house.</p>
<h2 id="add-email-to-calibre-web"><time>2023-11-07</time> - add email to
calibre-web</h2>
<p>just a quick note to look into configuring email for calibre-web so i
can send books direct to my kindle</p>
<p>whoa this fork looks really great compared to what i have</p>
<p><a href="https://github.com/janeczku/calibre-web"
class="uri">https://github.com/janeczku/calibre-web</a></p>
<p>the ui looks good and it has single click send to e-mail and also
“Magic Link” login for easy access on eReaders.. thats great.</p>
<p>what is that im running?</p>
<p>just the base <code>calibre-server</code> that comes with the calibre
package in apt.</p>
<p>okay new goal: install and run <code>calibre-web</code>, and stop
using <code>calibre-server</code>?</p>
<h2 id="abduco-dvtm-tmux-replacement"><time>2023-10-28</time> - abduco +
dvtm = tmux replacement?</h2>
<p>i cant remember how i fell down this rabbit hole.. i think its
because elly had been talking about dtach over on #tildetown, which is a
utility that just provides the attach/detach functionality of tmux.</p>
<p>so anyway i started using abduco + dvtm on my pi just to test it out
and see what it was like and i quite like it! dvtm especially is kind of
nice as a tiling window manager for the terminal.</p>
<p>abduco isnt in the package repository at work, but i started using
dtach + dvtm this week. well see if i stick with it. pretty nice so
far!</p>
<ul>
<li><a href="https://www.brain-dump.org/projects/abduco/"
class="uri">https://www.brain-dump.org/projects/abduco/</a></li>
<li><a href="https://www.brain-dump.org/projects/dvtm/"
class="uri">https://www.brain-dump.org/projects/dvtm/</a></li>
<li><a href="https://github.com/crigler/dtach"
class="uri">https://github.com/crigler/dtach</a></li>
</ul>
<h2 id="jellyfin"><time>2023-10-11</time> - jellyfin</h2>
<p>just a quick note to remind myself to check out jellyfin</p>
<p><a href="https://jellyfin.org/"
class="uri">https://jellyfin.org/</a></p>
<p>a media server alternative to plex that is supposed to be much
lighter and more simple than plex.</p>
<h2 id="dedrm"><time>2023-09-29</time> - DeDRM</h2>
<p>shelled into the pi and curled the latest DeDRM tools release</p>
<p><a href="https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.3"
class="uri">https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.3</a></p>
<p>but i kept getting an empty file for some reason?</p>
<p>no matter, downloaded it to my laptop and <code>scp</code>d it</p>
<p>unzipped it on the pi and</p>
<pre><code>calibre-customize --add DeDRM.zip</code></pre>
<p>it wasnt working at that point because i didnt have any keys
defined in the <code>dedrm.json</code> so I <code>scp</code>d my config
json from my laptop to <code>.config/calibre/plugins/DeDRM</code>. at
this point, im still unable to open the book after adding it via the
web ui. but when i
<code>calibredb --add book.epub --with-library=books --duplicates</code>
on the pi terminal, it adds it. (<code>--duplicates</code> is necessary
only in this test instance because—oops!—turns out i already have this
book in my library, but i am determined to use this opportunity to set
up DeDRM. i will delete the duplicate later.) I cant verify in the web
ui though because its not showing the duplicate. must have merged it
with the old one.</p>
<p>oh well. ill try it again next time i get a book from the library.
shortest wait: currently 6 weeks.</p>
<p>actually no, lets just go checkout an Available Now book. Song of
Achilles. I liked Circe. Lets get this one.</p>
<ul>
<li><p>confirmed: can add the book via web ui, but not open or read it
because of drm</p></li>
<li><p>confirmed: can scp the book to the pi,
<code>calibre add book.epub --with-library=books</code> and get an
<code>Added book ids: &lt;id&gt;</code> message</p></li>
<li><p>confirmed: new book does NOT show up in web ui after killing and
restarting the daemon</p></li>
<li><p>confirmed: the book IS there:</p>
<pre><code> ```
$ calibredb list --search=&#39;id:3&#39; --with-library=books
id title authors
3 The Song of Achilles Madeline Miller
$ #wtf
```</code></pre></li>
</ul>
<p>what the hell. does <code>calibre-server</code> has a db cache or
something? i dont see anything</p>
<p><a
href="https://manual.calibre-ebook.com/generated/en/calibre-server.html"
class="uri">https://manual.calibre-ebook.com/generated/en/calibre-server.html</a></p>
<p>i give up for now</p>
<p>~</p>
<p>to kill the process:</p>
<pre><code>ps aux | grep calibre</code></pre>
<p>and then kill the id</p>
<p>removing the dulplicate:</p>
<pre><code>calibredb search &#39;title:&quot;world we make&quot;&#39; --with-library=books
&gt; 1,2
calibredb list --search &#39;id:2&#39; --with-library=books
&gt; (book info)
calibredb list --search &#39;id:1&#39; --with-library=books
&gt; (book info)
calibredb remove 2</code></pre>
<p>tags: #calibre #drm</p>
<h2 id="reboot"><time>2023-09-29</time> - reboot</h2>
<p>been uploading photos and books, and editing metadata for my
rpgs.</p>
<p>pi became unresponsive last night / this morning to web and ssh so
rebooted this morning and restarted web services. everything seems to be
fine now.</p>
<p>found these resources recently and consider them next steps on my
todo list:</p>
<ul>
<li><p>Add deDRM tools for CLI so I can upload library books. I can
pretty much delete local calibre after this. <a
href="https://github.com/noDRM/DeDRM_tools/blob/master/CALIBRE_CLI_INSTRUCTIONS.md"
class="uri">https://github.com/noDRM/DeDRM_tools/blob/master/CALIBRE_CLI_INSTRUCTIONS.md</a></p></li>
<li><p>Be your own CA Authority! which initially sounds to me like not
that good of an idea, but then I can use <code>https</code> for my local
webservices. <a
href="https://jamielinux.com/docs/openssl-certificate-authority/"
class="uri">https://jamielinux.com/docs/openssl-certificate-authority/</a></p></li>
<li><p>still want to install a reverse proxy (lapis + openresty?) so i
can hit canonical urls instead of typing in address + port number. this
would make it easier to share URLs with household members. NOTE: do i
want a local DNS server??</p></li>
</ul>
<p>Incidentally, mDNS seemed to just magically start working on its self
at some point. I can hit my pis url on macbook and on my phone now.
weeeeeird</p>
<p>tags: #reboot #mdns</p>
<h2 id="rpg-library"><time>2023-09-13</time> - rpg library</h2>
<p>tried searching for an rpg that i know is in my collection and
couldnt find it by title or by author. this is going to be really
painful until i update the metadata on everything. ive done about 60 so
far. out of 1.4k. big yikes!</p>
<p>tags: #calibre #rpg #metadata</p>
<h2 id="mdns"><time>2023-09-12</time> - mDNS</h2>
<p>still cant hit any multi DNS urls on any of my devices.</p>
<p>not a solution but a workaround (for desktop only): added a line to
<code>/etc/hosts</code> on my MBP:</p>
<pre><code>192.168.0.83 pi.local</code></pre>
<p>and now i can hit e.g. calibre with <a href="http://pi.local:8080"
class="uri">http://pi.local:8080</a></p>
<p>maybe i can configure something on my actual router?</p>
<p>tags: #mdns</p>
<h2 id="miniflux"><time>2023-09-11</time> - miniflux</h2>
<p>rss reader!</p>
<p>one thing i would like to be able to do is to read my rss feeds on my
computer and on my phone and on my tablet, and have my un/read status
sync between decives.</p>
<p>which i guess means hosting a feed reader!</p>
<p>i glanced at <code>awesome-selfhosted</code> and then asked some of
my friends in the basement because i know that they have already
undertaken great adventures in rss, trailblazers that they are.</p>
<p>and they recommended miniflux.</p>
<p>written in go, and it uses postgres. luckily they have a docker image
so i dont have to install either. the docker-compose file on their
installation instructions is a little out of date, but you can find a
more correct basic.yml on github at <code>miniflux/v2</code></p>
<p>after a few tweaks, it is installed and running!</p>
<p>the ui is super minimal. im sure ill grow to like it, but at the
moment i am missing the classic three-pane “feeds / entries / content”
view.</p>
<p>Up next:</p>
<ul>
<li>gemini/gopher server? just for fun</li>
<li>nginx reverse proxy: i have three services running on three ports
now. i want a proxy for more easiy routing between these. i choose nginx
because lua, so i can fennel</li>
</ul>
<p>tags: #rss #feeds #miniflux</p>
<h2 id="calibre"><time>2023-09-08</time> - calibre</h2>
<p>had to add the upstream debian bullseye repo to install
<code>calibre-server</code>. (and then remove it.) got the web server up
and running pretty easy.</p>
<p>fussed around for a while trying to make a second calibre library out
of my rpg collection. heres what ended up working: create a new dir and
then
<code>calibredb add path/to/file.pdf --library-path new/library/location</code>.
adding a single file this way created the necessary database file. then
i was able to
<code>find rpgsbak -type f -name '*.pdf' -exec -I {} calibredb add {} --library-path new/library/loction</code>.
(or something like that; wrote the command just now from memory.) and
pull all my pdfs in!</p>
<p>so now i have 1.4k pdfs in a new rpgs library alongside my books
library.</p>
<p>on the whole, hobby ttrpg creators can stand to get a LOT better at
exporting metadata with their pdfs. now i have a whole lot of manual
updating to do. but i can read books and pdfs now from my calibre
library on any device on the network.</p>
<p>also adding new items via the web ui is pretty easy!</p>
<p>TODO: disable converting to epub on read for rpg library.
download to read still works great for reading in the meantime.</p>
<p>tags: #calibre</p>
<h2 id="photoprism"><time>2023-09-03</time> - photoprism</h2>
<p>browsed the photo hosting options on <code>awesome-selfhosted</code>
on github and decided on photoprism</p>
<p>it has a docker image and i was able to get it working no problem,
with no modifications. quick and easy. this is the future containers
promised us.</p>
<p>the ui is slow. i have the number of workers cranked down to 1. might
bump it to 2.</p>
<p>i had been rsyncing photos to the pi and then reindexing the
collection. but im finding it quicker to do a bulk upload using the web
ui. its working rather reliably. it still has to reindex on upload, but
i no longer have to reindex the entire collection.</p>
<p>tags: #photos #photoprism</p>
<h2 id="git"><time>2023-08-30</time> - git</h2>
<p>Add a “git” user. Create a home dir for it. Do
<code>git init --bare repo.git</code>.</p>
<p>Copy my ssh key over and add an entry to
<code>.ssh/config</code>:</p>
<pre><code> 21 │ Host git
22 │ Hostname 192.168.0.83
23 │ User git
24 │ IdentityFile ~/.ssh/id_rsa</code></pre>
<p>Now I can <code>git remote add pi git:repo.git</code> in a local repo
and push away!</p>
<p>tags: #git</p>
<h2 id="hello-world"><time>2023-08-28</time> - Hello World</h2>
<p>Okay lets get this party started!</p>
<p>I have a raspberry pi model 3b that has been gathering dust in a
drawer for a couple years now.</p>
<p>I decided I wanted to dust it off and use it to backup some photos
and some files.</p>
<p>I bought a 4TB external hard drive and a 128gb microSD card and
hooked it all up.</p>
<p>I downloaded the NOOBS installer from raspberrypi.com/software and
installed it on the SD card, which I was able to do because I have a ton
of dongles thanks to the fact that my MacbookPro has no peripherals. I
popped the card in to the pi, connected my usb keyboard and hdmi monitor
and booted it up, and went through the setup.</p>
<p>Then, after testing that I can ssh into the pi, I unplugged my
keyboard and monitor and never plugged them back in again.</p>
<p>Plugged in my hard drive and formatted it with an ext3
filesystem.</p>
<p>Created a backup user. (Not a spare user in case of emergencies, but
a user specifically for creating backups.)</p>
<p>Copied my ssh keys over:</p>
<pre><code>ssh-copy-id -i ~/.ssh/id_rsa pi.local</code></pre>
<p>Mounted the drive, added it to <code>/etc/fstab</code> so it will
auto-mount, and added a slight delay to the boot command so that there
is time for the drive to mount before the system boots. As suggested
here:</p>
<p><a
href="https://howtoforge.com/tutorial/raspberry-pi-as-backup-server-for-linux-and-windows/"
class="uri">https://howtoforge.com/tutorial/raspberry-pi-as-backup-server-for-linux-and-windows/</a></p>
<p>Copied over my first photo export and my calibre library with an
<code>rsync -zaP</code>.</p>
<p>Messed around with mDNS and avahi-daemon because I cant hit <a
href="http://pi.local" class="uri">http://pi.local</a> in the browser.
Still havent figured this out.</p>
<p>tags: #mdns #getting-started <!-- END //--></p>
</body>
</html>