Code Monkey home page Code Monkey logo

sla's Introduction

Site Link Analyzer

Gem Version Build Status Maintainability


SLA is a simple broken links checker, with built in caching.

SLA Demo

Install

Install using Ruby

$ gem install sla

Install using Docker

alias sla='docker run --rm -it --network host -v /tmp/sla_cache:/app/cache dannyben/sla'

The --network host flag is only necessary if you intend to check links on localhost.

Features

  • Easy to use command line interface.
  • Built in caching, to avoid overtaxing the server.
  • Show and save list of broken links to a log file.
  • Exits with non zero code on failure, for CI integration.

Usage

$ sla --help
Site Link Analyzer

Usage:
  sla URL [options]
  sla --help | -h | --version

Options:
  --verbose, -v
    Show detailed output

  --simple, -s
    Show simple output of errors only

  --depth, -d DEPTH
    Set crawling depth [default: 5]

  --external, -x
    Also check external links

  --ignore, -i URLS
    Specify a list of space delimited patterns to skip
    URLs that contain any of the strings in this list will be skipped

  --cache, -c LIFE
    Set cache life [default: 1d]. LIFE can be in any of the following formats:
      10  = 10 seconds
      20s = 20 seconds
      10m = 10 minutes
      10h = 10 hours
      10d = 10 days

  --cache-dir DIR
    Set the cache directory

  -h --help
    Show this help

  --version
    Show version number

Parameters:
  URL
    URL to scan

Environment Variables:
  SLA_SLEEP
    Set number of seconds to sleep between calls (for debugging purposes)

Examples:
  sla example.com
  sla example.com -c10m -d10
  sla example.com --cache-dir my_cache
  sla example.com --depth 10
  sla example.com --cache 30d --external
  sla example.com --simple > out.log
  sla example.com --ignore "/admin /customer/login"

Contributing / Support

If you experience any issue, have a question or a suggestion, or if you wish to contribute, feel free to open an issue.


sla's People

Contributors

dannyben avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

sla's Issues

Display actual error on failures

Now, since webcache 0.7 returns a status code, we can distinguish between 404 and other errors. Perhaps we should display errors when they are not 404?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.