distribusi is a content management system for the web that produces static pages based on the file system.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.5 KiB

import argparse
from distribusi.distribusi import distribusify
def build_argparser():
parser = argparse.ArgumentParser("""
distbusi is a content management system for the web that produces static
index pages based on folders in the filesystem. It is inspired by the
automatic index functions featured in several web servers. It works by
traversing the file system and directory hierarchy to automatically list
all the files in the directory and providing them with html classes and
tags for easy styling.
help="Select which directory to distribute"
help="Print verbose debug output",
help="Generate 150x150 thumbnails for images",
help="Don't use the template to ouput html",
return parser
def cli_entrypoint():
parser = build_argparser()
args = parser.parse_args()
if args.directory:
if args.verbose:
print('Generating directory listing for', args.directory)
if args.thumbnail:
print('Making thumbnails')
directory = args.directory
directory = '.'
distribusify(args, directory)