pa ~main

Package Analyzer

To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Package Analyzer

This program analyzes a destination to determine anchors for package installation. An anchor is identifying information about files only present in a specific folder. If a source directory is provided, the anchors are used to create a folder merge map. This program is meant to help with installing arbitrary packages which the user or a package manager doen't know what to do with.


This program is centered around the concept of anchors. An anchor is some kind of identifying information about a file, such as file header or glob. This program maps anchors to directories in an effort to determine how a package should be installed. For exaple, games made with the Creaton Engine have built-in support for a plugin system, through which the game loads its own files. This program can recognize a plugin by analyzing the game files and finding that all .esp files are in the uniquely named Data folder. As a result, any software package which has a Data folder or an .esp file can be recognized regardless of where in the package's file tree these items reside. For example:

                    (many .pex files)

This folder structure contains a package designed for a creation game, but is not properly packaged to be recognized by any existing tools. Using the package analyzer, we can understand how to handle this package:

> pa -d "C:\Program Files (x86)\Steam\steamapps\common\Skyrim" -s D:\Downloads\arbitrary
"arbitrary/folders/skse_version_number": "Skyrim"

The package analyzer can correctly determine that the skse_version_number directory should be merged with the Skyrim directory to install this package. For a simpler example, many software packages come packaged arbitrarily, like so:

    Software Name/

This is the worst case scenario for the package analyzer, where there is no wrong way per-se to install the software, as long as the .exe file ends up on the PATH or desktop or start menu. The package analyzer can still be used to prevent having multiple versions of the software across updates by eliminating the uneccesary directories:

> pa -d "C:\Program Files\Common Files" -s D:\Downloads\softwareVersion -f
"Software Name": "Common Files"

The package analyzer can load additional anchors from a config file or stdin. Config files should be YAML mappings with identifiers as the keys and paths relative to the destination root as the values.


glob: can be used for case-insensitive file globbing pa:root is required to define the destination pa:default is required when using --force header: can be used to define hex charachters at the begining of a file

  • Joseph Mendoza
1.0.1 2020-Dec-09
1.0.0 2020-Dec-06
~main 2020-Dec-20
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 11 downloads total

Short URL: