Archives for p1k3, a website.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Brennen Bearnes ed0a8d2208 recent links 6 days ago
archives recent links 6 days ago
bin bin/tagger.sh: list files to tag, display already-tagged 2 months ago
code.p1k3.com list.pl: use .git/description, if defined 3 months ago
files last night's doomed rss politicking 1 year ago
includes add xmonad.hs to shortlinks 3 months ago
public remove rendered files in public/ from repo 4 weeks ago
templates basic grid 1 month ago
topics warzel piece 1 week ago
.gitignore remove rendered files in public/ from repo 4 weeks ago
Makefile remove rendered files in public/ from repo 4 weeks ago
README.md tweak README.md, get rid of extraneous code.p1k3.com Makefile 3 months ago
asset_update_tag assorted tagging, links 1 month ago
wrt-lynx-preview.json accumulate some changes from the last couple of weeks 1 year ago
wrt.json bumble bee; switch up template to include description 2 months ago

README.md

p1k3.com

This repository is most of the source files for p1k3.com, a blog. Up-to-date copies may be found at https://p1k3.com/.git or on code.p1k3.com.

archives/ contains the actual entries. Layout is generally something like:

2009/
`-1/
  |+27/
  |+3/
    |-cart_small.jpg
    `-index

2009 is a year, 1 is the month of January, and everything below that level is a day. Some days are simple blobs of markup, others are directories which may contain an index file with the main text of entry, binaries like images, and one or more sub-entries.

bin/ contains various utility scripts for manipulating the contents of /archives. Most of these are invoked from the Makefile, and include:

  • linkdump.pl: generate the linkdump from a couple of RSS feeds
  • header-photos.sh and photos.sh: generate thumbnails and JSON indices for photos
  • topics.sh and list-by-property.py: generate contents of archives/topics
  • tagger.sh: a utility for grepping the archive for strings and applying topic tags

templates/ contains template files.

public/ is mostly a target for rendering public files in.

files/ contains large static files, stored with git-annex. (These will not be available unless they’ve been copied to the current clone of the repository.)

includes/ is for things that are reused in entries or templates with the <include> tag. At this writing, it contains shortlinks.md, which is a set of links for use in Markdown. The idea is that if a link changes or disappears, it can easily be edited or replaced with a local page. All of the enclosed links begin with sl- for easy grepping in future.

topics/ contains vimwiki pages which are used to describe various topics covered in the entries; these are combined with an automatically rendered list of tagged entries to create the contents of archives/topics/.

code.p1k3.com/ contains the home page for code.p1k3.com, which for the moment is hosted on the same system.

See https://code.p1k3.com/gitea/brennen/wrt for the tools I use to render the entries here.

dependencies

You can read these files without any special tools, but rendering or publishing the full site requires a few things. As a baseline, it expects a GNU/Linux system; Debian or a derivative will probably work best. There’s a Makefile with a bunch of little commands, and the bin/ directory contains utilities for generating different kinds of files.

It also uses some other projects.

wrt

wrt is a mostly-Perl static site generator, formerly known as Display.pm. This is the main thing, since it builds almost the entire site.

If you have a working Perl, you can probably install the latest stable release with:

sudo cpan -i App::WRT

galleryhtml

gallery-html is a small python script for making HTML image galleries and thumbnails. It can be installed with:

sudo pip3 install galleryhtml

git-annex

I use git-annex to store large files like photos in only some copies of the repository.

lxml, dominate, and docopt python libraries

bin/list-by-property.py uses lxml and dominate to pull titles out of pages and generate topic lists. It also requires docopt for handling command-line options. You can probably install these with:

sudo pip3 install lxml
sudo pip3 install dominate
sudo pip3 install docopt

building

Make sure you have GNU Make and the rest of the aforementioned dependencies installed, then try running:

make render

The public/ directory should be updated with the latest HTML version of the site.

Various other targets are available.