Replace "updates" with summarized and more useful "announcements"
This commit is contained in:
parent
0671f1b9cf
commit
4c3d15b348
5 changed files with 200 additions and 142 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -9,7 +9,6 @@ dat/globster/daemon.md
|
|||
dat/globster/daemon.pod
|
||||
dat/globster/launch.md
|
||||
dat/globster/launch.pod
|
||||
dat/index.md
|
||||
dat/ncdc/changes.log
|
||||
dat/ncdc/changes.md
|
||||
dat/ncdc/man.md
|
||||
|
|
|
|||
16
Makefile
16
Makefile
|
|
@ -62,9 +62,8 @@ PAGES=\
|
|||
"yxml/man.md https://g.blicky.net/yxml.git/plain/yxml.md"
|
||||
|
||||
|
||||
# Files generated by updates.pl
|
||||
UPDATES=\
|
||||
dat/index.md\
|
||||
# Files generated by mkfeed.pl
|
||||
FEEDS=\
|
||||
pub/feed.atom\
|
||||
pub/globster/feed.atom\
|
||||
pub/ncdc/feed.atom\
|
||||
|
|
@ -86,18 +85,18 @@ POD_MD := $(shell for i in ${PAGES}; do echo "$$i" | grep -Eo '^[^ ]+\.pod'
|
|||
CHANGES_MD := $(shell for i in ${PAGES}; do echo "$$i" | grep -Eo '^[^ ]+\.log' | sed -E 's/(.+)\.log$$/dat\/\1.md/'; done)
|
||||
|
||||
# All fetched & generated files
|
||||
CLEAN := ${FETCH} ${POD_MD} ${CHANGES_MD} ${HTML_OUT} ${UPDATES}
|
||||
CLEAN := ${FETCH} ${POD_MD} ${CHANGES_MD} ${HTML_OUT} ${FEEDS}
|
||||
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: .gitignore ${HTML_OUT} ${UPDATES}
|
||||
all: .gitignore ${HTML_OUT} ${FEEDS}
|
||||
|
||||
|
||||
${UPDATES}: updates.pl
|
||||
@echo "UPDATE $@"
|
||||
${FEEDS}: mkfeed.pl dat/index.md
|
||||
@echo "FEED $@"
|
||||
@mkdir -p $$(dirname "$@")
|
||||
@./updates.pl "$@" >"$@"
|
||||
@./mkfeed.pl "$@" <dat/index.md >"$@"
|
||||
|
||||
|
||||
${FETCH}: dat/%:
|
||||
|
|
@ -122,6 +121,7 @@ ${CHANGES_MD}: dat/%.md: dat/%.log mkchangelog.pl
|
|||
@./mkchangelog.pl "$*" "${shell for i in ${PAGES}; do case "$$i" in "$*.log "*) echo "$$i" | sed -E 's/[^ ]+ +[^ ]+ +//';; esac; done}" <"$<" >"$@"
|
||||
|
||||
|
||||
# TODO: Add --strip-comments to pandoc when I have a version that supports it.
|
||||
${HTML_OUT}: pub/%.html: dat/%.md template.html
|
||||
@echo "HTML $*"
|
||||
@mkdir -p $$(dirname "$@")
|
||||
|
|
|
|||
116
dat/index.md
Normal file
116
dat/index.md
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
% Yorhel's Projects
|
||||
|
||||
This site is an attempt to publish and organise my various open source programs
|
||||
and libraries on one central location.
|
||||
|
||||
<!-- These announcements are parsed by mkfeed.pl, see that file for formatting -->
|
||||
## Announcements <a href="/feed.atom"><img src="/img/feed_icon.png" alt="Atom feed"></a>
|
||||
|
||||
`2019-03-23` - Bug tracker migration to Gitea <!-- tags: ncdu, ncdc, yxml -->
|
||||
: The bug trackers that used to be embedded in this website have now been
|
||||
migrated to [Gitea](https://code.blicky.net/) issues. The bug trackers of the
|
||||
following projects can now be found at these new locations:
|
||||
|
||||
- Ncdu: [/yorhel/ncdu/issues](https://code.blicky.net/yorhel/ncdu/issues)
|
||||
- Ncdc: [/yorhel/ncdc/issues](https://code.blicky.net/yorhel/ncdc/issues)
|
||||
- Yxml: [/yorhel/yxml/issues](https://code.blicky.net/yorhel/yxml/issues)
|
||||
|
||||
`2019-02-04` - ncdu 1.14 released <!-- tags: ncdu, link: /ncdu -->
|
||||
: This release adds mtime display & sorting, a limited form of
|
||||
--follow-symlinks, can display larger file counts in the file browser and
|
||||
fixes a few bugs you weren't likely to trigger anyway. [Ncdu
|
||||
homepage](/ncdu) - [Changelog](/ncdu/changes).
|
||||
|
||||
`2018-02-23` - nginx-confgen 1.2 released <!-- link: /nginx-confgen -->
|
||||
: This release significantly improves the parser to accept more syntax and
|
||||
fixes string quoting, variable formatting and escape sequences.
|
||||
[Homepage](/nginx-confgen) - [Changelog](/nginx-confgen/changes).
|
||||
|
||||
`2018-02-18` - TUWF 1.2 released <!-- tags: tuwf, link: /tuwf -->
|
||||
: This release includes a large number of API additions to improve ergonmics
|
||||
and adds support for a build-in web server, JSON requests/responses and a
|
||||
whole lot more. [Homepage](/tuwf) - [Changelog](/tuwf/changes).
|
||||
|
||||
`2018-01-29` - ncdu 1.13 released <!-- tags: ncdu, link: /ncdu -->
|
||||
: This release adds color support and an extended information mode, keeping
|
||||
track of file mode, ownership and modification times. Also fixes a few
|
||||
bugs. [Ncdu homepage](/ncdu) - [Changelog](/ncdu/changes).
|
||||
|
||||
<!-- Old style non-descriptive announcements, included for historical .atom feed stuff.
|
||||
`2018-01-24` - nginx-confgen 1.1 released <!- link: /nginx-confgen ->
|
||||
`2018-01-19` - New project: nginx-confgen <!- link: /nginx-confgen ->
|
||||
`2017-05-28` - New article: An Opinionated Survey of Functional Web Development <!- link: /doc/funcweb ->
|
||||
`2016-12-30` - ncdc 1.20 released <!- tags: ncdc, link: /ncdc ->
|
||||
`2016-08-24` - ncdu 1.12 released <!- tags: ncdu, link: /ncdu ->
|
||||
`2016-08-16` - Uploaded btrfs-size.pl <!- link: /dump/btrfssize ->
|
||||
`2015-09-27` - TUWF 1.0 released <!- tags: tuwf, link: /tuwf ->
|
||||
`2015-04-05` - ncdu 1.11 released <!- tags: ncdu, /ncdu ->
|
||||
`2014-07-29` - New article: The Sorry State of Convenient IPC <!- link: /doc/easyipc ->
|
||||
`2014-06-25` - Uploaded my masters thesis <!- link: /doc ->
|
||||
`2014-04-23` - ncdc 1.19.1 released <!- tags: ncdc, link: /ncdc ->
|
||||
`2014-02-11` - ncdc 1.19 released <!- tags: ncdc, /ncdc ->
|
||||
`2014-01-09` - Uploaded an article on DC file list stats <!- link: /doc/dcstats ->
|
||||
`2013-11-14` - yxml now has a manual <!- tags: yxml, link: /yxml/man ->
|
||||
`2013-10-05` - ncdc 1.18.1 released <!- tags: ncdc, /ncdc ->
|
||||
`2013-09-25` - ncdc 1.18 released <!- tags: ncdc, /ncdc ->
|
||||
`2013-09-03` - Announcing yxml: A small, fast and correct XML parser <!- tags: yxml, link: /yxml ->
|
||||
`2013-07-05` - Documented a little data structure benchmark <!- link: /dump/insbench ->
|
||||
`2013-06-15` - ncdc 1.17 released <!- tags: ncdc, link: /ncdc ->
|
||||
`2013-05-09` - ncdu 1.10 released <!- tags: ncdu, link: /ncdu ->
|
||||
`2013-04-04` - Created a page for Ylib <!- link: /ylib ->
|
||||
`2013-04-03` - Created a mailing list for ncdc <!- tags: ncdc, link: /ncdc ->
|
||||
`2013-03-23` - ncdc 1.16.1 released. <!- tags: ncdc, link: /ncdc ->
|
||||
`2013-03-02` - ncdc 1.15 released. <!- tags: ncdc, link: /ncdc ->
|
||||
`2012-12-15` - Announcing yet another awesome project: Globster! <!- tags: globster, link: /globster ->
|
||||
`2012-12-02` - Documented the ncdu export file format <!- tags: ncdu, link: /ncdu/jsonfmt ->
|
||||
`2012-11-04` - ncdc 1.14 released <!- tags: ncdc, link: /ncdc ->
|
||||
`2012-10-17` - Added reference to my repo of small C libs to the code dump <!- link: /dump ->
|
||||
`2012-10-07` - Added maildir.pl to the code dump <!- link: /dump#maildir.pl ->
|
||||
`2012-09-27` - ncdu 1.9 released. <!- tags: ncdu, link: /ncdu ->
|
||||
`2012-09-25` - Added dbusev.c to the code dump <!- link: /dump#dbusev.c ->
|
||||
`2012-08-16` - ncdc 1.13 released. <!- tags: ncdc, link: /ncdc ->
|
||||
`2012-07-10` - ncdc 1.12 released. <!- tags: ncdc, link: /ncdc ->
|
||||
`2012-05-15` - ncdc 1.11 released. <!- tags: ncdc, link: /ncdc ->
|
||||
`2012-05-03` - Added installation instructions for ncdc. <!- tags: ncdc, link: /ncdc/install ->
|
||||
`2012-05-03` - ncdc 1.10 released. <!- tags: ncdc, link: /ncdc ->
|
||||
`2012-04-10` - Minor site re-style: ncdu/ncdc/tuwf now have their own menu.
|
||||
`2012-03-30` - Updated ncdc-share-report for Go 1 <!- tags: ncdc, link: /dump ->
|
||||
`2012-03-24` - Moved ncdu bug tracker from sourceforge to this site <!- tags: ncdu, link: /ncdu/bug ->
|
||||
`2012-03-17` - Wrote a small bug tracker for ncdc <!- tags: ncdc, link: /ncdc/bug ->
|
||||
`2012-03-14` - ncdc 1.9 released. <!- tags: ncdc, link: /ncdc ->
|
||||
`2012-02-15` - Added an article on my new communication system. <!- link: /doc/commvis ->
|
||||
`2012-02-13` - ncdc 1.8 released. <!- tags: ncdc, link: /ncdc ->
|
||||
`2012-01-19` - TUWF 0.2 released. <!- tags: tuwf, link: /tuwf ->
|
||||
`2012-01-17` - Complete site redesign.
|
||||
`2011-12-30` - ncdc 1.7 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-12-07` - ncdc 1.6 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-11-26` - Added article section and the article on SQLite. <!- link: /doc ->
|
||||
`2011-11-03` - ncdu 1.8 released! <!- tags: ncdu, link: /ncdu ->
|
||||
`2011-11-03` - ncdc 1.5 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-10-26` - ncdc 1.4 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-10-19` - PGP-signed all releases of ncdu, ncdc and TUWF. <!- tags: ncdu, ncdc, tuwf ->
|
||||
`2011-10-14` - ncdc 1.3 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-09-25` - ncdc 1.1 released - follwed by a 1.2 quickfix. <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-09-16` - ncdc 1.0 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-09-15` - Added some screenshots for ncdu. <!- tags: ncdu, link: /ncdu/scr ->
|
||||
`2011-09-03` - ncdc 0.9 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-08-26` - ncdc 0.8 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-08-17` - ncdc 0.7 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-08-08` - ncdc 0.6 released & user guide updated <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-08-02` - ncdc 0.5 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-07-23` - ncdc 0.4 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-07-15` - ncdc 0.3 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-06-27` - ncdc 0.2 released! <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-06-20` - ncdc 0.1 released! And wrote a user guide for it. <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-06-11` - Added NCurses colour experiment <!- link: /dump/nccolour ->
|
||||
`2011-06-03` - Added my latest project: ncdc <!- tags: ncdc, link: /ncdc ->
|
||||
`2011-02-07` - TUWF 0.1 released and now also available on CPAN <!- tags: tuwf, link: /tuwf ->
|
||||
`2011-01-27` - Documented and uploaded one of my older projects: TUWF <!- tags: tuwf, link: /tuwf ->
|
||||
`2011-01-09` - Added my json.mll OCaml library to code dump <!- link: /dump ->
|
||||
`2010-08-13` - ncdu 1.7 released! <!- tags: ncdu, link: /ncdu ->
|
||||
`2009-12-22` - Added vinfo.c script to code dump <!- link: /dump ->
|
||||
`2009-10-23` - ncdu 1.6 released! <!- tags: ncdu, link: /ncdu ->
|
||||
`2009-09-21` - Tiny CSS fix to make this site look good in certain configurations.
|
||||
`2009-05-02` - ncdu 1.5 released! <!- tags: ncdu, link: /ncdu ->
|
||||
`2009-04-30` - Site redesign and reorganisation.
|
||||
-->
|
||||
76
mkfeed.pl
Executable file
76
mkfeed.pl
Executable file
|
|
@ -0,0 +1,76 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Announcements are read from dat/index.md; Each announcement must have the following format:
|
||||
# `$date` - $title $meta
|
||||
# : $body
|
||||
#
|
||||
# The $meta and $body are optional. $meta must be in the form:
|
||||
# <!-- $fields --> or <!- $fields ->
|
||||
#
|
||||
# $fields can be:
|
||||
# tags: comma-separated list of tags, these are used to determine whether an
|
||||
# announcement belongs to a particular feed.
|
||||
# link: Path that the announcement should link to, absent = '/'
|
||||
|
||||
use TUWF::XML ':xml';
|
||||
use POSIX 'strftime';
|
||||
use IPC::Open2;
|
||||
|
||||
$sub = (shift =~ m{pub/(?:([^/]+)/)?feed.atom} ? $1 : '');
|
||||
|
||||
$/=undef;
|
||||
my $body = <>;
|
||||
my @annuncements;
|
||||
while($body =~ /`([0-9]{4}-[0-9]{2}-[0-9]{2})` - ([^\n]+)\n(: .+\n(?:\n| .+\n)*)?/mg) {
|
||||
my($date, $title, $data) = ($1,$2,$3);
|
||||
$data =~ s/^:/ /;
|
||||
$data =~ s/^ //mg;
|
||||
$data =~ s/\s+$//;
|
||||
$meta = $title =~ s/ *<!--? (.+) -?->$// ? $1 : '';
|
||||
$tags =
|
||||
$link = $meta =~ /link:([^:]+)/ ? $1 : '';
|
||||
push @announcements, {
|
||||
date => $date,
|
||||
title => $title,
|
||||
body => $data,
|
||||
tags => $meta =~ /tags:([^:]+)/ ? $1 : '',
|
||||
link => $meta =~ /link: *([^: ]+)/ ? $1 : '',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
$self = 'https://dev.yorhel.nl/' . ($sub ? "$sub/" : ''). 'feed.atom';
|
||||
TUWF::XML->new(default => 1, pretty => 2);
|
||||
xml;
|
||||
tag feed => xmlns => 'http://www.w3.org/2005/Atom', 'xml:lang' => 'en', 'xml:base' => 'https://dev.yorhel.nl/', sub {
|
||||
tag title => $sub ? "\u$sub Project Announcements" : "Yorhel's Projects";
|
||||
tag updated => strftime('%Y-%m-%dT%H:%M:%SZ', gmtime time);
|
||||
tag id => $self;
|
||||
tag link => rel => 'self', type => 'application/atom+xml', href => $self, undef;
|
||||
tag link => rel => 'alternate', type => 'text/html', href => 'https://dev.yorhel.nl/'.$sub, undef;
|
||||
|
||||
for(@announcements) {
|
||||
next if $sub && $_->{tags} !~ /\Q$sub/;
|
||||
last if $n++ >= 10;
|
||||
my $url = 'https://dev.yorhel.nl'. ($_->{link} || '/') . ($_->{link} =~ /#/ ? '' : "#$_->{date}");
|
||||
tag 'entry', sub {
|
||||
tag id => $url;
|
||||
tag title => $_->{title};
|
||||
tag updated => $_->{date}.'T12:00:00Z';
|
||||
tag published => $_->{date}.'T12:00:00Z';
|
||||
tag 'author', sub {
|
||||
tag name => 'Yoran Heling';
|
||||
tag uri => 'https://dev.yorhel.nl/';
|
||||
tag email => 'projects@yorhel.nl';
|
||||
};
|
||||
if($_->{body}) {
|
||||
open2 $OUT, $IN, qw/pandoc -f markdown -t html/;
|
||||
print $IN $_->{body};
|
||||
close $IN;
|
||||
($html = <$OUT>) =~ s{href="/}{href="https://dev.yorhel.nl/}g; # Absolute URLs
|
||||
tag 'summary', type => 'html', $html;
|
||||
}
|
||||
tag link => rel => 'alternate', type => 'text/html', href => $url, undef;
|
||||
};
|
||||
}
|
||||
}
|
||||
133
updates.pl
133
updates.pl
|
|
@ -1,133 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
@UPDATES=map [split(/ +/,$_,3)], split /\n/, <<_;
|
||||
2019-03-23 / The bug trackers for ncdu, ncdc and yxml have been migrated to Gitea.
|
||||
2019-02-04 /ncdu ncdu 1.14 released
|
||||
2018-02-23 /nginx-confgen nginx-confgen 1.2 released
|
||||
2018-02-18 /tuwf TUWF 1.2 released
|
||||
2018-01-29 /ncdu ncdu 1.13 released
|
||||
2018-01-24 /nginx-confgen nginx-confgen 1.1 released
|
||||
2018-01-19 /nginx-confgen New project: nginx-confgen
|
||||
2017-05-28 /doc/funcweb New article: An Opinionated Survey of Functional Web Development
|
||||
2016-12-30 /ncdc ncdc 1.20 released
|
||||
2016-08-24 /ncdu ncdu 1.12 released
|
||||
2016-08-16 /dump/btrfssize Uploaded btrfs-size.pl
|
||||
2015-09-27 /tuwf TUWF 1.0 released
|
||||
2015-04-05 /ncdu ncdu 1.11 released
|
||||
2014-07-29 /doc/easyipc New article: The Sorry State of Convenient IPC
|
||||
2014-06-25 /doc Uploaded my masters thesis
|
||||
2014-04-23 /ncdc ncdc 1.19.1 released
|
||||
2014-02-11 /ncdc ncdc 1.19 released
|
||||
2014-01-09 /doc/dcstats Uploaded an article on DC file list stats
|
||||
2013-11-14 /yxml/man yxml now has a manual
|
||||
2013-10-05 /ncdc ncdc 1.18.1 released
|
||||
2013-09-25 /ncdc ncdc 1.18 released
|
||||
2013-09-03 /yxml Announcing yxml: A small, fast and correct XML parser
|
||||
2013-07-05 /dump/insbench Documented a little data structure benchmark
|
||||
2013-06-15 /ncdc ncdc 1.17 released
|
||||
2013-05-09 /ncdu ncdu 1.10 released
|
||||
2013-04-04 /ylib Created a page for Ylib
|
||||
2013-04-03 /ncdc Created a mailing list for ncdc
|
||||
2013-03-23 /ncdc ncdc 1.16.1 released.
|
||||
2013-03-02 /ncdc ncdc 1.15 released.
|
||||
2012-12-15 /globster Announcing yet another awesome project: Globster!
|
||||
2012-12-02 /ncdu/jsonfmt Documented the ncdu export file format
|
||||
2012-11-04 /ncdc ncdc 1.14 released
|
||||
2012-10-17 /dump Added reference to my repo of small C libs to the code dump
|
||||
2012-10-07 /dump#maildir.pl Added maildir.pl to the code dump
|
||||
2012-09-27 /ncdu ncdu 1.9 released.
|
||||
2012-09-25 /dump#dbusev.c Added dbusev.c to the code dump
|
||||
2012-08-16 /ncdc ncdc 1.13 released.
|
||||
2012-07-10 /ncdc ncdc 1.12 released.
|
||||
2012-05-15 /ncdc ncdc 1.11 released.
|
||||
2012-05-03 /ncdc/install Added installation instructions for ncdc.
|
||||
2012-05-03 /ncdc ncdc 1.10 released.
|
||||
2012-04-10 / Minor site re-style: ncdu/ncdc/tuwf now have their own menu.
|
||||
2012-03-30 /dump Updated ncdc-share-report for Go 1
|
||||
2012-03-24 /ncdu/bug Moved ncdu bug tracker from sourceforge to this site
|
||||
2012-03-17 /ncdc/bug Wrote a small bug tracker for ncdc
|
||||
2012-03-14 /ncdc ncdc 1.9 released.
|
||||
2012-02-15 /doc/commvis Added an article on my new communication system.
|
||||
2012-02-13 /ncdc ncdc 1.8 released.
|
||||
2012-01-19 /tuwf TUWF 0.2 released.
|
||||
2012-01-17 / Complete site redesign.
|
||||
2011-12-30 /ncdc ncdc 1.7 released!
|
||||
2011-12-07 /ncdc ncdc 1.6 released!
|
||||
2011-11-26 /doc Added article section and the article on SQLite.
|
||||
2011-11-03 /ncdu ncdu 1.8 released!
|
||||
2011-11-03 /ncdc ncdc 1.5 released!
|
||||
2011-10-26 /ncdc ncdc 1.4 released!
|
||||
2011-10-19 / PGP-signed all releases of ncdu, ncdc and TUWF.
|
||||
2011-10-14 /ncdc ncdc 1.3 released!
|
||||
2011-09-25 /ncdc ncdc 1.1 released - follwed by a 1.2 quickfix.
|
||||
2011-09-16 /ncdc ncdc 1.0 released!
|
||||
2011-09-15 /ncdc/scr Added some screenshots for ncdu.
|
||||
2011-09-03 /ncdc ncdc 0.9 released!
|
||||
2011-08-26 /ncdc ncdc 0.8 released!
|
||||
2011-08-17 /ncdc ncdc 0.7 released!
|
||||
2011-08-08 /ncdc ncdc 0.6 released & user guide updated
|
||||
2011-08-02 /ncdc ncdc 0.5 released!
|
||||
2011-07-23 /ncdc ncdc 0.4 released!
|
||||
2011-07-15 /ncdc ncdc 0.3 released!
|
||||
2011-06-27 /ncdc ncdc 0.2 released!
|
||||
2011-06-20 /ncdc ncdc 0.1 released! And wrote a user guide for it.
|
||||
2011-06-11 /dump/nccolour Added NCurses colour experiment
|
||||
2011-06-03 /ncdc Added my latest project: ncdc
|
||||
2011-02-07 /tuwf TUWF 0.1 released and now also available on CPAN
|
||||
2011-01-27 /tuwf Documented and uploaded one of my older projects: TUWF
|
||||
2011-01-09 /dump Added my json.mll OCaml library to code dump
|
||||
2010-08-13 /ncdu ncdu 1.7 released!
|
||||
2009-12-22 /dump Added vinfo.c script to code dump
|
||||
2009-10-23 /ncdu ncdu 1.6 released!
|
||||
2009-09-21 / Tiny CSS fix to make this site look good in certain configurations.
|
||||
2009-05-02 /ncdu ncdu 1.5 released!
|
||||
2009-04-30 / Site redesign and reorganisation.
|
||||
_
|
||||
|
||||
sub home {
|
||||
print "% Yorhel's Projects\n\n";
|
||||
print "This site is an attempt to publish and organise my various open source programs and libraries on one central location.\n\n";
|
||||
print qq{## Changes <a href="/feed.atom"><img src="/img/feed_icon.png" alt="Atom feed"></a>\n\n};
|
||||
for (@UPDATES) {
|
||||
printf "- `%s` - [%s](%s)\n", @{$_}[0,2,1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
use TUWF::XML ':xml';
|
||||
use POSIX 'strftime';
|
||||
|
||||
sub atom {
|
||||
$sub = shift;
|
||||
$self = 'https://dev.yorhel.nl/' . ($sub ? "$sub/" : ''). 'feed.atom';
|
||||
TUWF::XML->new(default => 1, pretty => 2);
|
||||
xml;
|
||||
tag feed => xmlns => 'http://www.w3.org/2005/Atom', 'xml:lang' => 'en', 'xml:base' => 'https://dev.yorhel.nl/', sub {
|
||||
tag title => $sub ? "\u$sub Project Announcements" : "Yorhel's Projects";
|
||||
tag updated => strftime('%Y-%m-%dT%H:%M:%SZ', gmtime time);
|
||||
tag id => $self;
|
||||
tag link => rel => 'self', type => 'application/atom+xml', href => $self, undef;
|
||||
tag link => rel => 'alternate', type => 'text/html', href => 'https://dev.yorhel.nl/'.$sub, undef;
|
||||
|
||||
for(@UPDATES) {
|
||||
next if $sub && (!$_->[1] || $_->[1] !~ /^\/\Q$sub/);
|
||||
last if $n++ >= 10;
|
||||
tag 'entry', sub {
|
||||
tag id => "https://dev.yorhel.nl$_->[1]#$_->[0]";
|
||||
tag title => $_->[2];
|
||||
tag updated => $_->[0].'T12:00:00Z';
|
||||
tag published => $_->[0].'T12:00:00Z';
|
||||
tag 'author', sub {
|
||||
tag name => 'Yoran Heling';
|
||||
tag uri => 'https://dev.yorhel.nl/';
|
||||
tag email => 'projects@yorhel.nl';
|
||||
};
|
||||
tag link => rel => 'alternate', type => 'text/html', href => "https://dev.yorhel.nl$_->[1]", undef;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$_ = shift;
|
||||
home if $_ eq 'dat/index.md';
|
||||
atom $1 if m{pub/(?:([^/]+)/)?feed.atom};
|
||||
Loading…
Add table
Add a link
Reference in a new issue