← Back to App Hub

Safety Law CLI

Industrial safety law full-text search with cross-references and hierarchy.

PythonSQLite FTS5Click
GitHub

Overview

A command-line tool for searching the full text of Korean industrial safety laws. It indexes the Act, Enforcement Decree, and Enforcement Rule in a single SQLite FTS5 database and lets you jump between cross-referenced articles instantly. Useful for safety officers, lawyers, and engineers who need to look up specific clauses without opening a browser.

Features

  • Full-text search: SQLite FTS5 index enables sub-second searches across the full text of Korean industrial safety laws.
  • Cross-references: Automatic detection and linking of article references (e.g. “Article 42, Paragraph 3”) within and across statutes.
  • Law hierarchy: Navigate the three-level structure: Act (법률) → Enforcement Decree (시행령) → Enforcement Rule (시행규칙).
  • Offline database: All law text is stored locally in a single SQLite file. No network required after the initial setup.
  • CLI interface: Built with Click for a clean command-line experience with colored output and paged results.

Installation

git clone https://github.com/bc1qwerty/safety-law.git
cd safety-law
pip install -e .
safety-law search "안전보건관리체제"

The full source code, build instructions, and updates are on GitHub.

개요

한국 산업안전 법령 전문을 검색할 수 있는 커맨드라인 도구입니다. 산업안전보건법, 시행령, 시행규칙을 단일 SQLite FTS5 데이터베이스로 색인하고, 조문 간 교차참조를 즉시 따라갈 수 있게 해줍니다. 브라우저를 열지 않고 특정 조항을 빠르게 확인해야 하는 안전관리자, 변호사, 엔지니어에게 유용합니다.

기능

  • 전문 검색: SQLite FTS5 인덱스로 한국 산업안전 법령 전체에 대해 1초 이내 검색을 제공합니다.
  • 교차참조: “제42조 제3항”과 같은 조문 참조를 자동으로 탐지하고 연결합니다.
  • 법령 계층 구조: 법률 → 시행령 → 시행규칙 3계층을 자유롭게 이동할 수 있습니다.
  • 오프라인 DB: 모든 법령 텍스트는 단일 SQLite 파일에 저장됩니다. 초기 설정 후에는 네트워크가 필요 없습니다.
  • CLI 인터페이스: Click으로 만든 깔끔한 커맨드라인 경험에 컬러 출력과 페이지네이션을 제공합니다.

설치

git clone https://github.com/bc1qwerty/safety-law.git
cd safety-law
pip install -e .
safety-law search "안전보건관리체제"

전체 소스 코드, 빌드 방법, 업데이트는 GitHub에서 확인할 수 있습니다.

概要

韓国の産業安全関連法令を全文検索するコマンドラインツールです。法律、施行令、施行規則を単一のSQLite FTS5データベースに索引化し、条文間の相互参照をすぐに辿れるようにしています。ブラウザを開かずに特定条項を確認したい安全管理者、弁護士、エンジニアに役立ちます。

機能

  • 全文検索: SQLite FTS5インデックスで韓国産業安全法令全文に対し1秒以下の検索が可能です。
  • 相互参照: 「第42条第3項」のような条文参照を自動検出してリンクします。
  • 法令階層: 法律 → 施行令 → 施行規則の3階層を自由に行き来できます。
  • オフラインDB: すべての法令本文は単一のSQLiteファイルに格納されます。初期セットアップ後はネットワーク不要です。
  • CLIインターフェース: Clickで作られたクリーンなコマンドライン体験にカラー出力とページングを提供します。

インストール

git clone https://github.com/bc1qwerty/safety-law.git
cd safety-law
pip install -e .
safety-law search "안전보건관리체제"

ソースコード、ビルド手順、最新版はGitHubで公開しています。