Skip to main content

prelims-cli

CLI for prelims.

Install

Run:

pip install prelims-cli

If you need Japanese tokenization, run:

pip install prelims-cli[ja]

Usage

Assuming the following folder directory:

- 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 for the normal recommender:

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

Here is the example of configuration for the embedding-based recommender:

handlers:
  - target_path: "content/blog"
    ignore_files:
      - _index.md
    processors:
      - permalink_base: "/blog"
        type: embedding_recommender
        language: en  # Use onnx-community/granite-embedding-small-english-r2-ONNX
        topk: 3
        cache_db: ".prelims_embedding_cache_en.db"
  - target_path: "content/post"
    ignore_files:
      - _index.md
    processors:
      - permalink_base: "/post"
        type: embedding_recommender
        language: ja   # Use sirasagi62/ruri-v3-30m-ONNX
        topk: 3
        cache_db: ".prelims_embedding_cache_ja.db"
$ 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.

Articles whose front matter did not change are left untouched, and updated ones are written in block style:

tags:
  - AI
  - Hugo

This keeps the output stable across runs, so a CMS or an editor writing the same style does not produce a diff on every run.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prelims_cli-0.0.7.tar.gz (87.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prelims_cli-0.0.7-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file prelims_cli-0.0.7.tar.gz.

File metadata

  • Download URL: prelims_cli-0.0.7.tar.gz
  • Upload date:
  • Size: 87.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for prelims_cli-0.0.7.tar.gz
Algorithm Hash digest
SHA256 7a63e10861cf357b03c4c2e5cecefb44d954694109b0e88f6726aa5963bc4a4a
MD5 e4652c7f42c7756bc07ed28e05215df0
BLAKE2b-256 43d523f4b911d88f8299f961c50160ce0daae02b861cc4080158f0d28cd305a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for prelims_cli-0.0.7.tar.gz:

Publisher: release.yml on chezou/prelims-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prelims_cli-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: prelims_cli-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for prelims_cli-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9e1da443a5e6f4167b5e2025c46ce48dfcda723622ce90dd40a4e20b77ce3723
MD5 9ad13ebc51012466360366114fc60e2f
BLAKE2b-256 15177ffb19ce466447d2f2aef987dd60ac38d7173d0f0fad12111f84ca13ad42

See more details on using hashes here.

Provenance

The following attestation bundles were made for prelims_cli-0.0.7-py3-none-any.whl:

Publisher: release.yml on chezou/prelims-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

This release

0.0.7 This release

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page