{"id":18422435,"url":"https://github.com/sri-csl/parsley-rust","last_synced_at":"2025-10-18T10:10:50.720Z","repository":{"id":248187549,"uuid":"191964318","full_name":"SRI-CSL/parsley-rust","owner":"SRI-CSL","description":"Rust infrastructure for Parsley parsing","archived":false,"fork":false,"pushed_at":"2024-05-23T21:42:00.000Z","size":72699,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-13T14:44:37.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SRI-CSL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.txt","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}},"created_at":"2019-06-14T15:13:29.000Z","updated_at":"2024-07-12T21:16:42.000Z","dependencies_parsed_at":"2024-07-12T23:59:40.210Z","dependency_job_id":"68809a59-923f-448f-a2d7-a4a31d0184f3","html_url":"https://github.com/SRI-CSL/parsley-rust","commit_stats":null,"previous_names":["sri-csl/parsley-rust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SRI-CSL/parsley-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fparsley-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fparsley-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fparsley-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fparsley-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SRI-CSL","download_url":"https://codeload.github.com/SRI-CSL/parsley-rust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fparsley-rust/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261994294,"owners_count":23241971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-06T04:29:59.322Z","updated_at":"2025-10-18T10:10:50.606Z","avatar_url":"https://github.com/SRI-CSL.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README and Notes for Parsley Rust\n\n[![Build Status](https://travis-ci.com/SRI-CSL/parsley-rust.svg?token=o5TGhkjJAL4mzkVZNy5S\u0026branch=master)](https://travis-ci.com/SRI-CSL/parsley-rust)\n\n## Requirements\n\nRust compiler 1.55.0-nightly or higher\nCargo package manager (included with Rust)\n\nInstall on Mac OS X with homebrew:\n\n    $ brew uninstall rust  # if you used `brew install rust` before\n    $ brew install rustup\n    $ rustup-init\n    [... use default configuration... ]\n    $ source $HOME/.cargo/env\n    $ rustc --version\n    rustc 1.38.0 (625451e37 2019-09-23)\n    $ cargo --version\n    cargo 1.38.0 (23ef9a4ef 2019-08-20)\n\nFrequently, we need updated Rust tool chains, so:\n\n    $ rustup update\n\nTo switch to the `nightly` toolchain:\n\n    $ rustup default nightly\n\n## Building with Cargo\n\n    $ make  # -\u003e actually calls:\n\nor\n\n    $ cargo build\n       Compiling parsley-rust v0.1.0 (/Users/linda/git/GitHub/Parsley_repos/parsley-rust)\n        Finished dev [unoptimized + debuginfo] target(s) in 1.92s\n\nTo create a stand-alone binary:\n\n    $ cargo build --release\n    $ ls -la target/release/pdf_printer\n    -rwxr-xr-x  2 linda  staff  690124 Nov 12 16:13 target/release/pdf_printer\n\nor use:\n\n    $ make release\n\n## Running the PDF Parser\n\nWith cargo:\n\n    $ cargo run \u003cPDF_file\u003e\n\nfor example:\n\n    $ cargo run tests/test_files/minimal_leading_garbage.pdf\n       Compiling parsley-rust v0.1.0 (/Users/linda/git/GitHub/Parsley_repos/parsley-rust)\n        Finished dev [unoptimized + debuginfo] target(s) in 2.71s\n         Running `target/debug/pdf_printer tests/test_files/minimal_leading_garbage.pdf`\n    INFO     - minimal_leading_garbage.pdf at         21 - Found 21 bytes of leading garbage, dropping from buffer.\n    INFO     - minimal_leading_garbage.pdf at        754 - Found %%EOF at offset 754.\n    INFO     - minimal_leading_garbage.pdf at        746 - Found startxref at offset 746.\n    INFO     - minimal_leading_garbage.pdf at        740 -  startxref span: 740..753.\n    INFO     - minimal_leading_garbage.pdf at        586 - startxref points to offset 586 for xref\n    INFO     - minimal_leading_garbage.pdf at        570 - Found 5 objects starting at 0:\n    DEBUG    - minimal_leading_garbage.pdf    free object (next is 0).\n    DEBUG    - minimal_leading_garbage.pdf    inuse object at 18.\n    DEBUG    - minimal_leading_garbage.pdf    inuse object at 77.\n    DEBUG    - minimal_leading_garbage.pdf    inuse object at 178.\n    DEBUG    - minimal_leading_garbage.pdf    inuse object at 457.\n    INFO     - minimal_leading_garbage.pdf at          0 - Found trailer 0 bytes from end of xref table.\n    DEBUG    - minimal_leading_garbage.pdf Beginning breadth-first traversal of root object:\n    [...]\n\nOr the stand-alone binary:\n\n    $ target/release/pdf_printer\n    error: The following required arguments were not provided:\n        \u003cPDF_FILE\u003e\n\n    USAGE:\n        pdf_printer [FLAGS] [OPTIONS] \u003cPDF_FILE\u003e\n\n    For more information try --help\n\nand:\n\n    $ target/release/pdf_printer --help\n    Parsley PDF Parser\n    =\u003e parses given PDF file\n\n    USAGE:\n        pdf_printer [FLAGS] [OPTIONS] \u003cPDF_FILE\u003e\n\n    FLAGS:\n        -h, --help       Prints help information\n        -V, --version    Prints version information\n        -v               verbosity that increases logging level (default: INFO)\n\n    OPTIONS:\n        -i, --input \u003cJSON_FILE\u003e     input file with TA1 JSON content to guide the parsing\n        -o, --output \u003cJSON_FILE\u003e    output file where to write JSON for TA1 to\n\n    ARGS:\n        \u003cPDF_FILE\u003e    the PDF file to parse\n\nAn example of using the new input argument:\n\n    $ target/release/pdf_printer -v tests/test_files/minimal.pdf -i tests/test_files/input.json\n    DEBUG    - minimal.pdf parsed input JSON: {\"COMMENT\":\"Testing capability of PDF parser to consume an input JSON file\",\"value\":42}\n    [...]\n\n\n## Installing a static binary\n\n    $ cargo install --path .\n      Installing parsley-rust v0.1.0 (/Users/linda/git/GitHub/Parsley_repos/parsley-rust)\n        Updating crates.io index\n      Downloaded env_logger v0.7.1\n      Downloaded libc v0.2.65\n      Downloaded autocfg v0.1.7\n       Compiling autocfg v0.1.7\n       Compiling libc v0.2.65\n       Compiling num-traits v0.2.8\n       Compiling num-integer v0.1.41\n       Compiling time v0.1.42\n       Compiling atty v0.2.13\n       Compiling env_logger v0.7.1\n       Compiling chrono v0.4.9\n       Compiling parsley-rust v0.1.0 (/Users/linda/git/GitHub/Parsley_repos/parsley-rust)\n        Finished release [optimized] target(s) in 36.82s\n      Installing /Users/linda/.cargo/bin/pdf_printer\n       Installed package `parsley-rust v0.1.0 (/Users/linda/git/GitHub/Parsley_repos/parsley-rust)` (executable `pdf_printer`)\n    CSL-CAS15874:parsley-rust linda$ which pdf_printer\n    /Users/linda/.cargo/bin/pdf_printer\n\n## Running unit tests\n\n    $ make test  # -\u003e actually calls:\n\nor\n\n    $ cargo test\n\n## Dockerizing Rust binary\n\n    $ make docker\n\nSee `etc/docker/README.md` for more details.\n\n## Development workflow\n\nTo ensure code is properly formatted before committing, do\n\n    $ git config core.hooksPath .githooks\n\notherwise pull-requests may be hard to review.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsri-csl%2Fparsley-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsri-csl%2Fparsley-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsri-csl%2Fparsley-rust/lists"}