Repository navigation
ritsu v0.42.0
ritsu 0.42.0
The list of modules is now a site for reading a module before you add it, and you can publish a list of your own modules on GitHub Pages with one workflow.
A site for reading modules
ritsu mod site still needs no account and no server: it fetches every version, checks its digests, its signatures and ritsu check, and writes static pages. What the pages show is new.
- The list's page searches the modules and what they hold, and narrows them by kind. Each row says what the module holds, what was checked, when its newest version was published, and its license.
- A module's page has six tabs: Overview (what it holds, and the README), Contents (each file's inputs and outputs, and a calendar's range and source), Try, Changes, Versions and Files. Beside them are the steps that add the module, with a button that copies them, and what was checked.
- Try answers in the page, for a rule and for a calendar. Nothing is sent to a server.
- Each file's code has a page, with line numbers that search and copy leave out, a link to each line (
#L12), and colours that are written when the site is built, so no script runs to show them. - Changes says in one sentence what changed from the version before, counts it by behaviour, interface and files, and goes on file by file. A rule with one or two inputs and few coordinates also gets a table of what the two versions answer. The body of
ritsu mod diff --format markdownstays below, folded. - Versions has the date each version was published: when its signature went into the transparency log, or the date of the tag's commit for a module from git.
- The lines of a list:
as "<name>"at the end of amodule,gitorlocalline is the name the steps add the module under, andcontribute "<https URL>"links the list's page to where someone asks to have a module listed. Atitleis now in the header of every page as well as the heading of the list's page. --alternate <lang>=<path>links each page to the same page of the site in another language, by the path from this site's root.
A list of your own on GitHub Pages
uses: i2y/ritsu@v0.42.0takescosign: true, which puts cosign 3.1.4 on the PATH besideritsu, each platform's binary held to its checksum.signaturelines need it, in aritsu.modand in a list.- The guide has a workflow to paste, with a
modules.listto start from: A list of your own on GitHub Pages. It builds on a push and once a day, publishes nothing from a run that fails, stops at the build on a pull request, and gives the job that reads modules no permission to write to Pages. The guide also says what to check before you publish: the pages hold everything in a module, code included; a schedule can stop; and<owner>.github.iois one origin. ritsu mod sitewrites an empty.nojekyllat the root of its output, so that a site published from a branch keeps_site/.
Seven modules to read
The repository now holds seven modules, published at ghcr.io/i2y/ritsu-<name> and signed by the workflow that publishes them. Each README says what the module holds, as of when, where it comes from, and that it is not legal or tax advice.
holidays1.1.0 adds the federal holidays of the United States, 2021 to 2030, to those of the United Kingdom and Japan.osha: limits from the occupational safety standards of the United States.us-income-tax: the federal income tax of an unmarried individual, 2025 and 2026.uk-rates: Income Tax, Stamp Duty Land Tax and the minimum wage of the United Kingdom.late-payment: what a supplier claims in the United Kingdom for an invoice paid late, as a rule, a calendar and the kaname code that joins them.japan-tax: income tax and stamp duty of Japan, in English and in Japanese.japan-social-insurance: the health insurance and employees' pension premiums of Japan, in English and in Japanese.
koyomi
- A calendar's page from
koyomi doc --format htmlanswers whether a day is closed, and why, from the calendar's own lines, with a script inside the page. It is the only script the page has, and it loads nothing. Without scripts the section stays hidden and the rest of the page reads the same. The Markdown has no such section. A test runs the page's script against koyomi's answer for every day of nine calendars and of the holidays module.
Fixed
- A generated Go module with books on TigerBeetle links on Xcode 27.2. Its linker rejected the macOS archives of tigerbeetle-go v0.17.9.
ritsu gennow writes v0.17.10 intogo.mod, which has the same Go source. The server and the other clients stay at 0.17.9.
On the site
- The list of modules is built with the pages above, in English and in Japanese, and is built again once a day, so a new version of a module appears without a release of ritsu.
- Modules has a section of its own for the site.
Changes that can make a run that used to pass fail
- The pages of
ritsu mod siteare all new. The paths of 0.41.0 are all still written, and there are more:<version>/code/…,_site/frame.css,_site/site.css,_site/site.jsand.nojekyll. A run that compares the pages with saved copies sees the difference, and a run that reads classes or elements out of them may not find what it read. - A list with
asorcontributestopsritsu mod siteof 0.41.0 at the line. The sentence for a line it does not know now namescontributeas well. - The HTML page of a calendar file from
koyomi dochas one more section and one script. A run that compares it with a saved copy sees the difference. - The Go for a book on TigerBeetle says
tigerbeetle-gov0.17.10: the head of whatchobo genwrites, and thego.modritsu genwrites. A run that compares them with saved copies sees the difference.
ritsu 0.42.0(日本語)
モジュールの一覧を、足す前にモジュールを読むためのサイトに作り直しました。自分のモジュールの一覧も、ワークフローを一つ置くだけで GitHub Pages に出せます。
モジュールを読むためのサイト
ritsu mod site は今までどおり、アカウントもサーバーも要りません。全部の版を取ってきて、ダイジェスト、署名、ritsu check を確かめ、静的なページを書きます。変わったのはページの中身です。
- 一覧のページでは、モジュールとその持つものを検索でき、種別で絞れます。行ごとに、持つもの、確かめたこと、いちばん新しい版の公開日、ライセンスが出ます。
- モジュールのページには六つのタブがあります。Overview(持つものと README)、Contents(ファイルごとの入力と出力、カレンダーの範囲と出典)、Try、Changes、Versions、Files です。横には、モジュールを足す手順(コピーのボタンつき)と、確かめたことが出ます。
- Try は、規則とカレンダーをページの中で試します。サーバーには何も送りません。
- ファイルごとのコードのページがあります。行番号は検索にもコピーにも入らず、
#L12のように行へのリンクを作れます。色はサイトを組むときに付けるので、表示のためにスクリプトは走りません。 - Changes は、一つ前の版から何が変わったかをまず一文で言い、振る舞い、インターフェース、ファイルの三つで数え、ファイルごとに続けます。入力が一つか二つで座標の少ない規則は、二つの版が答えるものを表でも見せます。
ritsu mod diff --format markdownの本文は、畳んで下に残しました。 - Versions に、版ごとの公開日が出ます。署名が透明性ログに入った日で、git のモジュールならタグのコミットの日です。
- 一覧のファイルの行:
module、git、localの行の最後に書くas "<名前>"は、手順がモジュールを足すときの名前です。contribute "<https の URL>"は、モジュールを載せたい人の行き先として一覧のページからリンクします。titleは、一覧のページの見出しに加えて、全部のページのヘッダーにも出ます。 --alternate <言語>=<パス>は、別の言語のサイトの同じページへリンクします。パスはこのサイトのルートから数えます。
自分の一覧を GitHub Pages に出す
uses: i2y/ritsu@v0.42.0にcosign: trueを書けます。ritsuの横に cosign 3.1.4 を入れて PATH に足します。バイナリはプラットフォームごとにチェックサムで確かめます。ritsu.modと一覧のsignatureの行に要ります。- 案内のページに、貼って使えるワークフローがあります。 最初の
modules.listの見本も一緒です:自分の一覧を GitHub Pages に出す。push のときと毎日一回組み直し、失敗した回は何も公開せず、プルリクエストでは組むところまでで止まり、モジュールを読むジョブには Pages に書く権限を渡しません。公開する前に確かめることも書きました。ページにはモジュールの中身がコードまで全部載ること、定時の実行は止まることがあること、<owner>.github.ioは同じオリジンであることの三つです。 ritsu mod siteは、出力のルートに空の.nojekyllを書きます。 ブランチから公開しても_site/が残るようにするためです。
読めるモジュールが七つ
リポジトリに七つのモジュールを置き、ghcr.io/i2y/ritsu-<名前> に公開しました。公開するワークフローが署名しています。どの README にも、持つもの、いつの時点か、出典、法律や税の助言ではないことを書いています。
holidays1.1.0:英国と日本に加えて、米国の連邦の祝日(2021〜2030 年)を足しました。osha:米国の労働安全の基準にある限度。us-income-tax:米国の未婚の個人の連邦所得税(2025 年と 2026 年)。uk-rates:英国の所得税、印紙土地税、最低賃金。late-payment:英国で請求書の支払いが遅れたときに売り手が請求できるもの。規則とカレンダーと、それをつなぐ kaname のコードです。japan-tax:日本の所得税と印紙税(英語と日本語)。japan-social-insurance:日本の健康保険と厚生年金の保険料(英語と日本語)。
koyomi
koyomi doc --format htmlのカレンダーのページは、その日が休みか、なぜかを答えます。 答えはカレンダーの行から出し、ページの中のスクリプトで計算します。このページの持つスクリプトはこれだけで、何も読み込みません。スクリプトが動かなければ、その節は隠れたままで、残りのページは同じに読めます。Markdown にはこの節はありません。試験は、九つのカレンダーと祝日のモジュールの全部の日について、ページのスクリプトの答えを koyomi の答えと比べます。
直したこと
- TigerBeetle の帳簿を持つ、生成した Go のモジュールが Xcode 27.2 でリンクできるようになりました。 そのリンカが tigerbeetle-go v0.17.9 の macOS のアーカイブを受け付けませんでした。
ritsu genはgo.modに v0.17.10 を書きます。Go のソースは同じです。サーバーとほかのクライアントは 0.17.9 のままです。
サイト
前は通っていた実行が落ちうる変更
ritsu mod siteのページは全部変わりました。 0.41.0 のパスは全部そのまま書き、ほかに<版>/code/…、_site/frame.css、_site/site.css、_site/site.js、.nojekyllを書きます。ページを保存したコピーと比べる実行は差を見ます。ページからクラスや要素を読む実行は、読んでいたものが見つからないことがあります。asかcontributeを書いた一覧は、0.41.0 のritsu mod siteがその行で止めます。 知らない行について言う文には、contributeも挙げるようになりました。koyomi docのカレンダーの HTML のページは、節が一つとスクリプトが一つ増えます。 保存したコピーと比べる実行は差を見ます。- TigerBeetle の帳簿の Go は
tigerbeetle-gov0.17.10 と言います。chobo genが書くものの頭と、ritsu genが書くgo.modです。保存したコピーと比べる実行は差を見ます。