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.11.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: staticdirindex-1.11.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for staticdirindex-1.11.tar.gz
Algorithm Hash digest
SHA256 ec6d8d82fa15811208f252d7ea912a7525ab5536fa9792c65f6dc61a9d54ebca
MD5 8e5b94e3ac8c555d4f1b945dda8bfba7
BLAKE2b-256 3e0379d2f1535d4c66d44575e6e7bb452886218a21193a9a7d41487fe5c8946a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: staticdirindex-1.11-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for staticdirindex-1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 e2cb82474a0ee50bf5615f3bddd2e36f90850555f74ef2661c1d3b0b48f563cc
MD5 200e69bb2560a880ca45a44f19d75e74
BLAKE2b-256 5341d7271ff66235829fcc023473ae48e13eae1cdb34d16272902d5ee5ed2fce

See more details on using hashes here.

Supported by

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