the-link-reaper


Namethe-link-reaper JSON
Version 0.8.2 PyPI version JSON
download
home_pageNone
SummaryRemoves dead & duplicate links from markdown files and updates redirects.
upload_time2024-12-20 01:32:03
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9.6
licenseMIT License Copyright (c) [2024] [Ibrahim] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords markdown links list cleaning cli urls
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![image](https://img.shields.io/pypi/v/the-link-reaper.svg)](https://pypi.python.org/pypi/the-link-reaper)
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint) 
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

# link-reaper

Verifies AND automatically reaps links to keep your lists updated and clean of "zombies".

Unlike other link verifiers, this one will make direct changes to your markdown files instead of just preventing push/pull requests (but it can do that too).

# Installation

## For personal usage

Here are a couple options for those who simply want to use the project.

### As an installed Package:

TBD - for directly downloading the package folder

### Using Pip Install:

0. Have Python installed and the latest version of Pip
1. Use `pip install the-link-reaper`
2. See [here](#Terminal) for what you can do with this package.

### Docker

The project includes a Dockerfile you can edit and build for your images. See [here](##Examples) for an example. A downloadable premade image TBD.

### Github Workflow

You can install link-reaper as a python package to use in workflows. See [here](##Examples)  for an example.

## For Developers

### Instructions
0. Have [Python](https://www.python.org/downloads/) installed.
1. Fork this repo (if you want to contribute. If not, skip this step)
2. Find/create your directory of choice
3. Open a terminal in that directory and use `git clone https://github.com/<your name>/<your fork name here>.git` but if you are not using a fork, just use `https://github.com/sharktrexer/link-reaper.git`
4. Create a virtual environment `python3 -m venv venv` 
5. Install requried dependencies `pip install -r requirements.txt` or if you intend to contribute, `pip install -r requirements_dev.txt`
6. Use `python -m link_reaper.reaper reap yourfile.md` utilizing the many options [here](#Terminal) to test or play around with the project.
7. If your contributing, follow the steps below

### Contributing

Feel free to create Issues or Pull Requests at your leisure. If you are unsure if the PR is a good idea, create an Issue first and I will respond as best as I can.

Before creating a pull request, be sure to use the following commands after implementing your changes (and make sure you installed dependencies from dev_requirements.txt):
```
# Lint code
ruff check link-reaper

# Apply lint fixes (you may have to do some manually)
ruff check --fix

# Format changes
ruff format link-reaper

# Optional for bonus points
pylint link-reaper
```
If you don't use the ruff commands, the workflow of this project will fail and it will take longer to merge your potentially beautiful changes!

# Usage

Here are the many ways you can utilize this python package.

## Terminal
```
Package Usage: python -m link_reaper.reaper reap [OPTIONS] [FILES]...
Regular Usage: link-reaper reap [OPTIONS] [FILES]...

  Command that reaps links from markdown files based on your options

Options:
  -s, --show_afterlife         Create an afterlife-filename.md for each
                               checked file that only contains the reaped
                               links.
  -m, --merciful               Instead of overwriting files, create a reaped-
                               filename.md for each checked file that contains
                               applied changes.
  -ig, --ignore_ghosts         Prevents updating redirecting links.
  -id, --ignore_doppelgangers  Ignore duplicate links.
  -is, --ignore_ssl            Disable SSL errors. Not very secure so use with
                               caution.
  -it, --ignore_timeouts       Ignore links that time out.
  -iu, --ignore_urls TEXT      Ignores specific links you want to whitelist.
                               Enter each url comma separated.
  -rs, --reap_status TEXT      Status codes you want to be reaped (By default
                               404, 500, 521 are reaped and 300s are updated).
                               Enter each code comma separated.
  -p, --patience INTEGER       Max # of seconds to wait for url to send data
                               until it times out.
  -dl, --disable_logging       Prevents creation of any log type files (does
                               not overwrite -show-afterlife)
  -v, --verbose                Provide more information on the reaping
                               process.
  --help                       Show this message and exit.
```

## Examples

TODO - show using it from github clone, python and pip install in terminal, github workflow, and docker

## In Progress Features

If you would like to see what is currently in production/what features are planned, visit [my trello page here!](https://trello.com/invite/b/6751e6dee83464d169568c4f/ATTI8034309813ff46026b4d29289c87a874D3DDC4E9/link-reaper)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "the-link-reaper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9.6",
    "maintainer_email": null,
    "keywords": "markdown, links, list cleaning, cli, urls",
    "author": null,
    "author_email": "Ibrahim S <ibrahimisprogramming@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/98/34/1b6b0e98da602128537f4cecdcd1c31a4d9b967ac1142375ca064144b3cc/the_link_reaper-0.8.2.tar.gz",
    "platform": null,
    "description": "[![image](https://img.shields.io/pypi/v/the-link-reaper.svg)](https://pypi.python.org/pypi/the-link-reaper)\r\n[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint) \r\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\r\n\r\n# link-reaper\r\n\r\nVerifies AND automatically reaps links to keep your lists updated and clean of \"zombies\".\r\n\r\nUnlike other link verifiers, this one will make direct changes to your markdown files instead of just preventing push/pull requests (but it can do that too).\r\n\r\n# Installation\r\n\r\n## For personal usage\r\n\r\nHere are a couple options for those who simply want to use the project.\r\n\r\n### As an installed Package:\r\n\r\nTBD - for directly downloading the package folder\r\n\r\n### Using Pip Install:\r\n\r\n0. Have Python installed and the latest version of Pip\r\n1. Use `pip install the-link-reaper`\r\n2. See [here](#Terminal) for what you can do with this package.\r\n\r\n### Docker\r\n\r\nThe project includes a Dockerfile you can edit and build for your images. See [here](##Examples) for an example. A downloadable premade image TBD.\r\n\r\n### Github Workflow\r\n\r\nYou can install link-reaper as a python package to use in workflows. See [here](##Examples)  for an example.\r\n\r\n## For Developers\r\n\r\n### Instructions\r\n0. Have [Python](https://www.python.org/downloads/) installed.\r\n1. Fork this repo (if you want to contribute. If not, skip this step)\r\n2. Find/create your directory of choice\r\n3. Open a terminal in that directory and use `git clone https://github.com/<your name>/<your fork name here>.git` but if you are not using a fork, just use `https://github.com/sharktrexer/link-reaper.git`\r\n4. Create a virtual environment `python3 -m venv venv` \r\n5. Install requried dependencies `pip install -r requirements.txt` or if you intend to contribute, `pip install -r requirements_dev.txt`\r\n6. Use `python -m link_reaper.reaper reap yourfile.md` utilizing the many options [here](#Terminal) to test or play around with the project.\r\n7. If your contributing, follow the steps below\r\n\r\n### Contributing\r\n\r\nFeel free to create Issues or Pull Requests at your leisure. If you are unsure if the PR is a good idea, create an Issue first and I will respond as best as I can.\r\n\r\nBefore creating a pull request, be sure to use the following commands after implementing your changes (and make sure you installed dependencies from dev_requirements.txt):\r\n```\r\n# Lint code\r\nruff check link-reaper\r\n\r\n# Apply lint fixes (you may have to do some manually)\r\nruff check --fix\r\n\r\n# Format changes\r\nruff format link-reaper\r\n\r\n# Optional for bonus points\r\npylint link-reaper\r\n```\r\nIf you don't use the ruff commands, the workflow of this project will fail and it will take longer to merge your potentially beautiful changes!\r\n\r\n# Usage\r\n\r\nHere are the many ways you can utilize this python package.\r\n\r\n## Terminal\r\n```\r\nPackage Usage: python -m link_reaper.reaper reap [OPTIONS] [FILES]...\r\nRegular Usage: link-reaper reap [OPTIONS] [FILES]...\r\n\r\n  Command that reaps links from markdown files based on your options\r\n\r\nOptions:\r\n  -s, --show_afterlife         Create an afterlife-filename.md for each\r\n                               checked file that only contains the reaped\r\n                               links.\r\n  -m, --merciful               Instead of overwriting files, create a reaped-\r\n                               filename.md for each checked file that contains\r\n                               applied changes.\r\n  -ig, --ignore_ghosts         Prevents updating redirecting links.\r\n  -id, --ignore_doppelgangers  Ignore duplicate links.\r\n  -is, --ignore_ssl            Disable SSL errors. Not very secure so use with\r\n                               caution.\r\n  -it, --ignore_timeouts       Ignore links that time out.\r\n  -iu, --ignore_urls TEXT      Ignores specific links you want to whitelist.\r\n                               Enter each url comma separated.\r\n  -rs, --reap_status TEXT      Status codes you want to be reaped (By default\r\n                               404, 500, 521 are reaped and 300s are updated).\r\n                               Enter each code comma separated.\r\n  -p, --patience INTEGER       Max # of seconds to wait for url to send data\r\n                               until it times out.\r\n  -dl, --disable_logging       Prevents creation of any log type files (does\r\n                               not overwrite -show-afterlife)\r\n  -v, --verbose                Provide more information on the reaping\r\n                               process.\r\n  --help                       Show this message and exit.\r\n```\r\n\r\n## Examples\r\n\r\nTODO - show using it from github clone, python and pip install in terminal, github workflow, and docker\r\n\r\n## In Progress Features\r\n\r\nIf you would like to see what is currently in production/what features are planned, visit [my trello page here!](https://trello.com/invite/b/6751e6dee83464d169568c4f/ATTI8034309813ff46026b4d29289c87a874D3DDC4E9/link-reaper)\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) [2024] [Ibrahim]  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Removes dead & duplicate links from markdown files and updates redirects.",
    "version": "0.8.2",
    "project_urls": {
        "Issues": "https://github.com/sharktrexer/link-reaper/issues",
        "Repository": "https://github.com/sharktrexer/link-reaper"
    },
    "split_keywords": [
        "markdown",
        " links",
        " list cleaning",
        " cli",
        " urls"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "523e1936e7d622307630e4f4174270e8bf5a33476d689b5499f76c7fb0a2ee3f",
                "md5": "9448286abfd4c7faa3e677e7077bf433",
                "sha256": "044119c1226d62fcd98be590a6062c6ad68cc63a7d02adc189ed7ca914504e71"
            },
            "downloads": -1,
            "filename": "the_link_reaper-0.8.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9448286abfd4c7faa3e677e7077bf433",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.6",
            "size": 13875,
            "upload_time": "2024-12-20T01:32:01",
            "upload_time_iso_8601": "2024-12-20T01:32:01.828794Z",
            "url": "https://files.pythonhosted.org/packages/52/3e/1936e7d622307630e4f4174270e8bf5a33476d689b5499f76c7fb0a2ee3f/the_link_reaper-0.8.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "98341b6b0e98da602128537f4cecdcd1c31a4d9b967ac1142375ca064144b3cc",
                "md5": "d7086d712327d78cd4850ec5ec662112",
                "sha256": "88c0c8e0d8b7e1cea3dfc04cc234df02cd0f28e697d86c7c5df23e99f8becd2d"
            },
            "downloads": -1,
            "filename": "the_link_reaper-0.8.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d7086d712327d78cd4850ec5ec662112",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.6",
            "size": 14236,
            "upload_time": "2024-12-20T01:32:03",
            "upload_time_iso_8601": "2024-12-20T01:32:03.965137Z",
            "url": "https://files.pythonhosted.org/packages/98/34/1b6b0e98da602128537f4cecdcd1c31a4d9b967ac1142375ca064144b3cc/the_link_reaper-0.8.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-20 01:32:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sharktrexer",
    "github_project": "link-reaper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "the-link-reaper"
}
        
Elapsed time: 0.42142s