<p align="center">
<img src="https://raw.githubusercontent.com/Sunwood-ai-labs/Prothiel/main/docs/Prothiel_icon.png" width="100%">
<br>
<h1 align="center">Prothiel</h1>
<h2 align="center">
~AI Harmony, Infinite Possibilities~
[](https://huggingface.co/spaces/MakiAi/Prothiel)
[](https://github.com/Sunwood-ai-labs/Prothiel "Go to GitHub repo")
[](https://github.com/Sunwood-ai-labs/Prothiel)
[](https://github.com/Sunwood-ai-labs/Prothiel)
[](https://github.com/Sunwood-ai-labs/Prothiel)
[](https://github.com/Sunwood-ai-labs/Prothiel)
[](https://github.com/Sunwood-ai-labs/Prothiel)
[](https://github.com/Sunwood-ai-labs/Prothiel)
<br>
</h2>
</p>
>[!IMPORTANT]
>このリポジトリは[SourceSage](https://github.com/Sunwood-ai-labs/SourceSage)を活用しており、リリースノートやREADME、コミットメッセージの9割は[SourceSage](https://github.com/Sunwood-ai-labs/SourceSage) + [claude.ai](https://claude.ai/)で生成しています。
## 🌟 はじめに
Prothielは、Markdownファイルからコードブロックを抽出し、それらを構造化されたファイル階層に整理するプロセスを簡素化する強力なPythonパッケージです。Prothielを使用すると、Markdownドキュメントを実行可能なPythonコードに簡単に変換できるため、開発者やテクニカルライターにとって貴重なツールとなります。
## ✨ 特徴
- 🔍 カスタマイズ可能なパターンに基づいてMarkdownファイルからコードブロックを抽出
- 📂 抽出されたコードをクリーンなファイル構造に整理
- 🎨 可読性を向上させるためのシンタックスハイライトをサポート
- 🧪 コードの整合性を確保するための組み込みテスト機能
- 🚀 ワークフローにシームレスに統合するためのコマンドラインインターフェイスを提供
## 🚀 始め方
### 前提条件
- Python 3.11以降
### インストール
1. 新しいconda環境を作成します:
```
conda create -n prothiel python=3.11
```
2. 環境をアクティベートします:
```
conda activate prothiel
```
3. Prothielをインストールします:
```
pip install prothiel
```
### 使用方法
1. 次の形式でコードブロックを含むMarkdownファイルを用意します:
```markdown
### path/to/file.py
```python
# ここにコードを書く
```
```
2. コマンドラインからProthielを実行します:
```
prothiel path/to/markdown_file.md output_directory
```
Prothielは、Markdownファイルからコードブロックを抽出し、指定された出力ディレクトリに対応するPythonファイルを作成します。
### 例
次の内容を持つ`example.md`というMarkdownファイルがあるとします:
```markdown
# Math functions
## Description
このテンプレートには、簡単な計算機能を持つ4つのPythonファイルが含まれています。各ファイルは基本的な算術演算を行う関数を定義しています。
### math_functions/basic_math/addition.py
```python
def add(a, b):
return a + b
```
### math_functions/basic_math/subtraction.py
```python
def subtract(a, b):
return a - b
```
## 発展的な数学
### math_functions/advanced_math/multiplication.py
```python
def multiply(a, b):
return a * b
```
### math_functions/advanced_math/division.py
```python
def divide(a, b):
if b != 0:
return a / b
else:
raise ValueError("0での除算は許可されていません。")
```
```
コードブロックを抽出してPythonファイルに整理するには、次のコマンドを実行します:
```
prothiel --markdown_file=example/01_math_functions.md --root_path=example/01_math_functions
prothiel --markdown_file=example/02_Project_Example.md --root_path=example/02_Project_Example
```
Prothielは次のファイル構造を作成します:
```
math_functions/
├── basic_math/
│ ├── addition.py
│ └── subtraction.py
└── advanced_math/
├── multiplication.py
└── division.py
```
## 📚 ドキュメント
詳細なドキュメントと高度な使用法については、[Prothielドキュメント](https://prothiel.readthedocs.io)を参照してください。
## 🤝 貢献
貢献は大歓迎です!アイデア、提案、バグ報告がある場合は、Issueを開くかプルリクエストを送ってください。詳細については[CONTRIBUTING.md](CONTRIBUTING.md)を参照してください。
## 📄 ライセンス
このプロジェクトは[MITライセンス](LICENSE)の下でライセンスされています。
## 🙏 謝辞
オープンソースコミュニティの皆様の貴重な貢献と着想に感謝いたします。
---
Prothielを使って、Markdownファイルからのコード抽出を楽々と始めましょう!🚀✨
Raw data
{
"_id": null,
"home_page": "https://github.com/Sunwood-ai-labs/Prothiel",
"name": "prothiel",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Maki",
"author_email": "sunwood.ai.labs@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/dc/14/b4507554a40ed244a147095424c0046b2382586d96b0464bf2e01a3b244c/prothiel-0.1.11.tar.gz",
"platform": null,
"description": "\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/Sunwood-ai-labs/Prothiel/main/docs/Prothiel_icon.png\" width=\"100%\">\n<br>\n<h1 align=\"center\">Prothiel</h1>\n<h2 align=\"center\">\n \uff5eAI Harmony, Infinite Possibilities\uff5e\n\n[](https://huggingface.co/spaces/MakiAi/Prothiel)\n[](https://github.com/Sunwood-ai-labs/Prothiel \"Go to GitHub repo\")\n[](https://github.com/Sunwood-ai-labs/Prothiel)\n[](https://github.com/Sunwood-ai-labs/Prothiel)\n[](https://github.com/Sunwood-ai-labs/Prothiel)\n[](https://github.com/Sunwood-ai-labs/Prothiel)\n[](https://github.com/Sunwood-ai-labs/Prothiel)\n[](https://github.com/Sunwood-ai-labs/Prothiel)\n\n <br>\n\n</h2>\n\n</p>\n\n>[!IMPORTANT]\n>\u3053\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306f[SourceSage](https://github.com/Sunwood-ai-labs/SourceSage)\u3092\u6d3b\u7528\u3057\u3066\u304a\u308a\u3001\u30ea\u30ea\u30fc\u30b9\u30ce\u30fc\u30c8\u3084README\u3001\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u306e9\u5272\u306f[SourceSage](https://github.com/Sunwood-ai-labs/SourceSage) \uff0b [claude.ai](https://claude.ai/)\u3067\u751f\u6210\u3057\u3066\u3044\u307e\u3059\u3002\n\n\n## \ud83c\udf1f \u306f\u3058\u3081\u306b\n\nProthiel\u306f\u3001Markdown\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u3092\u62bd\u51fa\u3057\u3001\u305d\u308c\u3089\u3092\u69cb\u9020\u5316\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u968e\u5c64\u306b\u6574\u7406\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u3092\u7c21\u7d20\u5316\u3059\u308b\u5f37\u529b\u306aPython\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u3059\u3002Prothiel\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001Markdown\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u5b9f\u884c\u53ef\u80fd\u306aPython\u30b3\u30fc\u30c9\u306b\u7c21\u5358\u306b\u5909\u63db\u3067\u304d\u308b\u305f\u3081\u3001\u958b\u767a\u8005\u3084\u30c6\u30af\u30cb\u30ab\u30eb\u30e9\u30a4\u30bf\u30fc\u306b\u3068\u3063\u3066\u8cb4\u91cd\u306a\u30c4\u30fc\u30eb\u3068\u306a\u308a\u307e\u3059\u3002\n\n## \u2728 \u7279\u5fb4\n\n- \ud83d\udd0d \u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u53ef\u80fd\u306a\u30d1\u30bf\u30fc\u30f3\u306b\u57fa\u3065\u3044\u3066Markdown\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u3092\u62bd\u51fa\n- \ud83d\udcc2 \u62bd\u51fa\u3055\u308c\u305f\u30b3\u30fc\u30c9\u3092\u30af\u30ea\u30fc\u30f3\u306a\u30d5\u30a1\u30a4\u30eb\u69cb\u9020\u306b\u6574\u7406\n- \ud83c\udfa8 \u53ef\u8aad\u6027\u3092\u5411\u4e0a\u3055\u305b\u308b\u305f\u3081\u306e\u30b7\u30f3\u30bf\u30c3\u30af\u30b9\u30cf\u30a4\u30e9\u30a4\u30c8\u3092\u30b5\u30dd\u30fc\u30c8 \n- \ud83e\uddea \u30b3\u30fc\u30c9\u306e\u6574\u5408\u6027\u3092\u78ba\u4fdd\u3059\u308b\u305f\u3081\u306e\u7d44\u307f\u8fbc\u307f\u30c6\u30b9\u30c8\u6a5f\u80fd\n- \ud83d\ude80 \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306b\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u7d71\u5408\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u63d0\u4f9b\n\n## \ud83d\ude80 \u59cb\u3081\u65b9\n\n### \u524d\u63d0\u6761\u4ef6\n\n- Python 3.11\u4ee5\u964d\n\n### \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\n\n1. \u65b0\u3057\u3044conda\u74b0\u5883\u3092\u4f5c\u6210\u3057\u307e\u3059:\n ```\n conda create -n prothiel python=3.11\n ```\n\n2. \u74b0\u5883\u3092\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8\u3057\u307e\u3059:\n ```\n conda activate prothiel\n ```\n\n3. Prothiel\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059:\n ```\n pip install prothiel\n ```\n\n### \u4f7f\u7528\u65b9\u6cd5\n\n1. \u6b21\u306e\u5f62\u5f0f\u3067\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u3092\u542b\u3080Markdown\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3057\u307e\u3059:\n ```markdown\n ### path/to/file.py\n \u200b```python\n # \u3053\u3053\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u304f\n \u200b```\n ```\n\n2. \u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089Prothiel\u3092\u5b9f\u884c\u3057\u307e\u3059:\n ```\n prothiel path/to/markdown_file.md output_directory\n ```\n\n Prothiel\u306f\u3001Markdown\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u3092\u62bd\u51fa\u3057\u3001\u6307\u5b9a\u3055\u308c\u305f\u51fa\u529b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u5bfe\u5fdc\u3059\u308bPython\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\n### \u4f8b\n\n\u6b21\u306e\u5185\u5bb9\u3092\u6301\u3064`example.md`\u3068\u3044\u3046Markdown\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u3068\u3057\u307e\u3059:\n\n```markdown\n# Math functions\n\n## Description\n\n\u3053\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u306f\u3001\u7c21\u5358\u306a\u8a08\u7b97\u6a5f\u80fd\u3092\u6301\u30644\u3064\u306ePython\u30d5\u30a1\u30a4\u30eb\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u5404\u30d5\u30a1\u30a4\u30eb\u306f\u57fa\u672c\u7684\u306a\u7b97\u8853\u6f14\u7b97\u3092\u884c\u3046\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002\n\n### math_functions/basic_math/addition.py\n\u200b```python\ndef add(a, b):\n return a + b\n\u200b```\n\n### math_functions/basic_math/subtraction.py\n\u200b```python\ndef subtract(a, b):\n return a - b\n\u200b```\n\n## \u767a\u5c55\u7684\u306a\u6570\u5b66\n\n### math_functions/advanced_math/multiplication.py\n\u200b```python \ndef multiply(a, b):\n return a * b\n\u200b```\n\n### math_functions/advanced_math/division.py\n\u200b```python\ndef divide(a, b):\n if b != 0: \n return a / b\n else:\n raise ValueError(\"0\u3067\u306e\u9664\u7b97\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\")\n\u200b```\n```\n\n\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u3092\u62bd\u51fa\u3057\u3066Python\u30d5\u30a1\u30a4\u30eb\u306b\u6574\u7406\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059:\n\n```\nprothiel --markdown_file=example/01_math_functions.md --root_path=example/01_math_functions\nprothiel --markdown_file=example/02_Project_Example.md --root_path=example/02_Project_Example\n```\n\nProthiel\u306f\u6b21\u306e\u30d5\u30a1\u30a4\u30eb\u69cb\u9020\u3092\u4f5c\u6210\u3057\u307e\u3059:\n\n```\nmath_functions/\n\u251c\u2500\u2500 basic_math/\n\u2502 \u251c\u2500\u2500 addition.py\n\u2502 \u2514\u2500\u2500 subtraction.py\n\u2514\u2500\u2500 advanced_math/\n \u251c\u2500\u2500 multiplication.py\n \u2514\u2500\u2500 division.py\n```\n\n## \ud83d\udcda \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\n\n\u8a73\u7d30\u306a\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3068\u9ad8\u5ea6\u306a\u4f7f\u7528\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001[Prothiel\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8](https://prothiel.readthedocs.io)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\n## \ud83e\udd1d \u8ca2\u732e\n\n\u8ca2\u732e\u306f\u5927\u6b53\u8fce\u3067\u3059\uff01\u30a2\u30a4\u30c7\u30a2\u3001\u63d0\u6848\u3001\u30d0\u30b0\u5831\u544a\u304c\u3042\u308b\u5834\u5408\u306f\u3001Issue\u3092\u958b\u304f\u304b\u30d7\u30eb\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u3063\u3066\u304f\u3060\u3055\u3044\u3002\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f[CONTRIBUTING.md](CONTRIBUTING.md)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\n## \ud83d\udcc4 \u30e9\u30a4\u30bb\u30f3\u30b9\n\n\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f[MIT\u30e9\u30a4\u30bb\u30f3\u30b9](LICENSE)\u306e\u4e0b\u3067\u30e9\u30a4\u30bb\u30f3\u30b9\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n\n## \ud83d\ude4f \u8b1d\u8f9e\n\n\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306e\u7686\u69d8\u306e\u8cb4\u91cd\u306a\u8ca2\u732e\u3068\u7740\u60f3\u306b\u611f\u8b1d\u3044\u305f\u3057\u307e\u3059\u3002\n\n---\n\nProthiel\u3092\u4f7f\u3063\u3066\u3001Markdown\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u306e\u30b3\u30fc\u30c9\u62bd\u51fa\u3092\u697d\u3005\u3068\u59cb\u3081\u307e\u3057\u3087\u3046\uff01\ud83d\ude80\u2728\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.1.11",
"project_urls": {
"Homepage": "https://github.com/Sunwood-ai-labs/Prothiel"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c9cb3c8b392cc4272c73abbd359f2ed9f037615d63234c354a104afe541e6f6f",
"md5": "7ff93344cd5986fd122a8c91270e8ab4",
"sha256": "7edd5b83997fa7207e0c19b79eedf2ff349150040a6be0f078f2302e9bd5aadf"
},
"downloads": -1,
"filename": "prothiel-0.1.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7ff93344cd5986fd122a8c91270e8ab4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7648,
"upload_time": "2024-05-11T23:10:27",
"upload_time_iso_8601": "2024-05-11T23:10:27.104887Z",
"url": "https://files.pythonhosted.org/packages/c9/cb/3c8b392cc4272c73abbd359f2ed9f037615d63234c354a104afe541e6f6f/prothiel-0.1.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dc14b4507554a40ed244a147095424c0046b2382586d96b0464bf2e01a3b244c",
"md5": "da341cd4e379c24f2ecc7f7cc7376592",
"sha256": "e82ea51b311cd50e9e3ff8ef0d803e6e961f392cf5f0b42d0f1def5e12596ff9"
},
"downloads": -1,
"filename": "prothiel-0.1.11.tar.gz",
"has_sig": false,
"md5_digest": "da341cd4e379c24f2ecc7f7cc7376592",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7091,
"upload_time": "2024-05-11T23:10:28",
"upload_time_iso_8601": "2024-05-11T23:10:28.750183Z",
"url": "https://files.pythonhosted.org/packages/dc/14/b4507554a40ed244a147095424c0046b2382586d96b0464bf2e01a3b244c/prothiel-0.1.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-11 23:10:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Sunwood-ai-labs",
"github_project": "Prothiel",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "termcolor",
"specs": []
},
{
"name": "art",
"specs": []
}
],
"lcname": "prothiel"
}