Skip to main content

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

Metadata

Release files for staticdirindex 1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for staticdirindex 1.11
File Size Uploaded Provenance Actions
staticdirindex-1.11.tar.gz 7.7 kB Without provenance Details for staticdirindex-1.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for staticdirindex 1.11
File Interpreter ABI Platform Actions
staticdirindex-1.11-py3-none-any.whl Python 3 none any Details for staticdirindex-1.11-py3-none-any.whl

Total release size: 16.1 kB

Release files / staticdirindex-1.11.tar.gz

Download URL staticdirindex-1.11.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ec6d8d82fa15811208f252d7ea912a7525ab5536fa9792c65f6dc61a9d54ebca
BLAKE2b-256 checksum
How to use checksums
3e0379d2f1535d4c66d44575e6e7bb452886218a21193a9a7d41487fe5c8946a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / staticdirindex-1.11-py3-none-any.whl

Download URL staticdirindex-1.11-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2cb82474a0ee50bf5615f3bddd2e36f90850555f74ef2661c1d3b0b48f563cc
BLAKE2b-256 checksum
How to use checksums
5341d7271ff66235829fcc023473ae48e13eae1cdb34d16272902d5ee5ed2fce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Security for staticdirindex 1.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page