Metadata-Version: 2.4
Name: hpxml_version_translator
Version: 2.0.0
Summary: Convert HPXML to newer version
Home-page: https://github.com/NatLabRockies/hpxml_version_translator
Author: Ben Park (NLR), Noel Merket (Pearl), Scott Horowitz (NLR)
Author-email: ben.park@nlr.gov
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: lxml
Provides-Extra: dev
Requires-Dist: pytest>=6.2; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Requires-Dist: pytest-xdist; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: rope; extra == "dev"
Requires-Dist: black; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# HPXML Version Translator

This package converts an HPXML file to a newer version.

## Requirements

Python >=3.6

## Installation

In general, we recommended to use a virtual environment or conda environment and then installing with pip, like so:

```
pip install hpxml-version-translator
```

### Developer Installation

If you want to do work on the repo, clone this repo and install in development mode.

```
cd path/to/repo
pip install -e ".[dev]"
```

## How to use

### Command Line

```
hpxml_version_translator -h
usage: hpxml_version_translator [-h] [-o OUTPUT] [-v {2.0,2.1,2.2,2.2.1,2.3,3.0,3.1,4.0,4.1,4.2}] hpxml_input

HPXML Version Translator, convert an HPXML file to a newer version

positional arguments:
  hpxml_input           Filename of hpxml file

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Filename of output HPXML file. If not provided, will go to stdout
  -v {2.0,2.1,2.2,2.2.1,2.3,3.0,3.1,4.0,4.1,4.2}, --to_hpxml_version {2.0,2.1,2.2,2.2.1,2.3,3.0,3.1,4.0,4.1,4.2}
                        Version of HPXML to translate to, default: 4.2
```

### In a Python script

```python
from hpxml_version_translator import convert_hpxml_to_version

convert_hpxml_to_version("4.2", "path/to/in.xml", "path/to/out.xml")
```

It also works with path-like objects and binary file-like objects.
