

Show HN: A microblog hosted in DNS TXT records - erikano

Most recent post is pointed to by CNAME record:<p><pre><code>    host head.microblog.erikano.net.
</code></pre>
This will return a reply like:<p><pre><code>    head.microblog.erikano.net is an alias for 1.microblog.erikano.net.
</code></pre>
Read the post:<p><pre><code>    host -t txt 1.microblog.erikano.net.</code></pre>
======
jayrox
that's cool but what are you using to create these on the go?

~~~
erikano
It is currently a manual process.

This first entry I made by

    
    
        TZ=UTC echo $( date +%YT%T%z ). <message>
    

Which I copied to my clipboard and then manually created the TXT record for
and then the CNAME.

Next time I want to add an entry, I will:

    
    
        expr $( host head.microblog.erikano.net \
                | egrep -o '[^ ]*$' | cut -d'.' -f1 ) + 1
    

To get the ID for the post to be made and then echo calling date as I did for
the first post.

Had I still been hosting the DNS server myself, I would've turned this into a
script and appended the entry as a TXT record directly and updated the CNAME
to the new value using sed.

Actually, thank you for asking because I just realized what my next little
project should be: Instead of the way I'm doing it now, I can selfhost a
little DNS server which will be authorative over microblog.erikano.net while
still hosting the DNS for the rest of erikano.net and my other domains where I
have them now. The project will be written in Go since I have been wanting to
make something in Go but didn't finish the other things I started writing in
Go. I have no ETA for the microblog DNS selfhost server project because of
work and current projects.

Hope I didn't misunderstand the question but if I did and you meant how to
update the microblog when I'm out and about, the answer is I would need to use
a web browser currently to manually update the records. When my own server has
been written, I simply ssh to my VPS which hosts the server and run a cli tool
I will name "mb" ("microblog") with my message as argument.

