lawtext
TypeScript icon, indicating that this package has built-in type declarations

0.1.38 • Public • Published

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 処分、行政指導及び届出に関する手続並びに命令等を定める手続に関しこの法律に規定する事項について、他の法律に特別の定めがある場合は、その定めるところによる。
Standard law XML generated from the lawtext above (click to open)
<?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.)

Readme

Keywords

none

Package Sidebar

Install

npm i lawtext

Weekly Downloads

26

Version

0.1.38

License

MIT

Unpacked Size

19.2 MB

Total Files

1006

Last publish

Collaborators

  • yamachi