マークダウンファイルを各種公開プラットフォーム用に変換するツール
Project description
Content-Converter
テキストファイルを指定されたプロンプトとテンプレートに基づいて変換するツールです。
概要
Content-Converterは、LLMを活用して、入力テキストを指定されたプロンプトとテンプレートに基づいて変換します。CI/CDパイプラインから呼び出せる形式で提供され、自動化された変換処理を可能にします。
主な機能
- テキストファイルの変換処理
- プロンプトベースの変換制御
- テンプレートベースの出力形式定義
- 複数LLMプロバイダー対応
- カスタムプロンプト機能
- 任意のテキスト形式に対応
ドキュメント
サポートされているLLMプロバイダー
サポートされているLLMプロバイダーとその設定方法については、LLMプロバイダー一覧を参照してください。
使用方法
content-converter を使用する前に、Pythonの仮想環境を適切にセットアップし、依存関係が完全にインストールされていることを確認してください。
重要: 仮想環境でのインストールに関する注意点
pip install content-converter を実行した際に、稀に依存関係のインストールが不完全となる場合があります。特に google.generativeai モジュールが見つからない (ModuleNotFoundError) などのエラーが発生した場合は、以下の手順で対処してください。
- 仮想環境内で
pipを最新の状態に更新します。python -m ensurepip --upgrade python -m pip install --upgrade pip
- その後、
google-generativeaiを明示的にインストールします。pip install google-generativeai
これらの手順は、依存関係の完全な解決に役立ちます。
content-converter --input article.md --template template.md --output converted.md
詳細な使用方法や設定については、仕様書を参照してください。
出力形式
- 任意のテキスト形式に対応
- テンプレートベースの出力形式定義
- 入力と同形式の出力をサポート
- 環境変数またはコマンドライン引数でのAPIキー指定(詳細)
依存関係
必須依存パッケージ:
- pyyaml>=6.0
- python-frontmatter>=1.0.0
- requests>=2.28.0
- python-dotenv>=1.0.0
- markdown>=3.4.0
- pydantic>=2.5.2
ライセンス
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file content_converter-1.2.0.tar.gz.
File metadata
- Download URL: content_converter-1.2.0.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9605f9698a90f085812ea4c73bc91a0ea6569c87ad2e434b5d90789c9de2ef9d
|
|
| MD5 |
5481714b8e232ac14b9a54304732b9f5
|
|
| BLAKE2b-256 |
4e0350a5e168d77849a3edc3c62d87681658cb8641e1496b558735bc596a7347
|
File details
Details for the file content_converter-1.2.0-py3-none-any.whl.
File metadata
- Download URL: content_converter-1.2.0-py3-none-any.whl
- Upload date:
- Size: 28.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a5db5c53409bef8123c887193a53d188737efa6e6a5ef297828dfc84367d493
|
|
| MD5 |
05edba4b77c429672319ae9b4e5050a8
|
|
| BLAKE2b-256 |
7d22af0d06c2fef0eb37b22328832fcaf0ec2c7dfc437adaa255fe815f55ef4a
|