Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Python Automation Portfolio

Three small, safety-focused Python automations built with the standard library. Every example uses fictional data, includes automated tests, and documents its limits.

Projects

1. CSV cleanup and quality reporting

Cleans headers and whitespace, removes case-insensitive duplicate rows, writes a clean CSV, and generates a JSON quality report.

$ python projects/csv_cleanup/automate_csv.py projects/csv_cleanup/sample_input.csv --output cleaned.csv --report report.json
{
  "input_rows": 4,
  "output_rows": 3,
  "duplicates_removed": 1,
  "blank_cells_by_column": {"Record ID": 1}
}

Quick start:

cd projects/csv_cleanup
python automate_csv.py sample_input.csv --output cleaned.csv --report report.json
python -m unittest -v

Limits: CSV only; full-row deduplication; memory usage grows with the input; no schema inference or Excel formatting.

2. Safe Windows batch file renamer

Plans deterministic batch renames with dry-run as the default, writes a CSV or JSON manifest, rejects collisions, and can undo applied operations. It never deletes files.

$ python batch_rename.py demo_files --prefix holiday --manifest rename_manifest.json
{
  "mode": "dry-run",
  "operations": [
    {"source": "Family Holiday 01.JPG", "target": "holiday_001.jpg", "status": "planned"}
  ]
}

Quick start on Windows:

cd projects\safe_file_renamer
python batch_rename.py demo_files --prefix holiday --manifest rename_manifest.json
# Review the manifest before explicitly applying:
python batch_rename.py demo_files --prefix holiday --manifest rename_manifest.json --apply
python batch_rename.py --undo rename_manifest.json --apply
python -m unittest -v

Limits: one directory at a time; no deletion or overwrite; undo requires the original manifest and files to remain at their expected paths; keep an independent backup.

3. Technical translation QA checker

Compares EN/PT-BR technical files and reports missing or changed placeholders, URLs, Markdown code, HTML/XML tags, localization keys, and empty target segments. Produces text and JSON reports with automation-friendly exit codes.

$ python translation_qa.py samples/strings.en.json samples/strings.pt-BR.json
Translation QA report
=====================
Status: PASS | Errors: 0 | Warnings: 0

No structural QA issues found.

Quick start:

cd projects/translation_qa
python translation_qa.py samples/README.en.md samples/README.pt-BR.md
python translation_qa.py samples/strings.en.json samples/strings.pt-BR.json
python -m unittest -v

Limits: structural QA does not prove linguistic accuracy; YAML support is intentionally limited to mapping-style localization files; complex ICU messages still require human review.

Run the full test suite

Each project is dependency-free and tested separately:

python -m unittest discover -s projects/csv_cleanup -p "test_*.py" -v
python -m unittest discover -s projects/safe_file_renamer -p "test_*.py" -v
python -m unittest discover -s projects/translation_qa -p "test_*.py" -v

Privacy and safety

The repository contains only authored demonstration code and fictional sample data. It contains no customer files, credentials, local manifests, personal email addresses, tokens, or marketplace-specific copy.

License

Code in this repository is available under the MIT License. Sample text and data are original demonstration material included with the repository.

About

Safety-focused Python automation examples for files, CSV data, and technical translation QA.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages