# sjml-validate

> Command line interface for validating .sjml

Latest version **0.3.2** (published 2020-04-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install sjml-validate
pnpm add sjml-validate
yarn add sjml-validate
bun add sjml-validate
```

Provides the commands `sjmlc`, `sjmlv`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.2 |
| Published | 2020-04-01 |
| First published | 2020-02-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 165.3 KB |
| Known vulnerabilities | 0 (+7 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yeonwoo Kim |
| Maintainers | yeonwoo |

## Links

- npm: https://www.npmjs.com/package/sjml-validate
- Repository: https://github.com/wiskingdom/sjml-validate
- Issues: https://github.com/wiskingdom/sjml-validate/issues
- npm.io page: https://npm.io/package/sjml-validate

## Dependencies (9)

- [he](https://npm.io/package/he.md) ^1.2.0
- [ajv](https://npm.io/package/ajv.md) ^6.11.0
- [glob](https://npm.io/package/glob.md) ^7.1.6
- [xlsx](https://npm.io/package/xlsx.md) ^0.15.5
- [chalk](https://npm.io/package/chalk.md) ^3.0.0
- [chardet](https://npm.io/package/chardet.md) ^0.8.0
- [commander](https://npm.io/package/commander.md) ^4.1.1
- [ajv-errors](https://npm.io/package/ajv-errors.md) ^1.0.1
- [fast-xml-parser](https://npm.io/package/fast-xml-parser.md) ^3.16.0

## Recent versions

- 0.3.2 (latest) — 2020-04-01
- 0.3.1 — 2020-03-31
- 0.3.0 — 2020-03-27
- 0.2.9 — 2020-03-19
- 0.2.8 — 2020-03-05
- 0.2.7 — 2020-03-02
- 0.2.6 — 2020-03-02
- 0.2.5 — 2020-03-01
- 0.2.4 — 2020-02-21
- 0.2.3 — 2020-02-21
- 0.2.2 — 2020-02-21
- 0.2.1 — 2020-02-21
- 0.2.0 — 2020-02-14
- 0.1.9 — 2020-02-13
- 0.1.8 — 2020-02-13
- … 7 more at https://npm.io/package/sjml-validate/versions

## README

# sjml-validate usage guide

--------------------------

## 1. Install node.js (prerequisite)

### 1-1 On windows

#### 1) Download LTS version installer

* Download Link: https://nodejs.org

#### 2) Install via the installer

#### 3) Verify installation

```cmd
node -v
npm -v
```
--------------------------

### 1-2 On linux

#### 1) Install nvm

```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
```

#### 2) Restart terminal

#### 3) Install node LTS version

```bash
nvm install --lts
```

#### 4) Verify installation

```bash
node -v
npm -v
```

--------------------------


## 2. Install sjml-validate

```bash
npm install sjml-validate -g
```
--------------------------

## 3. Usage

```bash
sjmlv <options>  // run validator
sjmlc <options>  // run converter
```

### 3.1 Validator 
#### Validator Options

| option  | description    |
|-----------|-------------|
| -s, --schema \<schema_type \>   | set a schema type (required) |
| -i, --input \<dir_path \>      | set an input dir path: read files recursively (required)     |
| -e, --ext [extention_name ]     | set an extention name of target input files (optional) <br/> (default: sjml) |
| -o, --output [dir_path ]    | set an output dir path (optional)<br/> (default: ./output/) |
| -w, --withEsc        | run with escaping: available with SERW, EXRW  (optional)<br/>(default: without escaping) |
| -h, --help                  | output usage information            |

#### Validator Schema Type

| type | description |
|-------|---------|
|WXRW   | 원시 검증: 문어(상상, 정보, 기타)|
|WCRW | 원시 검증: 문어(잡지) |
|NXRW | 원시 검증: 신문|
|EXRW   | 원시 검증: 웹|
|SXRW | 원시 검증: 구어(공적독백, 공적대화) |
|SDRW | 원시 검증: 구어(일상대화) |
|SERW | 원시 검증: 준구어(대본)|
|MXRW | 원시 검증: 메신저대화|

--------------------------

### 3.2 Converter 
#### Converter Options

| option  | description    |
|-----------|-------------|
| -s, --schema \<schema_type \>   | set a schema type (required) |
| -i, --input \<dir_path \>     | set an input dir path: read files recursively (required)     |
| -e, --ext [extention_name ]     | set an extention name of target input files (optional) <br/>(default: sjml) |
| -o, --output [dir_path ]    | set an output dir path (optional) <br/>(default: ./output/) |
| -h, --help                  | output usage information            |

#### Converter Schema Type

| type | description |
|-------|---------|
|WXRW   | 원문->원시: 문어(상상, 정보, 기타)|
|WCRW | 원문->원시: 문어(잡지) |
|NXRW | 원문->원시: 신문|

--------------------------

## 4. Examples


```bash
sjmlv -s SDRW -i "..\데이터\일상 대화" -e SJML
sjmlv --schema=SDRW --input="..\데이터\일상 대화" --ext=SJML
sjmlv -s EXRW -i ..\데이터\웹 -o ..\output -w
```

```bash
sjmlc -s NXRW -i ..\데이터\신문 -e xml -o ..\output
sjmlc --input=..\데이터\신문 --output=../output --schema=WXRW 
```

---
_Source: https://npm.io/package/sjml-validate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
