npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

miyojs-filter-satori_dictionary

v1.1.0

Published

satori_dictionary - satori like dictionary loader

Readme

satori_dictionary - 里々書式辞書ローダ

これはなにか

これは伺か用SHIORIサブシステムである美代(Miyo)の辞書フィルタプラグインです。

里々書式辞書の読み込み機能を提供します。

インストール

一般

npm install miyojs-filter-satori_dictionary

ゴーストに追加する場合

ghost/masterをカレントディレクトリとして同様に

npm install miyojs-filter-satori_dictionary

含まれるフィルタ

satori_dictionary_load

辞書の読み込みフィルタです。

satori_dictionary_initialize

辞書の読み込みフィルタで使うメソッドをMiyoのインスタンスに付加するフィルタです。

最初のsatori_dictionary_loadで自動的に呼ばれますが、satori_dictionary_loadを使わずに辞書をロードしたい場合などにお使いください。

依存

このフィルタが依存するものはありません。

使用方法

以下のようにロードする辞書を指定します。

_load:
	filters: [..., satori_dictionary_load, ...]
	argument:
		satori_dictionary_load:
			files: [dicA.txt]
			directories: [./mode1]
			aitalk_id: OnSatoriAITalk

filesとdirectoriesは関係がなく、どちらか1つでも良いです。

どちらもゴーストルートからのパス(カレントディレクトリ)か絶対パスです。

directoriesは名前にかかわらずそのフォルダ内の全ファイルを読みます。

すでに辞書に同名のエントリがあり、なおかつそれが配列でなかったときは読み込みが失敗します。

里々における名前のない「*」が通常AIトークのエントリとして処理されますが、aitalk_idはそのIDを指定するものです。 指定しなければ「OnSatoriAITalk」が使われます。

このフィルタを実行した時点でMiyoのインスタンスには

  • miyo.SatoriDictionaryLoader.load_file(dictionary, file, options) - ファイル1つを里々辞書として読み込む
  • miyo.SatoriDictionaryLoader.load_str(dictionary, str, filepath, options) - 文字列を里々辞書として読み込む

が追加されています。

dictionaryは辞書の連想配列です。

file, strはそれぞれ読み込むファイル名と文字列です。

filepathは任意で、エラー時のファイル名として扱われます。

optionsは連想配列で、aitalk_idキーを指定できます。

satori_dictionary_loadを使わずにこれらメソッドを使う場合はsatori_dictionary_initializeを実行してください。

_load:
	filters: [..., satori_dictionary_initialize, ...]

注意

このフィルタは里々辞書のエントリ分割部分を処理するのみで、エントリの中身については処理しません。

つまりこのフィルタのみ使った場合は(1)や:はそのまま出力されます。

エントリの中身について里々辞書書式のように扱う場合はmiyojs-filter-satori_template等を使ってください。

これらエントリの分割とその内容のテンプレート処理は機能分離ができるものですので、個別のフィルタに分けられています。