#!/usr/bin/env lua local datetime = require"huh.datetime" local config = require"huh.config".load(arg[1]) local posts = require"huh.blog".posts(config) local prefix = "https://ignore.pl/" local count = 5 for _, page in pairs(posts) do if count <= 0 then break end local url = prefix .. page.filename print"" print(string.format("%s", page.title)) print(string.format("%s", url)) print(string.format([[]], url)) -- TODO: Unlike shell implementation, updated date here is sourced only from the file and never from git! print(string.format("%s", page.updated or page.published)) print(string.format("%s", page.published)) print"" count = count - 1 end