aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README54
-rw-r--r--cmd/jarink/main.go3
2 files changed, 56 insertions, 1 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..ad20e53
--- /dev/null
+++ b/README
@@ -0,0 +1,54 @@
+= Jarink
+
+Jarink is a program to help web administrator to maintains their website.
+
+== Synopsis
+
+ jarink [OPTIONS] <COMMAND> <args...>
+
+Available commands,
+
+ brokenlinks - scan the website for broken links (page and images).
+
+== Usage
+
+[OPTIONS] brokenlinks URL
+
+ Start scanning for broken links on the web server pointed by URL.
+ Invalid links will be scanned on anchor href attribute
+ ("<a href=...>") or on the image src attribute ("<img src=...").
+
+ Once finished it will print the page and list of broken links inside
+ that page in JSON format.
+
+ This command accept the following options,
+
+ -verbose : print the page that being scanned.
+
+ Example,
+
+ $ jarink scan https://kilabit.info
+ {
+ "https://kilabit.info/some/page": [
+ {
+ "Link": "https://kilabit.info/some/page/image.png",
+ "Code": 404
+ },
+ {
+ "Link": "https://external.com/link",
+ "Error": "Internal server error",
+ "Code": 500
+ }
+ ],
+ "https://kilabit.info/another/page": [
+ {
+ "Link": "https://kilabit.info/another/page/image.png",
+ "Code": 404
+ },
+ {
+ "Link": "https://external.org/link",
+ "Error": "Internal server error",
+ "Code": 500
+ }
+ ]
+ }
diff --git a/cmd/jarink/main.go b/cmd/jarink/main.go
index c4af038..c029b8a 100644
--- a/cmd/jarink/main.go
+++ b/cmd/jarink/main.go
@@ -59,7 +59,8 @@ invalid_command:
}
func usage() {
- log.Println(`
+ log.Println(`= Jarink
+
Jarink is a program to help web administrator to maintains their website.
== Synopsis