___ __ _ __ _
/ __|/ _` |/ _` |
\__ \ (_| | (_| |
|___/\__, |\__, |
sgg is a static gallery generator written in shell.
sgg generates a single page gallery consisting of all the media in a
directory. It prepends `_header.html' and appends `_footer.html' and
also generates an RSS feed. The media is added in an HTML class called
Along with a webpage, it creates an RSS feed, at `/rss.xml'.
This software is licensed under GNU AGPLv3. See LICENSE file for what
you can do with this.
Depending on if you have BSD sed or GNU sed, checkout `prod-bsd' or
`prod-gnu' branch for using. Move `sgg' to your bin/ directory.
$ sgg src consts
src/ directory contains all the media -- the script respects `.mp4' and
`.jpg' files only (*case sensitive*). If there are other extensions to
be supported, modifying the source code should suffice.
consts/ directory has `_header.html', `_footer.html', `style.css' and
`favicon.png' which you should probably add, to make the gallery
presentable. A sample version of the files is provided along with the
source code in the consts/ directory.
An RSS feed is generated along with the website. `_rss-header.xml' and
`_rss-footer.xml' in the consts/ directory contain the code to generate
While the script can work as-is, if you want to use the default files,
certain things need to be edited.
Consider running the following command:
$ grep -R "___.*___" . --exclude-dir=src --exclude=README.asc
The output of the command are the things that should be edited to
customise the gallery for your needs.
The media is added in a reverse alphabetical order, so hierarchy like
this would be handy:
That is year 2021, month 08, date 23, and a chronological indexing.
This assumption is used by the RSS feed generator.
The git repository of this source code has two branches, BSD and GNU
for BSD sed and GNU sed.
Please email your patches to <email@example.com>. The utility of this
script is limited to generation of a gallery and an RSS feed ONLY.
Send donations via Monero to 8AzRVa7yh6k87ZNZd5WRkCJY932N9FM5Z9H9LrRKQPUebuPaKr4Y7NJXNg9whyUyCKQ523GMuftoxgxgbqiTmHtxPM4a2Eg