Back · Index

Picoblog is fairly simple. This page just highlights the more "special" elements of it.


Entries are virtually similar to twtxt and use a compatible format:

# [RFC3339 Date] <tab> [(#entry-id)] <tab> [Entry text]`, e.g:
2021-01-26T13:51:50+00:00   (#NDMyZg)   Hashlinks - working. Next up - pagination. #picoblog

Entry Regex: /^(?<date>[^\t]+)(?:\t\(#(?<id>[0-9a-zA-Z]{6,7})\))?\t(?<entry>.+)/

User Handle Regex: /\@<(?<handle>\w+)\W+(?<url>https?:\/\/[^>]+)>/

Hashlinks Regex: /#<(\w+)\W+(https?:\/\/[^>]+)>/

Entry ID

Entry IDs are generated like so:

    $string = $this->config['settings']['url'].$this->config['settings']['feed'], microtime(true)).PHP_EOL.$entry;
    $hash = str_replace('=', '', base64_encode(hash('fnv164',$string)));
    return substr($hash, -7);
Loaded in 2.292ms