💾 Archived View for ddlyh.smol.pub › 2024-day-1 captured on 2024-08-18 at 17:40:58. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Back to posts

Day 1 of the 2024 Old Computer Challenge

What is the challenge this year?

This year, I'm trying not to use my smartphone for non-phone stuff (though I'm making exceptions for work-stuff, password-manager-stuff, a few notes and listening to the radio as my FM radio is on the blink), in addition to only using the laptop from last year as my computer.

Why are you starting late?

There was some confusion whether the start day of the challenge this year was Friday, Saturday or Sunday. I've chosen Sunday as I was busy with work stuff and didn't have time to prepare.

Community

I've joined the forum (though whether I can keep it working on the laptop is yet to be seen) and I've signed up for the mailing list (which does work, thanks to mutt). Once again, I will be on the IRC channel a bit.

The Forum for OCC

The Mailing List for OCC

The #OldComputerChallenge IRC channel on Libera.chat

Tasks

I'd like to get some form of RSS reader working. I've now got Xidel compiled for this thing, so I may be able to hack something together with Shell scripts, like I did for the Fediverse.

Xidel

Speaking of which...

No, I haven't published my scripts yet, but I still intend to do so. They are still only limited in functionality though.

Misc

Not sure what else to write today. I might add to this if I can get editing working and think of anything else.

Edit

I'm already having to break my rules to check my holiday entitlement as work's HR site requires Javascript... *Sigh*

Edit 2

OK, I have a proto-Atom reader with very little understanding of XQuery, so this code is awful, but this works with:

xidel "an-atom-feed" --extract-file="program.xq" --output-format=html >atomreader.html

Where program.xq is:

let $c := count(//*:entry)
(: for $m in //*:feed :)
    return
        <a name="toc"></a>,<nav><ol>{
for $x at $n in //*:entry
    let $xt:=inner-html($x/*:title)
    order by $x/*:published descending
    return
        <li><a href="#{$n}">{$xt}</a></li>
}</ol></nav>,<main>{
for $x at $n in //*:entry
    let $xc:=(
        if ($x/*:content != '')
        then inner-html($x/*:content)
        else inner-html($x/*:summary)
    )
    let $xt:=inner-html($x/*:title)
    let $xl:=(
        if ($x/*:link/@href != '')
        then $x/*:link/@href
        else ()
    )
    let $xh:=parse-html($xc)
        return
            <article> 
                <a name="{$n}"></a>
                <h1>{$xt}</h1>
                {parse-html(parse-html($xc))//body/*}
                <a href="{$xl}">Article</a>
                <a href="#toc">Back to TOC</a>
             </article>
}</main>

(I hope the code tags stop that from breaking).

As you can see, terrible code, but it works at the moment...