Skip to content

Sovereign-Engineering/static-file-index

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apindex - static file index generator/load reducer

Generate a file index for Github Pages

img

This is a program that generates index.html files in each directory on your server that render the file tree. This is useful for static web servers that need support for file listing. One example of this is Github Pages.

It can also be used to reduce the server load for servers that serve static content, as the server does not need to generate the index each time it is accessed. Basically permanent cache.

The file icons are also embedded into the index.html file so there is no need for aditional HTTP requests.

Installation

pip install git+https://github.com/Sovereign-Engineering/static-file-index

Usage

Just run:

apindex <path-to-directory>

The index header server path is based on your current working directory. So if you run the script from /home/parent on the directory /home/parent/child like this:

cd /home/parent
apindex child/.

The index is generated as Index of /child. If you want it to be absolute to the child directory, then you run apindex from there.

cd /home/parent/child
apindex .

This renders Index of /.

How do I add/remove icons?

See src/apindex/resources/icons.xml and the files under src/apindex/images/*.

Building Distributions

Follow packaging.python.org

About

Static HTML file index generator that can be used for serving files on static servers such as Github Pages

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages

  • HTML 67.9%
  • Python 31.9%
  • Shell 0.2%