<feed xmlns='http://www.w3.org/2005/Atom'>
<title>jarink/jarink.go, branch main</title>
<subtitle>Program to inspects and maintains web sites.</subtitle>
<id>http://git.kilabit.info/jarink/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/jarink/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/jarink/'/>
<updated>2026-02-12T02:05:42Z</updated>
<entry>
<title>Release jarink 0.3.0 (2026-02-12)</title>
<updated>2026-02-12T02:05:42Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-02-12T02:04:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/jarink/commit/?id=23bbad5b40b5940ca3dcb7839d09c0462cf6c45d'/>
<id>urn:sha1:23bbad5b40b5940ca3dcb7839d09c0462cf6c45d</id>
<content type='text'>
**🌼 brokenlinks: refactoring the logic, simplify the code**

Previously, we made the scan logic to run in multiple goroutine with
one channel to push and consume the result and another channel to push
and pop link to be processed.
The logic is a very complicated code, making it hard to read and debug.

These changes refactoring it to use single goroutine that push and pop
link from/to a slices, as queue.

Another refactoring is in where we store the link.
Previously, we have [jarink.Link], [brokenlinks.Broken], and
[brokenlinks.linkQueue] to store the metadata for a link.
These release unified them into struct [jarink.Link].

**🌱 brokenlinks: print the progress to stderr**

Each time the scan start, new queue add, fetching start, print the
message to stderr.
This remove the verbose options for better user experience.

**🌼 brokenlinks: improve fetch logging and decrease timeout to 10s**

When fetching, print log after the fetch completed.
If success, print the URL along with HTTP status code.
If fail, print the URL along with the error.

The timeout now reduce to 10 seconds to prevent long delay when working
with broken website.

**🌼 brokenlinks: mark the link in queue as seen with status code 0**

This is to fix double URL being pushed to queue.

Given the following queue and its parent,

----
/page2.html =&gt; /index.html
/brokenPage =&gt; /index.html
/brokenPage =&gt; /page2.html
----

Before scanning the second "/brokenPage" on parent page "/page2.html",
check if its seen first to get the status code before we run the scan.
This allow jarink report "/brokenPage" as broken link for both pages,
not just in "/index.html".

**🌼 brokenlinks: skip parsing non-HTML page**

If the response Content-type return other than "text/html", skip parsing
the content and return immediately.

We also skip processing "mailto\:" URL.

**🌼 brokenlinks: make link that return HTML always end with slash**

If parent URL like "/page" return the body as HTML page, the URL should
be end with slash to make the relative links inside it works when joined
with the parent URL.

**🌱 brokenlinks: store the anchor or image source in link**

In the struct `Link`, we add field `Value` that store the `href` from A
element or `src` from IMG element.
This allow us to debug any error during scan, especially joining path
and link.

**🌼 brokenlinks: fix possible panic in markAsBroken**

If the Link does not have `parentUrl`, set the parent URL using the link
URL itself.
This only happened if the target URL that we will scan return an error.
</content>
</entry>
<entry>
<title>all: refactoring, use single struct to represent Link</title>
<updated>2026-01-21T18:39:41Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-01-21T18:39:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/jarink/commit/?id=79eaccc81b85eb92dab9cf18d52662f367903652'/>
<id>urn:sha1:79eaccc81b85eb92dab9cf18d52662f367903652</id>
<content type='text'>
Previously, have [jarink.Link], [brokenlinks.Broken], and
[brokenlinks.linkQueue] to store the metadata for a link.

These changes unified them into struct [jarink.Link].
</content>
</entry>
<entry>
<title>all: use markdown for formatting README</title>
<updated>2026-01-20T22:02:05Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-01-20T20:42:57Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/jarink/commit/?id=6637e9d11a57c67510d79c00a1425f5e66d18280'/>
<id>urn:sha1:6637e9d11a57c67510d79c00a1425f5e66d18280</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Release jarink 0.2.1 (2025-12-27)</title>
<updated>2025-12-27T07:27:41Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-12-27T07:27:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/jarink/commit/?id=c7cf21afcfc2229a423229f9e0ce685b46e3a1b9'/>
<id>urn:sha1:c7cf21afcfc2229a423229f9e0ce685b46e3a1b9</id>
<content type='text'>
**🌼 brokenlinks: fix infinite loop on unknown host**

On link with invalid domain, it should break and return the error
immediately.

</content>
</entry>
<entry>
<title>cmd/jarink: add "version" command</title>
<updated>2025-06-27T05:23:31Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-06-27T05:23:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/jarink/commit/?id=e10c28e345cc3857664e2d92c948f95d15279038'/>
<id>urn:sha1:e10c28e345cc3857664e2d92c948f95d15279038</id>
<content type='text'>
The version command print the version of the program.

</content>
</entry>
<entry>
<title>all: add comment on GoEmbedReadme variable</title>
<updated>2025-06-16T15:44:37Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-06-15T18:17:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/jarink/commit/?id=a377e5b0f125d05c3dc3c1be0d46a5616922ae6e'/>
<id>urn:sha1:a377e5b0f125d05c3dc3c1be0d46a5616922ae6e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: rename README.adoc back to README</title>
<updated>2025-06-16T15:44:37Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-06-14T12:24:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/jarink/commit/?id=c814c790367dcd167dd0687318bd6dcc71299490'/>
<id>urn:sha1:c814c790367dcd167dd0687318bd6dcc71299490</id>
<content type='text'>
This is for git.sr.ht to be able to render the README.

</content>
</entry>
<entry>
<title>all: rename README to README.adoc</title>
<updated>2025-06-12T14:40:55Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-06-12T14:36:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/jarink/commit/?id=23f6c2f1df71a8c244c09ce4fd6dd221ad658ddc'/>
<id>urn:sha1:23f6c2f1df71a8c244c09ce4fd6dd221ad658ddc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: go embed the README and use it on the CLI for help command</title>
<updated>2025-06-01T07:32:06Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2025-06-01T07:31:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/jarink/commit/?id=19b2e2d1ac0fd8a88af6b0da3d00017e4ee31c06'/>
<id>urn:sha1:19b2e2d1ac0fd8a88af6b0da3d00017e4ee31c06</id>
<content type='text'>
</content>
</entry>
</feed>
