Name | ncd-anon JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-12-11 07:09:31 |
maintainer | None |
docs_url | None |
author | Jaap Oosterbroek |
requires_python | <3.12,>=3.10.0 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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"
}
`
Raw data
{
"_id": null,
"home_page": null,
"name": "ncd-anon",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.12,>=3.10.0",
"maintainer_email": null,
"keywords": null,
"author": "Jaap Oosterbroek",
"author_email": "jaap@net-sky.co",
"download_url": "https://files.pythonhosted.org/packages/b7/8c/cd6c554790c105d2e165bdc823e2bc6adb4609c5b98cd869831534879c34/ncd_anon-0.1.0.tar.gz",
"platform": null,
"description": "# Install\n\n## Requires Python 3.10 or 3.11\nplatform depentdant but make sure to get a distribution with pip and venv\n\n## get code\n`git clone\n\n## navigate\n`cd templating_ai/ncd-anon`\n\n## create venb (optional)\n`python -m venv venv-ncd-anon`\n### windows\n`./venv-ncd-anon/Scripts/activate`\n### linux/mac\n`source ./venv venv-ncd-anon/bin/activate`\n\n## install poetry\n`pip install poetry`\n\n## install package\n`poetry install`\n\n\n# Usage\n\n## get help\n`ncd_anonimize\n\n NCD Anonymizer Tool\n ==================\n\n A command-line tool to anonymize PDF and TXT files by removing or masking sensitive information.\n\n Usage\n -----\n python ncd-anon.py <file_or_folder_path>\n\n Arguments\n ---------\n file_or_folder_path : str\n Path to either a single file (.pdf or .txt) or a directory containing multiple files.\n\n Output\n ------\n For each processed file, creates a new file with '.anon.txt' extension in the same directory.\n Example: 'document.pdf' -> 'document.anon.txt'\n\n Examples\n --------\n # Anonymize a single PDF file\n python ncd-anon.py /path/to/document.pdf\n\n # Anonymize a single text file\n python ncd-anon.py /path/to/document.txt\n\n # Anonymize all PDF and TXT files in a directory\n python ncd-anon.py /path/to/directory\n\n Notes\n -----\n - Only .pdf and .txt files are processed\n - Files already ending in '.anon.txt' are skipped\n - The tool will create anonymized text versions of all processed files\n`\n## proper usage\n`\nncd_anonimize testdata/\n`\n### output\n`\nDevice set to use cpu\nAnonymizing C:\\project\\novapulse\\templating_ai\\ncd-anon\\testdata\\petroleum.txt to C:\\project\\novapulse\\templating_ai\\ncd-anon\\testdata\\petroleum.anon.txt\n{\n \"Midstates Petroleum Company, Inc.\": \"ORG\",\n \"Stephen C. Pugh\": \"PER\",\n \"Executive\": \"ORG\",\n \"Company\": \"ORG\",\n \"COBRA\": \"ORG\",\n \"Company Party\": \"ORG\",\n \"L\": \"ORG\",\n \"##IABILITY\": \"ORG\",\n \"Equal Employment Opportunity Commission\": \"ORG\",\n \"EEOC\": \"ORG\",\n \"Louisiana\": \"LOC\",\n \"Oklahoma\": \"LOC\",\n \"Woods\": \"LOC\",\n \"Alfalfa\": \"LOC\",\n \"Lincoln\": \"LOC\",\n \"Roger Mills\": \"LOC\",\n \"Dewey\": \"LOC\",\n \"Ellis\": \"LOC\",\n \"Woodward\": \"LOC\",\n \"Texas\": \"LOC\",\n \"Lipscomb\": \"LOC\",\n \"Ochiltree\": \"LOC\",\n \"Hansford\": \"LOC\",\n \"Board of Directors\": \"ORG\",\n \"Midstates Incentive Holdings LLC\": \"ORG\",\n \"John P. Foley\": \"PER\",\n \"Post Oak Parkway\": \"LOC\",\n \"Suite\": \"LOC\",\n \"Houston\": \"LOC\",\n \"Party\": \"ORG\",\n \"State of Texas\": \"LOC\",\n \"MIDSTATES PETROLEUM COMPANY\": \"ORG\",\n \"IN\": \"LOC\",\n \"John A. Crum\": \"PER\",\n \"STEPHEN C.\": \"PER\"\n}\n`\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8ced0c7848ffd85cb2e80a13562834eafcb6b8d5f77aaca41291a8a4df74edfb",
"md5": "fd47eaf9cfec9783e0e3b6d1a957f05e",
"sha256": "c42543cbd7535918d8c0752048f9c5cf71475b4254d8dba8d194220947514b65"
},
"downloads": -1,
"filename": "ncd_anon-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fd47eaf9cfec9783e0e3b6d1a957f05e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.12,>=3.10.0",
"size": 6209,
"upload_time": "2024-12-11T07:09:29",
"upload_time_iso_8601": "2024-12-11T07:09:29.653098Z",
"url": "https://files.pythonhosted.org/packages/8c/ed/0c7848ffd85cb2e80a13562834eafcb6b8d5f77aaca41291a8a4df74edfb/ncd_anon-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b78ccd6c554790c105d2e165bdc823e2bc6adb4609c5b98cd869831534879c34",
"md5": "9700798f784933c1aff4f84e80cf1f10",
"sha256": "3cfd3b2603ff3c93ee808ecc2d03f7f52f01c7d1e38289c89eee34e77ce3ce45"
},
"downloads": -1,
"filename": "ncd_anon-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "9700798f784933c1aff4f84e80cf1f10",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.12,>=3.10.0",
"size": 4827,
"upload_time": "2024-12-11T07:09:31",
"upload_time_iso_8601": "2024-12-11T07:09:31.905589Z",
"url": "https://files.pythonhosted.org/packages/b7/8c/cd6c554790c105d2e165bdc823e2bc6adb4609c5b98cd869831534879c34/ncd_anon-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-11 07:09:31",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "ncd-anon"
}