Giter Club home page Giter Club logo

link-checker-tool's People

Contributors

phast184 avatar safrin2 avatar

Stargazers

 avatar

Watchers

 avatar

link-checker-tool's Issues

Add Installation process to README.md

It would be beneficial to add an installation instruction to your README.md file. Here is what I think it should be so that it can be installed globally on the users computer:

Installation

  1. Download the tool anywhere on your computer
  2. Start up a command prompt window and go into where the tool is
  3. Enter npm install -g to install the tool globally

This can be put any where but I think it should go between features and usage.

Add Feature Ignore URL Patterns

Hi, I would like to add a feature where user can include a file with list of URL that they want to ignore while testing your tool. Lemme know what do you think? ๐Ÿ˜ƒ

Change if check

if (argv.f && (argv.u)) {
checkURL(argv.u);
}
else if (typeof argv.f == "string") {
// fileInteraction(argv);
// for (i = 0; i < argv._.length; i++) {
// fileInteraction(argv._[i]);
// }
fileInteraction(argv.f)
for (i = 0; i < argv._.length; i++)
{
fileInteraction(argv._[i])
}

According to the comments at the top using -f option means file, but you're only checking a link here in lines 82-84. Shouldn't this be separated to either lct -u link or lct -f fileName?

This way you won't have to check argv.f when checking if there's a url and only check for typeof in your else if statement

Adjust the regular expression

Since it extends incredibly far off the screen, I think you should consider concatenation on the string so that it is easier to read and the person viewing your code doesn't have to scroll a long way to the right just to read it

Could change colour for [UNKOWN][ENOTFOUND] errors

I think it would be beneficial for the user to see the different unknown errors as during my testing I found that the links that ended up here were marked as malicious. Below is the change I would make so it's yellow instead of grey like the other unknown error.

Should be around line 76-ish

console.log(chalk.rgb(255, 204, 51)("[UNKOWN][ENOTFOUND] " + url));

Error running commands

The commands listed in your instructions were inoperable on my end:

image

However, I was able to run the program using:

node link-checker.js -f index2.html

image

Add --all, --good, and --bad flags.

Support --all, --good, and --bad flags. The --all flag is the default, and if none of these are present, it will display good and bad URLs. The --good flag causes only good URLs to get displayed; the --bad flag causes only bad URLs to get displayed.

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.