Skip to main content

recursive directory listings with thumbnails

Project description

staticdirindex

Static directory recursively create static directory indices with previews, tagged metadata and folder information blocks.

Usage with GitHub Pages and GitHub actions

The easiest way to deploy a site using staticdirindex is with GitHub pages and an accompanying GitHub Action, you can find an example GitHub actions workflow in example-action.yml

Usage

usage: staticdirindex [--sitename SITENAME] [--baseurl BASEURL] directory

Note that the directory indices will be generated as in-place in directory

Directory header

By putting a file called header.html in a folder it will be included at the start of the directory listing. The contents of header.html should not be a full html document but rather an html fragment as it will be included inline.

Ignores

By default staticdirindex will not include files or folders it uses for special purposes in the directory listing. Note that staticdirindex will still leave the files in place. If you want to exclude more files from the listings you can add a .listignore file to the root directory with the same format as a .gitignore.

Sitemap

staticdirindex will generate a sitemap.xml in the root directory and a robots.txt file that points to this sitemap. If the --baseurl parameter is passed. (This is required to generate a sitemap.org compliant file as it requires each file location to be absolute and include protocol)

Passing --baseurl will also add <link rel="canonical"> to each directory listing.

schema.org json+ld

To Be Implemented, see #6

Previews

This script uses preview-generator which in terms require several dependencies. staticdirindex fails gracefully by not including previews for filetypes that are not supported, or where the necessary dependencies are missing. You may have to read preview-generator's documentation to see what is required for your system, but for ubuntu-latest the following should give you previews for most things

# apt-get install zlib1g-dev libjpeg-dev python3-pythonmagick inkscape \
  xvfb poppler-utils libfile-mimeinfo-perl qpdf libimage-exiftool-perl \
  ufraw-batch ffmpeg  libmagickwand-dev libreoffice

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

staticdirindex-1.9.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

staticdirindex-1.9-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file staticdirindex-1.9.tar.gz.

File metadata

  • Download URL: staticdirindex-1.9.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for staticdirindex-1.9.tar.gz
Algorithm Hash digest
SHA256 19fed910678763269dba95ca95d65e23fe6cba36cc7e75b567a5598fb438ef6d
MD5 33cab75b68552497061ee23a46ce2305
BLAKE2b-256 0f3b802c4e6392c76946459860256623814755d6948850c1dfd72b56db4a9401

See more details on using hashes here.

File details

Details for the file staticdirindex-1.9-py3-none-any.whl.

File metadata

  • Download URL: staticdirindex-1.9-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for staticdirindex-1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 15a13bc81233c79fb617af9f62b55b09cbbb6891751d237e2004b78226eb1413
MD5 b4c72b45fd340814b84f8e54516f9554
BLAKE2b-256 99aa0d3d6c154abfd463100e290ef20286c3a8236e5f33bf2459390a06811602

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page