Skip to content

Latest commit

 

History

110 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

General CSV Import

A PlexTrac utility that turns arbitrary CSV finding data into PlexTrac PTRAC files (with optional direct import). The importer code lives in src/see src/README.md for full usage, flags, and mapping docs.

Quick start

Run everything from this directory (the repository root):

pipenv install
pipenv run python src/main.py --headers-file-path header_mapping.csv --data-file-path data/input_files/csv_data.csv --api-version 2.19.0

Repository layout

.
├── src/            # importer code + config.yaml (see src/README.md)
│   ├── main.py         # entry point — run as `python src/main.py`
│   ├── csv_parser.py, mappings.py, settings.py
│   ├── api/  utils/  mapping_utils/
│   ├── paths.py        # anchors all runtime paths to the repo root
│   └── config.yaml
├── data/           # all script I/O (gitignored)
│   ├── input_files/    # put your input data files here
│   ├── exported_ptracs/
│   ├── failed_ptracs/
│   └── testing_files/  # sample + perf data
├── tests/          # pytest suite (run `pipenv run pytest` from root)
├── scripts/        # dev/perf tooling
├── logs/           # run + perf logs (gitignored)
├── docs/
├── AGENTS.md       # guide for adding a new mapping type
└── Pipfile

Running tests

pipenv run pytest

pytest.ini puts src/ on the path, so tests in tests/ import the modules directly (import main, from csv_parser import CSVParser, ...).

Notes

  • Always launch from the repository root; the script is invoked as src/main.py.
  • Runtime paths are anchored to the repo root via src/paths.py, so outputs land in data/ and logs/ no matter the current working directory.

About

Takes a CSV with rows representing client, report, finding and asset data and a CSV with how to map each column to a location in Plextrac. Parses the CSV and import data to Plextrac

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages