Metadata-Version: 2.1
Name: gitrepoxmlparser
Version: 0.3.3
Summary: Provides Details for your GitRepo master manifest file 
License: MIT
Author: Ravi Dinesh
Author-email: dineshr93@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: flask (>=3.0,<4.0)
Requires-Dist: jinja2 (>=3.0,<4.0)
Requires-Dist: rich (==15.0.0)
Description-Content-Type: text/markdown

# GitRepoXMLParser

## _Capable of processing the AOSP repo's manifest file differentiating from the supplier_

GitRepoXMLParser helps you visualize your AOSP manifest files that is fed for [repo](https://source.android.com/docs/setup/develop/repo) tool
[Rich](https://pypi.org/project/rich/)-powered visualization.

## Manifest file example

```sh
<manifest >
    <remote fetch = "url" name = "pj-gerrit" review = "" / >
    <include name = "supplier.xml" / >
    <include name = "pj_apps.xml" / >
    <remove-project name = "pathto/projec" / >
    <project name = "supplier/pathto/projectrepo" path = "company/pathto/projectrepo" remote = "pj-gerrit" revision = "branch_name" / >
    <project name = "PJ/pathto/projectrepo1" path = "vendor/pathto/projectrepo1" remote = "pj-gerrit" revision = "branch_name" / >
    <project name = "PJ/pathto/projectrepo2" path = "vendor/pathto/projectrepo2" remote = "pj-gerrit" revision = "branch_name" / >
</manifest >
```

## Features

- Visualize your manifest.xml files visually
- The table size depends on the screensize of the command line utility that you are running the script
- HTML report supports global search across all tables and sortable columns

## Installation

gitrepoxmlparser requires [Rich](https://pypi.org/project/rich/) 12.5.1+.

```sh
pip install gitrepoxmlparser
```

Install from source using Make (cross-platform)

```sh
make install
```

## Usage

```sh
cmd>gitrepoxmlparser -h
usage: -m [-h] -f F -c C -s S [-x]

options:
  -h, --help  show this help message and exit
  -f F        manifest xml file
  -c C        Your company name (Should match with companies folder name in the stack)
  -s S        Supplier's Company name (just contrasts with only one vendor)
  -x, --html  For html report
  -p PORT, --port PORT  Port for web server (default: 8080)
```

## HTML Report

Generate an interactive HTML report with the `-x` flag:

```sh
gitrepoxmlparser -f manifest.xml -c company_name -s supplier_name -x
```

The HTML report uses **Flask + Jinja2** for professional, responsive table rendering:
- Full-width tables that adapt to screen size
- Beautiful gradient header and statistics dashboard
- Clean typography and proper spacing
- Hover effects and alternating row colors for readability
- Emoji icons for visual distinction of sections
- Global search input to filter rows across all rendered tables
- Click-to-sort columns on every table (ascending/descending toggle)

Optional: specify a custom port for the web server (default: 8080):

```sh
gitrepoxmlparser -f manifest.xml -c company_name -s supplier_name -x -p 9090
```

To activate the virtual env

```sh
poetry shell
```

Installing dependencies only

```sh
poetry install --no-root
```

To install the dependencies and install the package (reads the poetry.lock or pyproject.toml file )

```sh
poetry install
```

Run tests

```sh
poetry run pytest
```

Build package artifacts

```sh
poetry build
```

## Automation

- CI workflow: `.github/workflows/ci.yml`
  - Runs on push/PR
  - Installs dependencies
  - Runs tests
  - Builds package artifacts
- Release workflow: `.github/workflows/release.yml`
  - Runs when a tag like `v0.3.1` is pushed
  - Builds artifacts and creates a GitHub Release with attached `dist/*` files

## License

MIT

**Free Software, Hell Yeah!**

