Skip to content

Commit

Permalink
Update docs + Version Bump (#57)
Browse files Browse the repository at this point in the history
* Update docs

* Version bump to 0.8.0
  • Loading branch information
EndlessTrax authored Oct 4, 2024
1 parent 2013a81 commit f70f0c4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 31 deletions.
67 changes: 37 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

[![PyPI version](https://badge.fury.io/py/pyanchor.svg)](https://badge.fury.io/py/pyanchor)
![GitHub](https://img.shields.io/github/license/endlesstrax/pyanchor)
![Black](https://img.shields.io/badge/code%20style-black-000000.svg)
![CodeCov](https://codecov.io/gh/EndlessTrax/pyanchor/branch/master/graph/badge.svg)
![Build](https://travis-ci.org/EndlessTrax/pyanchor.svg?branch=master)

Dead links are an annoyance for websites with an extensive amount of content. A side from the
negative impact on SEO, dead links are an annoyance for any user that clicks on one.
Expand All @@ -14,18 +11,27 @@ into your development workflow so that users never see a 404 in the first place.

## Install

PyAnchor requires Python 3.7 and above.
> Requires Python 3.8 and above.
It is recommended that you install this package in a virtual or isoloated environment. The easiest way to do this
is with pipx.

```shell
pipx install pyanchor
```

Alternatively, you can install it with pip into your virtual environment:

MacOS / Linux:

```shell
$ python3 -m pip install pyanchor
python3 -m pip install pyanchor
```

Windows:

```cmd
> python -m pip install pyanchor
```pwsh
python -m pip install pyanchor
```

## Using the CLI
Expand All @@ -34,48 +40,54 @@ The CLI can be invoked with the `pyanchor` command. A URL **must** be provided u

To get the help page:

```shell script
> pyanchor --help
```shell
pyanchor --help
```

![Example Gif](/assets/example-help.gif)

Basic example for a single page:

> Note: all provided URLs must include a valid HTTP scheme.
```shell
> pyanchor https://mysite.com/
pyanchor https://mysite.com/
```


![Example Gif](/assets/example-single-page.gif)


If you want to check all links on a website, and not just a single page, a `sitemap.xml` URL may be
provided and flagged with `--sitemap`.
If you want to check all links on a website, and not just a single page, a `sitemap.xml` URL may be provided and
flagged with `--sitemap`.

Example:

```shell script
> pyanchor https://mysite.com/sitemap.xml --sitemap
```shell
pyanchor https://mysite.com/sitemap.xml --sitemap
```

![Example Gif](/assets/example-sitemap.gif)

By default, successful requests are not printed to the terminal. To see all urls with a `200`
response add the `--verbose` flag.

```shell script
> pyanchor https://mysite.com --verbose
```shell
pyanchor https://mysite.com --verbose
```
![Example Gif](/assets/example-single-page-verbose.gif)

```shell script
> pyanchor https://mysite.com/sitemap.xml --sitemap --verbose
```shell
pyanchor https://mysite.com/sitemap.xml --sitemap --verbose
```

![Example Gif](/assets/example-sitemap-verbose.gif)

If you wish the output the results to a csv file, instead of to the terminal (default), then you may wish to use
the `--output-csv` flag:

```shell
pyanchor https://mysite.com --output-csv output/path/to/file
```

## But wait, there's more...

To integrate PyAnchor into your application, you can import the `LinkResults` class. `LinkResults`
Expand Down Expand Up @@ -126,29 +138,24 @@ and use the appropriate label.

## Support

If you would like to show your support for the project, I would be very grateful if you would donate
to a charity close to my heart, [Walk AS One](https://walkasone.org/donate/).

And if you would prefer to donate to me personally instead,
If you would like to show your support for the project,
[you can sponsor me on Github](https://github.com/sponsors/EndlessTrax)? 🤓


## How to Contribute

Please **raise an issue** before making a PR, so that the issue and implementation can be discussed before you write any code. **This will save you time**, and increase the chances of your PR being merged without significant changes.
Please **raise an issue before making a PR**, so that the issue and implementation can be discussed before you write any code. This will save you time, and increase the chances of your PR being merged without significant changes.

Please make PR's on a **new branch**, and _not_ on main/master.

Please **format you code** with [Black](https://pypi.org/project/black/).
Please **make PR's on a new branch**, and _not_ on main/master.

Please **include tests** for any PR's that include code (unless current tests cover your code contribution).


Please **add documentation** for any new features or flags.

## Contributors

Thank you to:

- [Zingzy](https://github.com/Zingzy) for PR [#55](https://github.com/EndlessTrax/pyanchor/pull/55)
- [mrbazzan](https://github.com/mrbazzan) for PR [#25](https://github.com/EndlessTrax/pyanchor/pull/25)
- [Icelain](https://github.com/Icelain) for PR [#11](https://github.com/EndlessTrax/pyanchor/pull/11)
- [wevnasc](https://github.com/wevnasc) for PR [#8](https://github.com/EndlessTrax/pyanchor/pull/8)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "pyanchor"
version = "0.7.3"
version = "0.8.0"
authors = [
{name="Ricky White", email="[email protected]"},
]
Expand Down

0 comments on commit f70f0c4

Please sign in to comment.