Giter VIP home page Giter VIP logo

url-test's Introduction

url-test

url-test is a Python module for scaning all url in a project and test that they are valid and not returning an 404, distributed under the MIT license.

The project was started in 2021 by Johan Hansson and Niklas Hansson.

Installation

Dependencies

  • pyyaml
  • regex
  • PyYAML

User installation

pip install -U url-test

Source code

git clone https://github.com/JohanWork/url-test

How to use

To run it in you comand line type

url-test

There are three diffrent input that can be stated to utl-test

  • -config_path file to configurations se more blow.
  • -verbose if more exstenstive logging is wanted
  • -crash if the package should raise an exseption if any 404 are found

There are a number of configuration options possibale by providing a path to a yaml config file.

url-test -config_path config.yaml
  • url_regex -> customize the regex experesions used to find all url.
  • file_types -> what type of file do you want to scan. By default it will only scan .md
  • whitelisted_files -> white listed file we don't want to scan.
  • whitelisted_urls -> white listed url we don't want to check for exampole https://127.0.0.1/test

A example of a confige file can be found in config.yaml and could be somthing like below:


file_types:
  - \.md

whitelisted_files:
  - README.md

whitelisted_urls:
  - https://127.0.0.1/test

Github action

A prebuild github action of the library can be found here.

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.