Alt-Ctrl-Proj is an actively maintained fork of PyP6Xer, an open-source project for parsing Primavera XER files in Python. The project is a work in progress and open for community contributions.
In order to install a copy in your system you can use pip package manager as follows:
pip install Alt-Ctrl-Proj
The usage of the library is fairly simple and the import examples can be:
from xer_parser.reader import Reader
Here are some examples of reading and parsing xer files:
xer = Reader("<filename>") # this returns a reader object
to read all projects in file as one xer file may have multiple projects stored into it:
for project in xer.projects:
print(project)
Alt-Ctrl-Proj now includes an XER Explorer tool that helps you quickly analyze the contents of XER files. The tool generates a concise report with key information about the file, including projects, calendars, WBS elements, and more.
After installing Alt-Ctrl-Proj, you can use the XER Explorer tool directly from the command line using the provided entry point:
# Basic usage
xer-explorer path/to/your/file.xer
# Specify custom output file
xer-explorer path/to/your/file.xer -o custom_report.txt
# Include large collections (which are skipped by default)
xer-explorer path/to/your/file.xer --include-large
Note: The
xer-explorer
command is available after installing the package via pip. The script inscripts/xer_explorer.py
is for development or manual use only.
You can also use the Explorer in your Python code:
from xer_parser.tools import explore_xer_file
# Generate a report with default settings
explore_xer_file("path/to/your/file.xer", "output_report.txt")
For more advanced usage and examples, see the documentation.