Skip to main content

マークダウンファイルを各種公開プラットフォーム用に変換するツール

Project description

Content-Converter

テキストファイルを指定されたプロンプトとテンプレートに基づいて変換するツールです。

概要

Content-Converterは、LLMを活用して、入力テキストを指定されたプロンプトとテンプレートに基づいて変換します。CI/CDパイプラインから呼び出せる形式で提供され、自動化された変換処理を可能にします。

主な機能

  • テキストファイルの変換処理
  • プロンプトベースの変換制御
  • テンプレートベースの出力形式定義
  • 複数LLMプロバイダー対応
  • カスタムプロンプト機能
  • 任意のテキスト形式に対応

ドキュメント

サポートされているLLMプロバイダー

サポートされているLLMプロバイダーとその設定方法については、LLMプロバイダー一覧を参照してください。

使用方法

content-converter を使用する前に、Pythonの仮想環境を適切にセットアップし、依存関係が完全にインストールされていることを確認してください。

重要: 仮想環境でのインストールに関する注意点 pip install content-converter を実行した際に、稀に依存関係のインストールが不完全となる場合があります。特に google.generativeai モジュールが見つからない (ModuleNotFoundError) などのエラーが発生した場合は、以下の手順で対処してください。

  1. 仮想環境内で pip を最新の状態に更新します。
    python -m ensurepip --upgrade
    python -m pip install --upgrade pip
    
  2. その後、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

content_converter-1.2.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

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

content_converter-1.2.0-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

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

Hashes for content_converter-1.2.0.tar.gz
Algorithm Hash digest
SHA256 9605f9698a90f085812ea4c73bc91a0ea6569c87ad2e434b5d90789c9de2ef9d
MD5 5481714b8e232ac14b9a54304732b9f5
BLAKE2b-256 4e0350a5e168d77849a3edc3c62d87681658cb8641e1496b558735bc596a7347

See more details on using hashes here.

File details

Details for the file content_converter-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for content_converter-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a5db5c53409bef8123c887193a53d188737efa6e6a5ef297828dfc84367d493
MD5 05edba4b77c429672319ae9b4e5050a8
BLAKE2b-256 7d22af0d06c2fef0eb37b22328832fcaf0ec2c7dfc437adaa255fe815f55ef4a

See more details on using hashes here.

Supported by

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