A static galley generator. http://pix.hanabi.in
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.
 
 
 
Agastya 286b1b05a7
Create sgg v1.0.0 (code-named "jayaa")
3 weeks ago
consts Create sgg v1.0.0 (code-named "jayaa") 3 weeks ago
.gitignore Create sgg v1.0.0 (code-named "jayaa") 3 weeks ago
LICENSE.asc Create sgg v1.0.0 (code-named "jayaa") 3 weeks ago
README.asc Create sgg v1.0.0 (code-named "jayaa") 3 weeks ago
sgg Create sgg v1.0.0 (code-named "jayaa") 3 weeks ago

README.asc

   ___  __ _  __ _ 
/ __|/ _` |/ _` |
\__ \ (_| | (_| |
|___/\__, |\__, |
|___/ |___/

===================

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
`gallery'.

Along with a webpage, it creates an RSS feed, at `/rss.xml'.

License
=======

This software is licensed under GNU AGPLv3. See LICENSE file for what
you can do with this.

Usage
=====

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
it.

Changes
=======

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.

Caveat
======

The media is added in a reverse alphabetical order, so hierarchy like
this would be handy:

src/2021/08/23/01.jpg
src/2021/08/23/02.mp4

That is year 2021, month 08, date 23, and a chronological indexing.

This assumption is used by the RSS feed generator.


Source code
===========

The git repository of this source code has two branches, BSD and GNU
for BSD sed and GNU sed.

Please email your patches to <me+code@hanabi.in>. The utility of this
script is limited to generation of a gallery and an RSS feed ONLY.

Donation
========

Send donations via Monero to 8AzRVa7yh6k87ZNZd5WRkCJY932N9FM5Z9H9LrRKQPUebuPaKr4Y7NJXNg9whyUyCKQ523GMuftoxgxgbqiTmHtxPM4a2Eg