phast184 / link-checker-tool Goto Github PK
View Code? Open in Web Editor NEWA simple CLI used to check whether an URL is available
License: MIT License
A simple CLI used to check whether an URL is available
License: MIT License
just ignores these all together
thanks
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
- Download the tool anywhere on your computer
- Start up a command prompt window and go into where the tool is
- 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.
link-checker-tool/link-checker.js
Lines 40 to 41 in a648aa2
There's a new way to iterate through the list that will make sure you're never out of range or have to worry about the element number
You can change it to something like below
for (const url of validUrls) {
checkUrl(url)
}
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of
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? ๐
link-checker-tool/link-checker.js
Lines 82 to 96 in a648aa2
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
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
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));
When I tried to install your tools using npm link
, it gave me error saying "No such file or directory." I dig deeper and found you provided wrong path in package.json in the bin
"bin": {
"lct": ".src/link-checker.js"
},
Your link-checker.js file is not in src folder. I changed it in my issue #10.
You can see it here also:
https://github.com/sanji11/link-checker-tool/blob/f43f96e7f3d0d2435823b11646b78ac01f73cfab/package.json#L5-L7
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.