linkfix

command module
v0.0.0-...-b474970 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

README

Linkfix Godoc license Go Report Card Build

Logo

Linkfix is a simple tool that helps you avoid the Link rot by reporting on no-longer working links in your files and suggesting replacements with Wayback Machine snapshots wherever possible.

Linkfix can be also used as link availability checker with support for various protocols and complex error reporting.

Link rot is the phenomenon of hyperlinks tending over time to cease to point to their originally targeted file, web page, or server due to that resource being relocated or becoming permanently unavailable. A link that no longer points to its target, often called a broken or dead link, is a specific form of dangling pointer. The rate of link rot is a subject of study and research due to its significance to the internet's ability to preserve information. Estimates of that rate vary dramatically between studies.

Features

  1. Automatic replacement suggestions for http links by snapshots from Wayback Machine.
  2. Multithreaded with configurable level of concurrency.
  3. Multiple output formats.
  4. Supports various protocols http, https, ftp, file.

Installation

go get -u github.com/matoous/linkfix

or run using the docker image without installation

docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/app linkfix -w 4 /app

Usage

linkfix .

Advanced usage:

linkfix . --ignore "internal/old_files/**" --verbose --exclude "dont.check.me" --workerks 16 --yes

This will run the linkfix from current directory, ignoring all files under internal/old_files/, in a verbose mode, excluding urls on http://dont.check.me (e.g. won't try to fix URL that are hosted on http://dont.check.me), with 16 workers and will update the links automatically without user confirmation wherever possible.

Alternatives

  1. Linkchecker - rich on features and usable on running websites.
  2. Linkcheck - fast and easy alternative to Linkchecker

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package check provides checking for various URLs.
Package check provides checking for various URLs.
callonce
Package callonce implements concurrent call suppression and cache mechanism.
Package callonce implements concurrent call suppression and cache mechanism.
cfg
clients
Package clients provides clients to various external APIs.
Package clients provides clients to various external APIs.
log
printers
Package printers provides various printing implementation that can be used to print/display found link issues.
Package printers provides various printing implementation that can be used to print/display found link issues.
Package source provides sources for the links.
Package source provides sources for the links.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL