Metadata-Version: 2.4
Name: prelims-cli
Version: 0.0.6
Summary: prelims CLI - Front matter post-processor CLI
Project-URL: Homepage, https://github.com/chezou/prelims-cli
Project-URL: Repository, https://github.com/chezou/prelims-cli
Author-email: Aki Ariga <chezou@gmail.com>
Maintainer-email: Aki Ariga <chezou@gmail.com>
License: MIT
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: click>=8.0.3
Requires-Dist: omegaconf>=2.1.1
Requires-Dist: prelims>=0.0.6
Provides-Extra: embedding
Requires-Dist: huggingface-hub>=0.20.0; extra == 'embedding'
Requires-Dist: numpy>=1.24.0; extra == 'embedding'
Requires-Dist: onnxruntime>=1.17.0; extra == 'embedding'
Requires-Dist: tokenizers>=0.21.0; extra == 'embedding'
Provides-Extra: ja
Requires-Dist: sudachidict-full>=20211220; extra == 'ja'
Requires-Dist: sudachipy>=0.6.2; extra == 'ja'
Description-Content-Type: text/markdown

# prelims-cli

CLI for [prelims](https://github.com/takuti/prelims).

## Install

Run:

```sh
pip install prelims-cli
```

If you need Japanese tokenization, run:

```sh
pip install prelims-cli[ja]
```

## Usage

Assuming the following folder directory:

```sh
- content
|  ├── post
|  └── blog
└─ scripts
   └ config
     └ myconfig.yaml
```

where, post and blog are pages, and scripts is the place to put scripts.

Here is the example of configuration:

```myconfig.yaml
handlers:
  - target_path: "content/blog"
    ignore_files:
      - _index.md
    processors:
      - type: recommender
        permalink_base: "/blog"
        tfidf_options:
          stop_words: english
          max_df: 0.95
          min_df: 2
        tokenizer: null
  - target_path: "content/post"
    ignore_files:
      - _index.md
    processors:
      - type: recommender
        permalink_base: "/post"
        tfidf_options:
          max_df: 0.95
          min_df: 2
        tokenizer:
          lang: ja
          type: sudachi
          mode: C
          dict: full
```

```sh
$ prelims-cli --config ./scripts/config/myconfig.yaml
target: /user/chezo/src/chezo.uno/content/blog
target: /users/chezo/src/chezo.uno/content/post
```

Then your articles' front matter were updated.
