{"id":28447568,"url":"https://github.com/bikemazzell/autofill-parser","last_synced_at":"2026-05-18T17:09:28.470Z","repository":{"id":297238404,"uuid":"994346573","full_name":"bikemazzell/autofill-parser","owner":"bikemazzell","description":"Parser and de-duplicator for autofill collection files","archived":false,"fork":false,"pushed_at":"2025-06-04T19:23:09.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-04T20:55:10.331Z","etag":null,"topics":["autofill","json","osint","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bikemazzell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-01T18:37:34.000Z","updated_at":"2025-06-04T19:23:11.000Z","dependencies_parsed_at":"2025-06-04T20:58:11.648Z","dependency_job_id":"57c48ae8-33b4-47db-ac75-fdef9cefc249","html_url":"https://github.com/bikemazzell/autofill-parser","commit_stats":null,"previous_names":["bikemazzell/autofill-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bikemazzell/autofill-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bikemazzell%2Fautofill-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bikemazzell%2Fautofill-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bikemazzell%2Fautofill-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bikemazzell%2Fautofill-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bikemazzell","download_url":"https://codeload.github.com/bikemazzell/autofill-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bikemazzell%2Fautofill-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33184852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autofill","json","osint","rust"],"created_at":"2025-06-06T12:06:03.251Z","updated_at":"2026-05-18T17:09:28.463Z","avatar_url":"https://github.com/bikemazzell.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Autofill Parser\n\nA high-performance autofill data parser that processes multiple input files, merges records based on common identifiers, and outputs consolidated data in NDJSON format. Written in Rust for exceptional speed, memory efficiency, and reliability. Capable of processing multi-GB files with configurable memory management.\n\n## Purpose\n\nThe primary goal of this tool is to:\n1.  Read data from all files within a specified input directory.\n2.  Parse each line, which is expected to be a comma-separated list of key:value pairs.\n3.  Identify a primary key for each record (preferring emails, then 'identifier' field if it's an email, then 'username', then 'login').\n4.  Merge data for the same user from different lines or files. The merging strategy is to keep the first encountered value for any given field (excluding the primary identifier and email list, which are handled specially).\n5.  Output each unique user record as a JSON object on a new line (NDJSON format) to a specified output file or directory.\n6.  Log processing errors and skipped lines to `processing_errors.log` for review.\n\n## Installation\n\n1.  **Install Rust**: If you don't have Rust installed, follow the official instructions at [rust-lang.org](https://www.rust-lang.org/tools/install).\n2.  **Clone the Repository**:\n    ```bash\n    git clone \u003crepository-url\u003e\n    cd autofill-parser\n    ```\n3.  **Build the Project**:\n    You can use the provided `build.sh` script or `make`:\n    *   Using `build.sh` (creates `./autofill_parser` executable in the project root):\n        ```bash\n        chmod +x build.sh\n        ./build.sh\n        ```\n    *   Using `Makefile` (also creates `./autofill_parser`):\n        ```bash\n        make build \n        ```\n    This will compile the project in release mode. The executable will be located at `target/release/autofill_parser` and also copied to `./autofill_parser` in the project root if you use `build.sh` or `make build`.\n\n## How to Run\n\nOnce built, you can run the program from the project root directory:\n\n```bash\n./autofill_parser --input \u003cINPUT_DIRECTORY_PATH\u003e --output \u003cOUTPUT_FILE_OR_DIRECTORY_PATH\u003e\n```\n\n**Arguments**:\n*   `-i, --input \u003cINPUT_DIRECTORY_PATH\u003e`: (Required) Path to the input folder containing files to process.\n*   `-o, --output \u003cOUTPUT_FILE_OR_DIRECTORY_PATH\u003e`: (Required) Path to the output file or folder. If a folder is specified, output will be saved as `result.ndjson` in that folder.\n*   `-t, --threads \u003cNUMBER\u003e`: (Optional) Number of threads for parallel processing (0 = auto-detect, default: 0).\n*   `-v, --verbose`: (Optional) Activate verbose mode to print detailed processing information to the console (in addition to `processing_errors.log`).\n\n**Example**:\n```bash\n./autofill_parser --input ./test_data --output ./test_output/users.ndjson\n```\nOr, to output to a directory (file will be `results.ndjson` inside it):\n```bash\n./autofill_parser --input ./test_data --output ./test_output/\n```\nTo run with verbose output:\n```bash\n./autofill_parser --input ./test_data --output ./test_output/users_verbose.ndjson -v\n```\nTo run with custom thread count:\n```bash\n./autofill_parser --input ./test_data --output ./test_output/users.ndjson -t 8\n```\n\nThe `Makefile` also provides a convenience target to run with sample data:\n```bash\nmake run \n```\nThis will use `test_input/` as input and save results to `test_output/actual_data_result.ndjson`.\nThere's also `make run-verbose`.\n\n## Performance and Memory Management\n\nThis parser is designed for high performance and can handle extremely large datasets:\n\n*   **Speed**: Processes 55,000+ records per second on modern hardware\n*   **Memory Safety**: Configurable memory limits prevent OOM crashes\n*   **File Size**: Handles files from KB to multi-GB without skipping\n*   **Parallelism**: Automatic thread pool sizing based on CPU cores\n*   **Adaptive Strategy**: Adjusts processing based on dataset size\n\nThe program uses a producer-consumer pattern with memory-aware processing that automatically swaps to disk when approaching memory limits. Configuration can be adjusted in `config.json` for different memory profiles.\n\n## Searching and Formatting the Output\n\nThe output file (e.g., `result.ndjson`) is in NDJSON format, meaning each line is a valid JSON object. This makes it easy to process with command-line tools like `ripgrep` (rg) for searching and `jq` for JSON manipulation.\n\n**Prerequisites**:\n*   Install `ripgrep` (rg): [Installation Guide](https://github.com/BurntSushi/ripgrep#installation)\n*   Install `jq`: [Download jq](https://jqlang.github.io/jq/download/)\n\n**Examples**:\n\nLet's assume your output file is `test_output/actual_data_result.ndjson`.\n\n1.  **Find lines containing a specific email or keyword using `rg`**:\n    ```bash\n    rg \"user@example.com\" test_output/actual_data_result.ndjson\n    ```\n    This will print all lines (JSON objects) that contain \"user@example.com\".\n\n2.  **Find lines and pretty-print the matching JSON using `rg` and `jq`**:\n    ```bash\n    rg \"some_username\" test_output/actual_data_result.ndjson | jq '.'\n    ```\n    *   `rg \"some_username\" ...` finds the lines.\n    *   `| jq '.'` pipes each matching line to `jq`, and `.'` tells `jq` to pretty-print the entire JSON object.\n\n3.  **Find lines and extract specific fields using `rg` and `jq`**:\n    Suppose you want to find users with \"some_value\" in any of their fields and display only their `identifier` and `emails`:\n    ```bash\n    rg \"some_value\" test_output/actual_data_result.ndjson | jq '{identifier: .identifier, emails: .emails}'\n    ```\n    This will output a new JSON object for each match, containing only the specified fields.\n\n4.  **Search for a specific value in a specific field (more advanced `jq` filtering after `rg`)**:\n    If you want to find users where the `username` field is exactly \"targetuser\":\n    ```bash\n    # First, rg might narrow down lines that mention \"targetuser\"\n    rg \"targetuser\" test_output/actual_data_result.ndjson | jq 'select(.other_fields.username == \"targetuser\")'\n    ```\n    Or, if \"username\" might not always be in `other_fields` (e.g., it could be the main identifier):\n    ```bash\n    rg \"targetuser\" test_output/actual_data_result.ndjson | jq 'select(.identifier == \"targetuser\" or .other_fields.username == \"targetuser\" or .other_fields.login == \"targetuser\")'\n    ```\n    These examples show how you can combine the power of `rg` for fast text searching with `jq` for structured JSON querying and transformation.\n\n## License\n\nThis project is licensed under the MIT License.\n\n```\nMIT License\n\nCopyright (c) 2025\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n``` ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbikemazzell%2Fautofill-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbikemazzell%2Fautofill-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbikemazzell%2Fautofill-parser/lists"}