Install
Requires Python 3.10 or 3.11
platform depentdant but make sure to get a distribution with pip and venv
get code
`git clone
navigate
cd templating_ai/ncd-anon
create venb (optional)
python -m venv venv-ncd-anon
windows
./venv-ncd-anon/Scripts/activate
linux/mac
source ./venv venv-ncd-anon/bin/activate
install poetry
pip install poetry
install package
poetry install
Usage
get help
`ncd_anonimize
NCD Anonymizer Tool
==================
A command-line tool to anonymize PDF and TXT files by removing or masking sensitive information.
Usage
-----
python ncd-anon.py <file_or_folder_path>
Arguments
---------
file_or_folder_path : str
Path to either a single file (.pdf or .txt) or a directory containing multiple files.
Output
------
For each processed file, creates a new file with '.anon.txt' extension in the same directory.
Example: 'document.pdf' -> 'document.anon.txt'
Examples
--------
# Anonymize a single PDF file
python ncd-anon.py /path/to/document.pdf
# Anonymize a single text file
python ncd-anon.py /path/to/document.txt
# Anonymize all PDF and TXT files in a directory
python ncd-anon.py /path/to/directory
Notes
-----
- Only .pdf and .txt files are processed
- Files already ending in '.anon.txt' are skipped
- The tool will create anonymized text versions of all processed files
`
proper usage
ncd_anonimize testdata/
output
Device set to use cpu Anonymizing C:\project\novapulse\templating_ai\ncd-anon\testdata\petroleum.txt to C:\project\novapulse\templating_ai\ncd-anon\testdata\petroleum.anon.txt { "Midstates Petroleum Company, Inc.": "ORG", "Stephen C. Pugh": "PER", "Executive": "ORG", "Company": "ORG", "COBRA": "ORG", "Company Party": "ORG", "L": "ORG", "##IABILITY": "ORG", "Equal Employment Opportunity Commission": "ORG", "EEOC": "ORG", "Louisiana": "LOC", "Oklahoma": "LOC", "Woods": "LOC", "Alfalfa": "LOC", "Lincoln": "LOC", "Roger Mills": "LOC", "Dewey": "LOC", "Ellis": "LOC", "Woodward": "LOC", "Texas": "LOC", "Lipscomb": "LOC", "Ochiltree": "LOC", "Hansford": "LOC", "Board of Directors": "ORG", "Midstates Incentive Holdings LLC": "ORG", "John P. Foley": "PER", "Post Oak Parkway": "LOC", "Suite": "LOC", "Houston": "LOC", "Party": "ORG", "State of Texas": "LOC", "MIDSTATES PETROLEUM COMPANY": "ORG", "IN": "LOC", "John A. Crum": "PER", "STEPHEN C.": "PER" }
Metadata
Release files for ncd-anon 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ncd_anon-0.1.0.tar.gz | 4.8 kB | Without provenance | Details for ncd_anon-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ncd_anon-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ncd_anon-0.1.0-py3-none-any.whl |
Total release size: 11.0 kB
Release files / ncd_anon-0.1.0.tar.gz
| Download URL | ncd_anon-0.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cfd3b2603ff3c93ee808ecc2d03f7f52f01c7d1e38289c89eee34e77ce3ce45
|
|
BLAKE2b-256 checksum How to use checksums |
b78ccd6c554790c105d2e165bdc823e2bc6adb4609c5b98cd869831534879c34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.11
|
Release files / ncd_anon-0.1.0-py3-none-any.whl
| Download URL | ncd_anon-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c42543cbd7535918d8c0752048f9c5cf71475b4254d8dba8d194220947514b65
|
|
BLAKE2b-256 checksum How to use checksums |
8ced0c7848ffd85cb2e80a13562834eafcb6b8d5f77aaca41291a8a4df74edfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.11
|
Security for ncd-anon 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.