Giter Site home page Giter Site logo

findbrokenglass's Introduction

findBrokenGlass

About

This repo is a open source tool to check a connection status of URLs found from the input file, using Java. It returns "[code] url status" in each line.

Features

  • Looking for the URLs in the input file
  • Accepting over two input files
  • Returning 200 code with Good status, 400 and 404 codes with Bad status
  • Colouring the output by the status : Good - Green, Bad - Red, Redirect - Blue, Fail - Red, UnKnown - Gray
  • Redirecting to followed location when it is 301, 307 and 308
  • Checking a version of archived URLs using the WayBackMachine
  • Checking whether Urls work with https or not
  • Allow to pass directory paths and recursively process all children under that directory

New Update (Nov 3, 2020)

  • Returning JSON format output (Oct,6 2020)
  • Exit code, 0 or the number of the broken urls (Oct 6, 2020)
  • Add Ignore feature to skip list of url in the file (Oct 20, 2020)
  • Add Check Telescope feature (Nov 3,2020)

Getting Started

  1. Clone the repo
git clone https://github.com/eunbeek/findBrokenGlass.git
  1. Run the UrlCheck.exe file in bin folder on CMD/PowerShell/Terminal
cd {cloneDirectory}/bin/[mac|window]/

Usage

Please see the appropriate guide for your CLI of choice:

CMD

DefaultPic

This command returns a help message for the flag and the argument explanation.

UrlCheck help

You can type the input file name after tool name, then return the response code, URL and status in each line. This tool accepts multiple files and delimiters by space.

UrlCheck <fileName>
UrlCheck <fileName1> <fileName2>

You can type '--a' flag to allow checking for archived versions of URLs.

UrlCheck --a <fileName>

This '--s' flag change 'http' to 'https' in URLs and you can check whether url work with https or not.

UrlCheck --s <fileName>

This '--v' or '--version' flag return the current version.

UrlCheck --v 

This '--j' or '--json' flag return the JSON format result.

UrlCheck --j <fileName> 

This '-i' or '-ignore' flag ignores links found in the ignore file. This feature is for windows only

UrlCheck -i <fileName> <ignoreFileName>

This '-t' flag checks the latest 10 post links found in the telescope installed in local machine.

UrlCheck -t

PowerShell

DefaultPic

This command returns a help message for the flag and the argument explanation.

./UrlCheck 

This '-t' flag checks the latest 10 post links found in the telescope installed in local machine.

./UrlCheck -t

Mac Terminal

DefaultPic

java -jar UrlCheck.jar /m <fileName>
java -jar UrlCheck.jar /v
java -jar UrlCheck.jar /t

Library

https://github.com/java-native-access/jna

findbrokenglass's People

Contributors

badalsarkar avatar eunbeek avatar jossiey avatar mamadou-diallo avatar sonechca avatar

Stargazers

 avatar

Watchers

 avatar  avatar

findbrokenglass's Issues

add a new feature

  • allow passing directory paths vs. file paths, and recursively process all children under that directory

adding Ignore URL feature

The following shall be met :
The --ignore, -i, \i flag is optional, and if present should take a filepath and use it to load and parse an ignored URLs text file. If the ignore file isn't found, give an appropriate error message. Otherwise, all URLs should be checked against this list to see if they need to be ignored.

Here are some example ignore files.

First, a file with only a comment is valid:

/1. Empty file, nothing will be ignored
Second, a file with multiple comments and a URL is valid:

/ 2. File with a comment and single URL that matches any URL
/that starts with https://www.google.com, for example:

/https://www.google.com/index.html would match
/https://www.google.com/ would match
/ https://www.google.ca would NOT match
https://www.google.com
Third, a file that has no comments and only URLs is valid:

https://www.google.com
Fourth, a file with anything other than a comment (#) or URL (http://, https://) is invalid:

/ This is invalid. It doesn't use http:// or https://
www.google.com
If the file isn't valid, give an appropriate error message and exit. Otherwise, use the file's URL patterns to test all the URLs being processed, skipping any that match.

Missing the feature

When running the tool with the v or version argument, the tool should print the name of the tool and its version.

Add Returning exit code feature

It will return how many bad URLs are in the file.
If all URLs are good, it will return 0.
Otherwise, the exit code is over 0.

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.