From 6637e9d11a57c67510d79c00a1425f5e66d18280 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Wed, 21 Jan 2026 03:42:57 +0700 Subject: all: use markdown for formatting README This is so the README can be rendered in pkg.go.dev and in git.sr.ht. While at it, group documentation files under _doc/ directory. --- .gitignore | 4 +- README | 123 ---------------------------------------------------- README.adoc | 1 - README.adoc.license | 2 - README.md | 103 +++++++++++++++++++++++++++++++++++++++++++ _doc/CHANGELOG.adoc | 1 + _doc/index.md | 1 + jarink.go | 4 +- 8 files changed, 108 insertions(+), 131 deletions(-) delete mode 100644 README delete mode 120000 README.adoc delete mode 100644 README.adoc.license create mode 100644 README.md create mode 120000 _doc/CHANGELOG.adoc create mode 120000 _doc/index.md diff --git a/.gitignore b/.gitignore index 0809472..b0e3e11 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ # SPDX-FileCopyrightText: 2025 M. Shulhan # SPDX-License-Identifier: GPL-3.0-only -/CHANGELOG.html -/README.html -/cover.html +*.html /cover.out diff --git a/README b/README deleted file mode 100644 index 02debe8..0000000 --- a/README +++ /dev/null @@ -1,123 +0,0 @@ -= Jarink -:sectanchors: -:toc: - -Jarink is a program to help web administrator and developers to inspect -and maintains their website. - -== Synopsis - - jarink [OPTIONS] - -Available commands, - - brokenlinks - scan the website for broken links (page and images). - help - print the usage of the command. - version - print the version of program. - -== Usage - -=== brokenlinks command - - [OPTIONS] brokenlinks - -Scan for broken links on the web server pointed by URL. -Links will be scanned on anchor href attribute ("") or -on the image src attribute (", - "error": , - "code": - }, - ... - ], - ... -} ----- - -This command accept the following options, - -`-ignore-status=`:: -List of HTTP status code that will be ignored during scan. - -`-insecure`:: -Do not report as error on server with invalid certificates. - -`-past-result=`:: -Scan only the pages reported by result from past scan based -on the content in JSON file. -This minimize the time to re-scan the pages once we have fixed the URLs. - -`-verbose`:: -Print the page that being scanned to standard error. - - -== Examples - -Given a website that have the following pages, - -- web.tld (base) -- web.tld/page1 -- web.tld/page1/sub1 -- web.tld/page2 -- web.tld/page2/sub1 - - -The following command will scan all of the pages in the website web.tld. - ----- -$ jarink brokenlinks https://web.tld ----- - -Invoking brokenlinks on path "/page2" only scan "/page2" and "/page2/sub1". - ----- -$ jarink brokenlinks https://web.tld/page2 ----- - -Ignore HTTP status code 403 and 418, - ----- -$ jarink -ignore-status=403,418 brokenlinks https://web.tld/page2 ----- - - -== Notes - -jarink version 0.1.0. - -Source code - https://git.sr.ht/~shulhan/jarink - - -== License - -This software is licensed under GPL 3.0. - -Copyright 2025 Shulhan - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the Free -Software Foundation, either version 3 of the License, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. -If not, see . - -// SPDX-FileCopyrightText: 2025 M. Shulhan -// SPDX-License-Identifier: GPL-3.0-only diff --git a/README.adoc b/README.adoc deleted file mode 120000 index 100b938..0000000 --- a/README.adoc +++ /dev/null @@ -1 +0,0 @@ -README \ No newline at end of file diff --git a/README.adoc.license b/README.adoc.license deleted file mode 100644 index 22616a9..0000000 --- a/README.adoc.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: 2025 M. Shulhan -SPDX-License-Identifier: GPL-3.0-only diff --git a/README.md b/README.md new file mode 100644 index 0000000..ca63317 --- /dev/null +++ b/README.md @@ -0,0 +1,103 @@ + + + +# Jarink + +Jarink is a program to help web administrator and developers to inspect +and maintains their website. + +## SYNOPSIS + + jarink [OPTIONS] + +Available commands, + + brokenlinks - scan the website for broken links (page and images). + help - print the usage of the command. + version - print the version of program. + +## USAGE + +### The brokenlinks command + + [OPTIONS] brokenlinks + +Scan for broken links on the web server pointed by URL. +Links will be scanned on anchor href attribute ("") or +on the image src attribute (", + "error": , + "code": + }, + ... + ], + ... +} +``` + +This command accept the following options, + +`-ignore-status=`: +List of HTTP status code that will be ignored during scan. + +`-insecure`: +Do not report as error on server with invalid certificates. + +`-past-result=`: +Scan only the pages reported by result from past scan based +on the content in JSON file. +This minimize the time to re-scan the pages once we have fixed the URLs. + +`-verbose`: +Print the page that being scanned to standard error. + +## EXAMPLES + +Given a website that have the following pages, + +- web.tld (base) +- web.tld/page1 +- web.tld/page1/sub1 +- web.tld/page2 +- web.tld/page2/sub1 + +The following command will scan all of the pages in the website web.tld. + +``` +$ jarink brokenlinks https://web.tld +``` + +Invoking brokenlinks on path "/page2" only scan "/page2" and "/page2/sub1". + +``` +$ jarink brokenlinks https://web.tld/page2 +``` + +Ignore HTTP status code 403 and 418, + +``` +$ jarink -ignore-status=403,418 brokenlinks https://web.tld/page2 +``` + +## NOTES + +Project page - https://kilabit.info/project/jarink/ + +Source code - https://git.sr.ht/~shulhan/jarink + +## LICENSE + +This software is licensed under GPL 3.0. +See the LICENSE file for more information. +Copyright 2025 M. Shulhan <ms@kilabit.info>. diff --git a/_doc/CHANGELOG.adoc b/_doc/CHANGELOG.adoc new file mode 120000 index 0000000..e59a806 --- /dev/null +++ b/_doc/CHANGELOG.adoc @@ -0,0 +1 @@ +../CHANGELOG.adoc \ No newline at end of file diff --git a/_doc/index.md b/_doc/index.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/_doc/index.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/jarink.go b/jarink.go index 9da2f07..643a514 100644 --- a/jarink.go +++ b/jarink.go @@ -8,9 +8,9 @@ import ( ) // Version of jarink program and module. -var Version = `0.2.1` +var Version = `0.2.2` // GoEmbedReadme embed the README for showing the usage of program. // -//go:embed README +//go:embed README.md var GoEmbedReadme string -- cgit v1.3