sgg

static gallery generator written in shell
git clone http://git.hanabi.in/repos/sgg.git
Log | Files | Refs

README.asc (2340B)


      1    ___  __ _  __ _ 
      2   / __|/ _` |/ _` |
      3   \__ \ (_| | (_| |
      4   |___/\__, |\__, |
      5        |___/ |___/ 
      6 
      7 ===================
      8 
      9 sgg is a static gallery generator written in shell.
     10 
     11 sgg generates a single page gallery consisting of all the media in a
     12 directory.  It prepends `_header.html' and appends `_footer.html' and
     13 also generates an RSS feed.  The media is added in an HTML class called
     14 `gallery'.
     15 
     16 Along with a webpage, it creates an RSS feed, at `/rss.xml'.
     17 
     18 License
     19 =======
     20 
     21 This software is licensed under GNU AGPLv3.  See LICENSE file for what
     22 you can do with this.
     23 
     24 Usage
     25 =====
     26 
     27 Depending on if you have BSD sed or GNU sed, checkout `prod-bsd' or
     28 `prod-gnu' branch for using.  Move `sgg' to your bin/ directory.
     29 
     30 $ sgg src consts
     31 
     32 src/ directory contains all the media -- the script respects `.mp4' and
     33 `.jpg' files only (*case sensitive*).  If there are other extensions to
     34 be supported, modifying the source code should suffice.
     35 
     36 consts/ directory has `_header.html', `_footer.html', `style.css' and
     37 `favicon.png' which you should probably add, to make the gallery
     38 presentable.  A sample version of the files is provided along with the
     39 source code in the consts/ directory.
     40 
     41 An RSS feed is generated along with the website.  `_rss-header.xml' and
     42 `_rss-footer.xml' in the consts/ directory contain the code to generate
     43 it.
     44 
     45 Changes
     46 =======
     47 
     48 While the script can work as-is, if you want to use the default files,
     49 certain things need to be edited.
     50 
     51 Consider running the following command:
     52 
     53 $ grep -R "___.*___" . --exclude-dir=src --exclude=README.asc
     54 
     55 The output of the command are the things that should be edited to
     56 customise the gallery for your needs.
     57 
     58 Caveat
     59 ======
     60 
     61 The media is added in a reverse alphabetical order, so hierarchy like
     62 this would be handy:
     63 
     64 src/2021/08/23/01.jpg
     65 src/2021/08/23/02.mp4
     66 
     67 That is year 2021, month 08, date 23, and a chronological indexing.
     68 
     69 This assumption is used by the RSS feed generator.
     70 
     71 
     72 Source code
     73 ===========
     74 
     75 The git repository of this source code has two branches, BSD and GNU
     76 for BSD sed and GNU sed.
     77 
     78 Please email your patches to <me+code@hanabi.in>.  The utility of this
     79 script is limited to generation of a gallery and an RSS feed ONLY.
     80 
     81 Donation
     82 ========
     83 
     84 Send donations via Monero to 8AzRVa7yh6k87ZNZd5WRkCJY932N9FM5Z9H9LrRKQPUebuPaKr4Y7NJXNg9whyUyCKQ523GMuftoxgxgbqiTmHtxPM4a2Eg