Git Product home page Git Product logo

apindex's Introduction

apindex - static file index generator/load reducer

Generate a file index for Github Pages

img

What is this?

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.

Demo

The FTP archive of thinkpads.org is hosted on Github Pages and its generated with apindex. Check it out: https://thinkpads.org/ftp/

How do I use it?

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 install it?

tar -xf apindex-x.xx.tar.gz
cp apindex-x.xx
cmake . -DCMAKE_INSTALL_PREFIX=/usr
sudo make install

How do I add/remove icons?

See share/icons.xml and the files under share/img/*.

apindex's People

Contributors

smclt30p avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

apindex's Issues

+Plus comes before ..

rip

Looks like this was probably an oversight since when do you ever have a + in a directory name, especially as the first chart. Unfortunately I do :(

Great program by the way, initially used it to test my nginx not displaying Japanese correctly (lol UTF-8 was off) and kept using it because it looks better than autoindex on;!

Ignore .git

Ignore .git

There is a good chance there is a Git repository in the directory where this is being used. It should ignore the .git directory in almost all use-cases.

Additionally, we might want to set up more command-line arguments to allow the user to specify certain patterns to ignore.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.