Skip to content

manuelcabral/minifykr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

minifykr

A script to minify XML files in krpano projects. It requires the argparse library, which is available in Python 3.2.

Usage: minifykr.py [-e] [inputFile] [outputFile]

  • The default values for inputFile and outputFile are "tour.xml" and "tour.min.xml"
  • When -e is specified, the outputFile will be encrypted using kencrypt. This required kencrypt to be in the PATH

krpano projects often consist of a large number of XML files, which have to be loaded by the browser. This script minifies the XML code, merging all the files and removing unnecessary code, such as comments or spaces between XML tags.

This script recursively transverses all the files which are included in "inputFile" through <include> tags, minifies their code and writes the result to "outputFile". Minifying does the following:

  • removes comments
  • removes characters between tags
  • removes text inside tags which are not <data> or <action>

About

A script to minify XML files in KRPano projects

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages