npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lawtext

v0.1.38

Published

Plain text format for Japanese law

Downloads

78

Readme

Lawtext: Manageable plain text format and utility tools for laws (core library / CLI)

Lawtext is a human-readable/editable plain text format designed for Japanese laws.

Lawtext works efficiently with existing source code management tools to make law text management open, safe, and creative.

This package (core directory) is a core library / CLI as a part of the Lawtext project. See Lawtext for background.


Lawtext は、法令標準XMLとの間で相互変換可能な法令のプレーンテキストフォーマットです。読みやすく、人の手により編集しやすいように設計されています。

Lawtextを用いると、既存のソースコード管理ツールを法令管理にそのまま活用することができます。また、法令標準XMLを使用する高度な法令管理ツールと共存することができます。これにより、法令文書のオープン化を容易にし、編集作業をより安全にし、法令執務の創造性を高めることができます。

このパッケージ(core フォルダ)は Lawtext プロジェクトの一部であるコアライブラリ / CLIです。背景の詳細は Lawtext を参照してください。


Examples

Example of Lawtext

行政手続法
(平成五年法律第八十八号)

      第一章 総則

  (目的等)
第一条 この法律は、処分、行政指導及び届出に関する手続並びに命令等を定める手続に関し、共通する事項を定めることによって、行政運営における公正の確保と透明性(行政上の意思決定について、その内容及び過程が国民にとって明らかであることをいう。第四十六条において同じ。)の向上を図り、もって国民の権利利益の保護に資することを目的とする。
2 処分、行政指導及び届出に関する手続並びに命令等を定める手続に関しこの法律に規定する事項について、他の法律に特別の定めがある場合は、その定めるところによる。
<?xml version="1.0" encoding="UTF-8"?>
<Law Era="Heisei" Lang="ja" LawType="Act" Num="88" Year="5">
  <LawNum>平成五年法律第八十八号</LawNum>
  <LawBody>
    <LawTitle>行政手続法</LawTitle>
    <MainProvision>
      <Chapter Delete="false" Hide="false" Num="1">
        <ChapterTitle>第一章 総則</ChapterTitle>
        <Article Delete="false" Hide="false" Num="1">
          <ArticleCaption>(目的等)</ArticleCaption>
          <ArticleTitle>第一条</ArticleTitle>
          <Paragraph Delete="false" Num="1" OldStyle="false">
            <ParagraphNum />
            <ParagraphSentence>
              <Sentence>この法律は、処分、行政指導及び届出に関する手続並びに命令等を定める手続に関し、共通する事項を定めることによって、行政運営における公正の確保と透明性(行政上の意思決定について、その内容及び過程が国民にとって明らかであることをいう。第四十六条において同じ。)の向上を図り、もって国民の権利利益の保護に資することを目的とする。</Sentence>
            </ParagraphSentence>
          </Paragraph>
          <Paragraph Hide="false" OldStyle="false">
            <ParagraphNum>2</ParagraphNum>
            <ParagraphSentence>
              <Sentence>処分、行政指導及び届出に関する手続並びに命令等を定める手続に関しこの法律に規定する事項について、他の法律に特別の定めがある場合は、その定めるところによる。</Sentence>
            </ParagraphSentence>
          </Paragraph>
        </Article>
      </Chapter>
    </MainProvision>
  </LawBody>
</Law>

VSCode extension (detail)

vscode-screenshot1

On GitHub (example)

github-screenshot1

Background

This package (core directory) is a part of the Lawtext project. See Lawtext for background.

Frontends

See Lawtext for the frontend tools.

Usage

How to use the CLI prebuilt bundle

See the Lawtext documentation for the CLI prebuilt bundle.

How to use the CLI from the NPM package

Option 1: Run using npx globally

  • Run npx lawtext --help

Option 2: Run as a package

  • Run the following command in your working directory (or just an empty directory).
    npm install lawtext
  • Run npx lawtext --help

How to use the CLI from the Lawtext repository

  • Clone or download the Lawtext repository, move to the core directory, and run npm install.
  • Run npm run lawtext -- --help (note that you need -- before the lawtext options.)