Commands Reference

PubTal Commands Reference.

PubTal supplies two commands: updateSite.py and uploadSite.py.  These are used to rebuild a website and upload a website respectively.

updateSite.py

This takes a minimum of one parameter, the location of the website configuration file.

updateSite.py [options] site.config [content-dir | content-file] [...]

The updateSite.py command first reads in the configuration file and so locates the content, template, and destination directories (defaulting to content, template, and dest respectively).  If only one parameter is passed to updateSite.py, it will then find each file under the content directory and build the corresponding output files.

If more than one parameter is passed, then each extra parameter is taken as content to build.  If the parameter is a directory under the content directory, then any content files in that directory will be built recursively.  If the parameter is a file in the content directory (or one of its children), then just that file will be built.

Take for example:

updateSite.py new-site/site.config new-site/content/index.txt new-site/content/examples/

This will build the index.txt file into index.html and all content files under content/examples/ will be built into their corresponding output files.

options

The following options are supported:

  • -h | --help - Prints out the help description for the command.
  • -a | --all - Builds all classes of content, not just content in the "normal" class.
  • --class classParams - Builds all classes given as supplied in a comma separated list.
  • --logging - Turns on logging.
  • --logfile name - Logs to the file "name" (defaults to updateSite.log).
  • --debug - Turns on debug logging; implies --logging.
  • --debug-simpletal - Turns on debug logging of SimpleTAL, implies --logging.

uploadSite.py

This takes a minimum of one parameter, the location of the website configuration file.

uploadSite.py [options] site.config [destination-dir | destination-file] [...]

The uploadSite.py command first reads in the configuration file and so locates the destination directories.  If only one parameter is passed to uploadSite.py, it will then find each file under the destination directory that needs to be uploaded.  The logic used to determine whether a file needs to be uploaded is explained in the Uploading section.

If more than one parameter is passed, then each extra parameter is taken as destination to upload.  If the parameter is a directory under the destination directory then any files in that directory will be considered for upload recursively.  If the parameter is a file in the destination directory (or one of its children), then just that file will be considered for upload.

Take for example:

uploadSite.py new-site/site.config new-site/dest/index.html new-site/dest/examples/

This will examine the index.html file and all files under dest/examples/ when determining what files to upload.

options

The following options are supported:

  • -h | --help - Prints out the help description for the command.
  • -a | --all - Checks all files are uploaded, not just PubTal generated ones.
  • --force - Uploads files even if PubTal thinks they are up-to-date.
  • --dry-run - Prints out what would have been done, but takes no action.
  • --logging - Turns on logging.
  • --logfile name - Logs to the file "name" (defaults to updateSite.log).
  • --debug - Turns on debug logging; implies --logging.
Last Modified: Sat, 07 Feb 2015 12:35:15 GMT

Made with PubTal 3.5

Copyright 2017 Colin Stewart

Email: colin at owlfish.com