Skip to content

Conversation

@kachick
Copy link
Contributor

@kachick kachick commented Nov 20, 2025

The version output is simple but useful for smoke tests, especially for package managers.

For example, nixpkgs has testing helpers, such as versionCheckHook and testVersion, that use this output.

I omitted the short option such as v in this PR.

After this change

> ./target/debug/scraper --version
scraper 0.24.0

> ./target/debug/scraper --help
Usage: scraper [options] SELECTOR [FILE ...]

Options:
    -H, --html          output HTML of elements
    -I, --inner-html    output inner HTML of elements
    -a, --attr ATTR     output attribute value of elements
    -c, --classes       output classes of elements
    -d, --document      parse input as HTML documents
    -f, --fragment      parse input as HTML fragments
    -i, --id            output ID of elements
    -n, --name          output name of elements
    -t, --text          output text of elements
    -h, --help          this cruft
        --install-man-page PATH
                        install real documentation
        --version       output version number

@adamreichold adamreichold merged commit 85e6967 into rust-scraper:master Nov 20, 2025
5 checks passed
@kachick
Copy link
Contributor Author

kachick commented Nov 20, 2025

Thank you for merging!

@kachick kachick deleted the version-flag branch November 20, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants