https://github.com/capjamesg/markdown-html-link-rot

A Ruby script to substitute invalid links in markdown and HTML with a link to an Internet Archive backup.

https://github.com/capjamesg/markdown-html-link-rot

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.8%) to scientific vocabulary

Keywords

archiving linkrot ruby
Last synced: 5 months ago · JSON representation

Repository

A Ruby script to substitute invalid links in markdown and HTML with a link to an Internet Archive backup.

Basic Info
  • Host: GitHub
  • Owner: capjamesg
  • License: mit
  • Language: Ruby
  • Default Branch: main
  • Homepage:
  • Size: 11.7 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
archiving linkrot ruby
Created about 4 years ago · Last pushed about 4 years ago
Metadata Files
Readme License

README.md

Markdown / HTML Link Rot Detector

A Ruby script to detect link rot in HTML and markdown documents and replace broken links with an Internet Archive backup.

Getting Started

First, install the required dependencies for this project to work using bundle:

bundle install

Next, run the link rot detector program:

ruby watch.rb

The link rot detector program will check for links that return 404s or an invalid response. If such a link is found, the Internet Archive's Wayback Machine API is queried to see if a snapshot of the site is available. If a snapshot is found, the link to the most recent snapshot is used to replace the broken link in the HTML / markdown document being read.

All changes are logged to a log file whose name is printed to the console when the program runs.

You can optionally use the --webhook flag to send a notification with a JSON payload to a server when the program has finished running. The payload looks like this:

{
    "message": "
        Cali has identified 0 broken links. These links have been replaced with archived versions.

        See below for the changes made.

        [List of broken links, if applicable]
    "
}

Technologies

The following libraries and technologies are used in this project:

  • Ruby
  • nokogiri
  • logger
  • dotenv
  • HTTParty

Contributors

  • capjamesg

Owner

  • Name: James
  • Login: capjamesg
  • Kind: user
  • Location: Scotland
  • Company: @Roboflow

from words, wonder.

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels