sethblack / python-seo-analyzer

An SEO tool that analyzes the structure of a site, crawls the site, count words in the body of the site and warns of any technical SEO issues.
Other
1.19k stars 310 forks source link

Added all existing analyze options as arguments #93

Closed TBG-FR closed 1 year ago

TBG-FR commented 1 year ago

Using the README and code informations, I added the available analyze() options/arguments as arguments for the tool/cli

Now what we could achieve by code only (output = analyze(site, sitemap, follow_links=False) or output = analyze(site, sitemap, analyze_headings=True, analyze_extra_tags=True), or both) is available from the cli

Argument Default Description
--analyze-headings False Analyze heading tags (h1-h6).
--analyze-extra-tags False Analyze other extra additional tags.
--no-follow-links True Analyze all the existing inner links as well (might be time consuming).

Examples

# original command with defaults (no headings, no extra tags, and follow links)
docker run sethblack/python-seo-analyzer http://host.docker.internal:8080/ --output-format html  > results.html

# analyze command with headings, extra tags, and follow links
docker run sethblack/python-seo-analyzer http://host.docker.internal:8080/ --analyze-headings --analyze-extra-tags --output-format html  > results.html

# analyze with headings, extra tags, but without follow links
docker run sethblack/python-seo-analyzer http://host.docker.internal:8080/ --analyze-headings --analyze-extra-tags --no-follow-links --output-format html  > results.html

# analyze without headings, without extra tags, and without follow links)
docker run sethblack/python-seo-analyzer http://host.docker.internal:8080/ --no-follow-links --output-format html  > results.html