ruby binding 追加
- FFI gem (libptouch)、exe ptouch-print-png(PNG のみ) - ステータス 32 バイトを Hash に展開(parse_status / status_hash) - CMake: libptouch 共有ライブラリ(ptouch_shared) - RuboCop、gemspec(homepage / source_code_uri) Made-with: Cursor
This commit is contained in:
@@ -14,6 +14,7 @@ Brother P-touch シリーズ向けのラベル印刷用 **C コアライブラ
|
||||
| `src/libptouch.c` | ライブラリ本体(スタブ) |
|
||||
| `src/cli/main.c` | `ptouch-print` エントリ |
|
||||
| `samples/` | 試験用サンプル画像の置き場(PNG 等) |
|
||||
| `ruby/` | Ruby FFI gem(`libptouch`)・コマンド `ptouch-print-png`(PNG のみ)— `ruby/README.md` |
|
||||
| `reference/` | 仕様・参考資料(例: ラスター PDF) |
|
||||
|
||||
## ビルド
|
||||
@@ -28,8 +29,13 @@ cmake --build build
|
||||
成果物(`build/` 以下):
|
||||
|
||||
- `libptouch.a` — 静的ライブラリ
|
||||
- `libptouch.so` — 共有ライブラリ(Ruby FFI 用)
|
||||
- `ptouch-print` — CLI
|
||||
|
||||
### Ruby gem
|
||||
|
||||
共有ライブラリをビルドしたうえで、`ruby/` で `bundle install` → `gem build libptouch.gemspec` など(手順は `ruby/README.md`)。
|
||||
|
||||
## CLI の使い方(雛形)
|
||||
|
||||
**PNG**(拡張子 `.png` または PNG シグネチャ)の場合は幅・高さは画像から取得します。任意で `-t`(0–255)で二値化しきい値を指定できます。
|
||||
|
||||
Reference in New Issue
Block a user