Name | xltree JSON |
Version |
0.7.0
JSON |
| download |
home_page | None |
Summary | Render tree structure diagram using border on Excel. |
upload_time | 2024-10-26 17:50:37 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | MIT License Copyright (c) 2024 むずでょ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
border
excel
tree structure diagram
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# xltree
エクセルのワークシートの境界線を使って、ツリー構造図を描画します
# 例1:ディレクトリー・パス
Output:
![View](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__22--0026-XltreeDrive.png)
👆 わたしのWindows PCのCドライブの例です
(`xltree>=0.0.10` から) ツリー部分より右側の列、つまり上図でいうと last_modified 列以降も出力します
(`xltree>=0.3.1` から) セル結合するかしないか選べます
Input case like a table:
![Data](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__20--1630-XltreeDriveTableData.png)
```csv
no,node0,node1,node2,node3,node4,node5,node6,node7,node8,last_modified,size,comment
1,C,Users,Muzudho,OneDrive,Documents,GitHub,,,,2024/10/18 12:31,,
2,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine,Lesserkai.exe,2022/03/07 21:03,266 KB,
3,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine,Lesserkai_ja.txt,2012/12/05 22:37,1 KB,
4,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine,public.bin,2002/05/11 22:12,"5,213 KB",
5,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,ja,Shogidokoro.resources.dll,2024/05/11 20:43,257 KB,
6,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine.xml,,2024/09/13 20:20,4 KB,
7,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,GameResult.xml,,2024/09/13 20:20,"2,357 KB",
8,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Shogidokoro.exe,,2024/05/11 20:43,"4,902 KB",version 5.4.1
9,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Shogidokoro.xml,,2024/09/13 20:20,8 KB,
10,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,お読みください.txt,,2024/05/11 15:24,49 KB,
11,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro.zip,,,2024/04/27 20:23,3.104 KB,
12,C,Users,Muzudho,OneDrive,Documents,Visual Studio 2022,,,,2024/07/22 13:47,,
13,C,Users,Muzudho,OneDrive,Documents,Default.rdp,,,,2023/09/23 14:05,,
```
👆 さきほどの Output の図は、上図の CSV ファイルを読込ませると描いてくれます。
`node` 列は 0 から始まる連番で増やすことができます。常識的な長さにしてください
Input case like a tree:
![Data](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__20--1633-XltreeDriveTreeData.png)
```csv
node0,node1,node2,node3,node4,node5,node6,node7,node8,last_modified,size,comment
C,Users,Muzudho,OneDrive,Documents,GitHub,,,,2024/10/18 12:31,,
,,,,,Tools,Shogidokoro,Engine,Lesserkai.exe,2022/03/07 21:03,266 KB,
,,,,,,,,Lesserkai_ja.txt,2012/12/05 22:37,1 KB,
,,,,,,,,public.bin,2002/05/11 22:12,"5,213 KB",
,,,,,,,ja,Shogidokoro.resources.dll,2024/05/11 20:43,257 KB,
,,,,,,,Engine.xml,,2024/09/13 20:20,4 KB,
,,,,,,,GameResult.xml,,2024/09/13 20:20,"2,357 KB",
,,,,,,,Shogidokoro.exe,,2024/05/11 20:43,"4,902 KB",version 5.4.1
,,,,,,,Shogidokoro.xml,,2024/09/13 20:20,8 KB,
,,,,,,,お読みください.txt,,2024/05/11 15:24,49 KB,
,,,,,,Shogidokoro.zip,,,2024/04/27 20:23,3.104 KB,
,,,,,Visual Studio 2022,,,,2024/07/22 13:47,,
,,,,,Default.rdp,,,,2023/09/23 14:05,,
```
👆 さきほどの CSV と同じワークブック(.xlsx)を出力できる CSV です。
(`xltree>=0.0.10` から) no 列は省くことができます。また、中間ノードが空欄になっている箇所は、前行と同じとみなします
Script:
```py
import xltree as tr
# 出力先ワークブックを指定し、ワークブックハンドル取得
with tr.prepare_workbook(target='./examples/temp/example_o1o0_tree_drive.xlsx', mode='w') as b:
# 読取元CSVを指定し、ワークシートハンドル取得
with b.prepare_worksheet(target='Drive', based_on='./examples/data/drive_by_table.csv') as s:
# ワークシートへ木構造図を描画
s.render_tree()
# 何かワークシートを1つ作成したあとで、最初から入っている 'Sheet' を削除
b.remove_worksheet(target='Sheet')
# 保存
b.save_workbook()
```
👆 上記はスクリプトの記述例です
(xltree==0.4.0 から) `WorkbookControl` は廃止し、`prepare_workbook`, `prepare_worksheet` を使うように変更しました
👇 (xltree==0.5.0 から)前述の Input case like a table で示した CSV ファイルを出力するためのオブジェクト・モデルもあります
```py
import datetime
import pandas as pd
from xltree as tr
# 森作成
# ------
#
# 複数の根を持つことができます
#
forest = tr.planting()
# 根を追加するなら tree_root()、辺と中間節を追加するなら grow()、 葉を明示するなら leaf() を使ってください
documents = forest.tree_root(edge_text=None, node_text='C').grow(edge_text=None, node_text='Users').grow(None, 'Muzudho').grow(None, 'OneDrive').grow(None, 'Documents')
if True: # インデントしたいだけ
documents.leaf(edge_text=None, node_text='GitHub', remainder_columns={'last_modified':'2024/10/18 12:31'})
tools = documents.grow(None, 'Tools')
if True:
shogidokoro = tools.grow(None, 'Shogidokoro')
if True:
engine = shogidokoro.grow(None, 'Engine')
if True:
engine.leaf(None, 'Lesserkai.exe', {'last_modified':'2022/03/07 21:03', 'size':'266 KB'})
engine.leaf(None, 'Lesserkai_ja.txt', {'last_modified':'2012/12/05 22:37', 'size':'1 KB'})
engine.leaf(None, 'public.bin', {'last_modified':'2002/05/11 22:12', 'size':'5,213 KB'})
shogidokoro.grow(None, 'ja').leaf(None, 'Shogidokoro.resources.dll', {'last_modified':'2024/05/11 20:43', 'size':'257 KB'})
shogidokoro.leaf(None, 'Engine.xml', {'last_modified':'2024/09/13 20:20', 'size':'4 KB'})
shogidokoro.leaf(None, 'GameResult.xml', {'last_modified':'2024/09/13 20:20', 'size':'2,357 KB'})
shogidokoro.leaf(None, 'Shogidokoro.exe', {'last_modified':'2024/05/11 20:43', 'size':'4,902 KB', 'comment':'version 5.4.1'})
shogidokoro.leaf(None, 'Shogidokoro.xml', {'last_modified':'2024/09/13 20:20', 'size':'8 KB'})
shogidokoro.leaf(None, 'お読みください.txt', {'last_modified':'2024/05/11 15:24', 'size':'49 KB'})
tools.leaf(None, 'Shogidokoro.zip', {'last_modified':'2024/04/27 20:23', 'size':'3.104 KB'})
documents.leaf(None, 'Visual Studio 2022', {'last_modified':'2024/07/22 13:47'})
documents.leaf(None, 'Default.rdp', {'last_modified':'2023/09/23 14:05'})
# 任意。余り列の出力順を指定する
forest.order_of_remainder_columns = ['last_modified', 'size', 'comment']
# 任意。葉要素に番号を振っていく。葉に連番を振る機能があって、 TreeEntry#leaf_th プロパティで取り出せます
#forest.renumbering()
# 森をCSV形式でファイルへ保存
# ---------------------------
forest.to_csv(csv_file_path='./tests/diff_dump/actual/example_o1o1o0_tree_model_table.txt')
```
👆 (xltree==0.6.0 から) `forest.remainder_column_name_list` プロパティは `forest.order_of_remainder_columns` に名称変更
# 例2:しりとり
Output:
![View](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__22--0034-XltreeWordChainGame.png)
👆 しりとりというゲームの記録です。図(Diagram)の辺(Edge)にテキストを書くのはオプションです
Input:
![Data](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__22--0039-XltreeWordChainGameData.png)
```csv
no,node0,edge1,node1,edge2,node2,edge3,node3,edge4,node4,edge5,node5,edge6,node6,edge7,node7,edge8,node8,result
1,Word Chain Game,Ea,Eagle,E,Euler,R,Rex,,,,,,,,,,,ended with x
2,Word Chain Game,Eb,Ebony,Y,Yellow,W,Wood,D,Door,R,Rocket,T,Tax,,,,,ended with x
3,Word Chain Game,Ec,Eclair,R,Road,D,Dungeon,N,News,S,Sex,,,,,,,ended with x
4,Word Chain Game,Ed,Edelweiss,S,Sox,,,,,,,,,,,,,ended with x
7,Word Chain Game,En,English,Ha,Hand,Dog,Dog,G,Gorilla,A,Arm,M,Moon,N,Nice,,,adjective
6,Word Chain Game,En,English,Ha,Hand,Doo,Door,R,Ring,G,Grape,E,Egg,G,Golf,F,Fox,ended with x
5,Word Chain Game,En,English,Ha,Hand,Dr,Dragon,N,Nob,B,Box,,,,,,,ended with x
8,Word Chain Game,En,English,He,Hex,,,,,,,,,,,,,ended with x
9,Word Chain Game,En,English,Ho,Hook,Kit,Kitchen,N,Nickel,L,Lemon,N,Nickel,,,,,time up
10,Word Chain Game,En,English,Ho,Hook,Kin,King,G,Goal,L,Lemon,N,Nickel,L,Lemon,,,repetition
```
👆 `edge` 列は 1 から始まる連番で増やすことができます。 `node` 列より深い番号を付けても無視されます
Script:
```py
import xltree as tr
# 出力先ワークブックを指定し、ワークブックハンドル取得
with tr.prepare_workbook(target='./examples/temp/example_o2o0_word_chain_game.xlsx', mode='w') as b:
# 読取元CSVを指定し、ワークシートハンドル取得
with b.prepare_worksheet(target='WordChainGame', based_on='./examples/data/word_chain_game.csv') as s:
# ワークシートへ木構造図を描画
s.render_tree()
# 何かワークシートを1つ作成したあとで、最初から入っている 'Sheet' を削除
b.remove_worksheet(target='Sheet')
# 保存
b.save_workbook()
```
# 例3:偏ったコインを投げて表と裏が出る確率
Output:
![View](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__22--0035-XltreeUnevenCoin.png)
👆 スタイルも少しだけ設定できます
Input:
省略します
Script:
```py
import xltree as tr
# 各種設定
settings = {
# 列の幅
#'column_width_of_no': 4, # A列の幅。no列
#'column_width_of_root_side_padding': 3, # B列の幅。ツリー構造図の根側パディング
#'column_width_of_leaf_side_padding': 3, # ツリー構造図の葉側パディング
'column_width_of_node': 7, # 例:C, F, I ...列の幅。ノードの箱の幅
#'column_width_of_parent_side_edge': 2, # 例:D, G, J ...列の幅。エッジの水平線のうち、親ノードの方
'column_width_of_child_side_edge': 22, # 例:E, H, K ...列の幅。エッジの水平線のうち、子ノードの方
# 行の高さ
'row_height_of_header': 13, # 第1行。ヘッダー
'row_height_of_lower_side_padding': 13, # 第2行。ツリー構造図の軸の番号が小さい側パティング
'row_height_of_upper_side_of_node': 13, # ノードの上側のセルの高さ
'row_height_of_lower_side_of_node': 6, # ノードの下側のセルの高さ
'row_height_of_node_spacing': 6, # ノード間の高さ
# 背景色関連
'bgcolor_of_tree': 'EEEEFF', # ツリー構造図の背景
'bgcolor_of_header_1': 'CCCCFF', # ヘッダーの背景色その1
'bgcolor_of_header_2': '333366', # ヘッダーの背景色その2
'bgcolor_of_node': 'EEFFCC', # 背景色
# 文字色関連
'fgcolor_of_header_1': '111122', # ヘッダーの文字色その1
'fgcolor_of_header_2': 'EEEEFF', # ヘッダーの文字色その2
# 文字寄せ関連
'horizontal_alignment_of_node': 'left', # 文字の水平方向の寄せ。規定値 None。'left', 'fill', 'centerContinuous', 'center', 'right', 'general', 'justify', 'distributed' のいずれか。指定しないなら None
'vertical_alignment_of_node': None, # 文字の垂直方向の寄せ。規定値 None。'bottom', 'center', 'top', 'justify', 'distributed' のいずれか。指定しないなら None
# その他の操作
'do_not_merge_cells': False, # セル結合しないなら真
}
# 出力先ワークブックを指定し、ワークブックハンドル取得
with tr.prepare_workbook(target='./examples/temp/example_o3o0_uneven_coin.xlsx', mode='w', settings=settings) as b:
# 読取元CSVを指定し、ワークシートハンドル取得
with b.prepare_worksheet(target='UnevenCoin', based_on='./examples/data/uneven_coin.csv') as s:
# ワークシートへ木構造図を描画
s.render_tree()
# 何かワークシートを1つ作成したあとで、最初から入っている 'Sheet' を削除
b.remove_worksheet(target='Sheet')
# 保存
b.save_workbook()
```
👆 Settings オブジェクトを使ってください。
(`xltree>=0.1.0` から) settings は Dictionary 型になりました
(`xltree>=0.2.0` から) `column_width_of_row_header_separator` は `column_width_of_root_side_padding` に名称変更しました
(`xltree>=0.3.0` から) `row_height_of_column_header_separator` は `row_height_of_lower_side_padding` に名称変更しました
# 例4:ツリー構造モデルの作成
(tree==0.4.2 から) ツリー構造のモデルを取得できます
👇 以下はターミナル表示
Output:
```plaintext
📁 C
└── 📁 Users
└── 📁 Muzudho
└── 📁 OneDrive
└── 📁 Documents
└── 📄 (1) GitHub
└── 📁 Tools
└── 📁 Shogidokoro
└── 📁 Engine
└── 📄 (2) Lesserkai.exe
└── 📄 (3) Lesserkai_ja.txt
└── 📄 (4) public.bin
└── 📁 ja
└── 📄 (5) Shogidokoro.resources.dll
└── 📄 (6) Engine.xml
└── 📄 (7) GameResult.xml
└── 📄 (8) Shogidokoro.exe
└── 📄 (9) Shogidokoro.xml
└── 📄 (10) お読みください.txt
└── 📄 (11) Shogidokoro.zip
└── 📄 (12) Visual Studio 2022
└── 📄 (13) Default.rdp
```
Script:
```py
import xltree as tr
# 出力先ワークブックを指定し、ワークブックハンドル取得
with tr.prepare_workbook(target='./examples/temp/example_o1o0_tree_drive.xlsx', mode='w') as b:
# 読取元CSVを指定し、ワークシートハンドル取得
with b.prepare_worksheet(target='Drive', based_on='./examples/data/drive_by_table.csv') as s:
def print_child(indent, node):
"""再帰的に子ノードを表示"""
succ_indent = indent + ' '
for child_entry in node.child_entries.values():
# エッジテキスト
if child_entry.edge_text is not None:
et = f"─{child_entry.edge_text}─"
else:
et = '──'
# 葉ノード
if not child_entry.has_children():
print(f"{indent}└{et} 📄 ({child_entry.leaf_th}) {child_entry.node_text}")
# 中間ノード
else:
print(f"{indent}└{et} 📁 {child_entry.node_text}")
print_child(indent=succ_indent, node=child_entry) # 再帰
# 木構造のターミナル表示
for root_entry in s.forest.multiple_root_entry.values():
print(f"📁 {root_entry.node_text}")
print_child(indent='', node=root_entry)
```
👆 以上がこのライブラリに付属しているツリー構造の操作のインターフェースです。他に便利なツリー構造のライブラリーがあれば、そちらへ内容を移し替えてください
(xltree==0.5.0 から) `child_nodes` を `child_entries` へ名称変更。 `node.text` は `entry.node_text` へ名称変更。 `s.multiple_root_entry` は `s.forest.multiple_root_entry` へ変更
Raw data
{
"_id": null,
"home_page": null,
"name": "xltree",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": "\"Takahashi Satoshi (Handle Name:\u3080\u305a\u3067\u3087)\" <muzudho1@gmail.com>",
"keywords": "border, excel, tree structure diagram",
"author": null,
"author_email": "\"Takahashi Satoshi (Handle Name:\u3080\u305a\u3067\u3087)\" <muzudho1@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/88/1e/f0b8b89fd86dcc205a14d4db2e7f4aa90a8c03185c60a1348abc647bc2c4/xltree-0.7.0.tar.gz",
"platform": null,
"description": "# xltree\n\n\u30a8\u30af\u30bb\u30eb\u306e\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u306e\u5883\u754c\u7dda\u3092\u4f7f\u3063\u3066\u3001\u30c4\u30ea\u30fc\u69cb\u9020\u56f3\u3092\u63cf\u753b\u3057\u307e\u3059\n\n# \u4f8b\uff11\uff1a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u30fb\u30d1\u30b9\n\nOutput: \n\n![View](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__22--0026-XltreeDrive.png) \n\n\ud83d\udc46\u3000\u308f\u305f\u3057\u306eWindows PC\u306eC\u30c9\u30e9\u30a4\u30d6\u306e\u4f8b\u3067\u3059 \n\uff08`xltree>=0.0.10` \u304b\u3089\uff09 \u30c4\u30ea\u30fc\u90e8\u5206\u3088\u308a\u53f3\u5074\u306e\u5217\u3001\u3064\u307e\u308a\u4e0a\u56f3\u3067\u3044\u3046\u3068 last_modified \u5217\u4ee5\u964d\u3082\u51fa\u529b\u3057\u307e\u3059 \n\uff08`xltree>=0.3.1` \u304b\u3089\uff09 \u30bb\u30eb\u7d50\u5408\u3059\u308b\u304b\u3057\u306a\u3044\u304b\u9078\u3079\u307e\u3059 \n\nInput case like a table: \n\n![Data](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__20--1630-XltreeDriveTableData.png) \n\n```csv\nno,node0,node1,node2,node3,node4,node5,node6,node7,node8,last_modified,size,comment\n1,C,Users,Muzudho,OneDrive,Documents,GitHub,,,,2024/10/18 12:31,,\n2,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine,Lesserkai.exe,2022/03/07 21:03,266 KB,\n3,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine,Lesserkai_ja.txt,2012/12/05 22:37,1 KB,\n4,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine,public.bin,2002/05/11 22:12,\"5,213 KB\",\n5,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,ja,Shogidokoro.resources.dll,2024/05/11 20:43,257 KB,\n6,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine.xml,,2024/09/13 20:20,4 KB,\n7,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,GameResult.xml,,2024/09/13 20:20,\"2,357 KB\",\n8,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Shogidokoro.exe,,2024/05/11 20:43,\"4,902 KB\",version 5.4.1\n9,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Shogidokoro.xml,,2024/09/13 20:20,8 KB,\n10,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,\u304a\u8aad\u307f\u304f\u3060\u3055\u3044.txt,,2024/05/11 15:24,49 KB,\n11,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro.zip,,,2024/04/27 20:23,3.104 KB,\n12,C,Users,Muzudho,OneDrive,Documents,Visual Studio 2022,,,,2024/07/22 13:47,,\n13,C,Users,Muzudho,OneDrive,Documents,Default.rdp,,,,2023/09/23 14:05,,\n```\n\n\ud83d\udc46\u3000\u3055\u304d\u307b\u3069\u306e Output \u306e\u56f3\u306f\u3001\u4e0a\u56f3\u306e CSV \u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u8fbc\u307e\u305b\u308b\u3068\u63cf\u3044\u3066\u304f\u308c\u307e\u3059\u3002 \n`node` \u5217\u306f 0 \u304b\u3089\u59cb\u307e\u308b\u9023\u756a\u3067\u5897\u3084\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5e38\u8b58\u7684\u306a\u9577\u3055\u306b\u3057\u3066\u304f\u3060\u3055\u3044 \n\nInput case like a tree: \n\n![Data](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__20--1633-XltreeDriveTreeData.png) \n\n```csv\nnode0,node1,node2,node3,node4,node5,node6,node7,node8,last_modified,size,comment\nC,Users,Muzudho,OneDrive,Documents,GitHub,,,,2024/10/18 12:31,,\n,,,,,Tools,Shogidokoro,Engine,Lesserkai.exe,2022/03/07 21:03,266 KB,\n,,,,,,,,Lesserkai_ja.txt,2012/12/05 22:37,1 KB,\n,,,,,,,,public.bin,2002/05/11 22:12,\"5,213 KB\",\n,,,,,,,ja,Shogidokoro.resources.dll,2024/05/11 20:43,257 KB,\n,,,,,,,Engine.xml,,2024/09/13 20:20,4 KB,\n,,,,,,,GameResult.xml,,2024/09/13 20:20,\"2,357 KB\",\n,,,,,,,Shogidokoro.exe,,2024/05/11 20:43,\"4,902 KB\",version 5.4.1\n,,,,,,,Shogidokoro.xml,,2024/09/13 20:20,8 KB,\n,,,,,,,\u304a\u8aad\u307f\u304f\u3060\u3055\u3044.txt,,2024/05/11 15:24,49 KB,\n,,,,,,Shogidokoro.zip,,,2024/04/27 20:23,3.104 KB,\n,,,,,Visual Studio 2022,,,,2024/07/22 13:47,,\n,,,,,Default.rdp,,,,2023/09/23 14:05,,\n```\n\n\ud83d\udc46 \u3055\u304d\u307b\u3069\u306e CSV \u3068\u540c\u3058\u30ef\u30fc\u30af\u30d6\u30c3\u30af\uff08.xlsx\uff09\u3092\u51fa\u529b\u3067\u304d\u308b CSV \u3067\u3059\u3002 \n\uff08`xltree>=0.0.10` \u304b\u3089\uff09 no \u5217\u306f\u7701\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u4e2d\u9593\u30ce\u30fc\u30c9\u304c\u7a7a\u6b04\u306b\u306a\u3063\u3066\u3044\u308b\u7b87\u6240\u306f\u3001\u524d\u884c\u3068\u540c\u3058\u3068\u307f\u306a\u3057\u307e\u3059 \n\nScript: \n\n```py\nimport xltree as tr\n\n\n# \u51fa\u529b\u5148\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3092\u6307\u5b9a\u3057\u3001\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u30cf\u30f3\u30c9\u30eb\u53d6\u5f97\nwith tr.prepare_workbook(target='./examples/temp/example_o1o0_tree_drive.xlsx', mode='w') as b:\n\n # \u8aad\u53d6\u5143CSV\u3092\u6307\u5b9a\u3057\u3001\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u30cf\u30f3\u30c9\u30eb\u53d6\u5f97\n with b.prepare_worksheet(target='Drive', based_on='./examples/data/drive_by_table.csv') as s:\n\n # \u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3078\u6728\u69cb\u9020\u56f3\u3092\u63cf\u753b\n s.render_tree()\n\n # \u4f55\u304b\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\uff11\u3064\u4f5c\u6210\u3057\u305f\u3042\u3068\u3067\u3001\u6700\u521d\u304b\u3089\u5165\u3063\u3066\u3044\u308b 'Sheet' \u3092\u524a\u9664\n b.remove_worksheet(target='Sheet')\n\n # \u4fdd\u5b58\n b.save_workbook()\n```\n\n\ud83d\udc46\u3000\u4e0a\u8a18\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u8a18\u8ff0\u4f8b\u3067\u3059 \n(xltree==0.4.0 \u304b\u3089) `WorkbookControl` \u306f\u5ec3\u6b62\u3057\u3001`prepare_workbook`, `prepare_worksheet` \u3092\u4f7f\u3046\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3057\u305f \n\n\ud83d\udc47\u3000\uff08xltree==0.5.0 \u304b\u3089\uff09\u524d\u8ff0\u306e Input case like a table \u3067\u793a\u3057\u305f CSV \u30d5\u30a1\u30a4\u30eb\u3092\u51fa\u529b\u3059\u308b\u305f\u3081\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30fb\u30e2\u30c7\u30eb\u3082\u3042\u308a\u307e\u3059 \n\n```py\nimport datetime\nimport pandas as pd\nfrom xltree as tr\n\n\n# \u68ee\u4f5c\u6210\n# ------\n#\n# \u8907\u6570\u306e\u6839\u3092\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\n#\nforest = tr.planting()\n# \u6839\u3092\u8ffd\u52a0\u3059\u308b\u306a\u3089 tree_root()\u3001\u8fba\u3068\u4e2d\u9593\u7bc0\u3092\u8ffd\u52a0\u3059\u308b\u306a\u3089 grow()\u3001 \u8449\u3092\u660e\u793a\u3059\u308b\u306a\u3089 leaf() \u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\ndocuments = forest.tree_root(edge_text=None, node_text='C').grow(edge_text=None, node_text='Users').grow(None, 'Muzudho').grow(None, 'OneDrive').grow(None, 'Documents')\nif True: # \u30a4\u30f3\u30c7\u30f3\u30c8\u3057\u305f\u3044\u3060\u3051\n documents.leaf(edge_text=None, node_text='GitHub', remainder_columns={'last_modified':'2024/10/18 12:31'})\n tools = documents.grow(None, 'Tools')\n if True:\n shogidokoro = tools.grow(None, 'Shogidokoro')\n if True:\n engine = shogidokoro.grow(None, 'Engine')\n if True:\n engine.leaf(None, 'Lesserkai.exe', {'last_modified':'2022/03/07 21:03', 'size':'266 KB'})\n engine.leaf(None, 'Lesserkai_ja.txt', {'last_modified':'2012/12/05 22:37', 'size':'1 KB'})\n engine.leaf(None, 'public.bin', {'last_modified':'2002/05/11 22:12', 'size':'5,213 KB'})\n shogidokoro.grow(None, 'ja').leaf(None, 'Shogidokoro.resources.dll', {'last_modified':'2024/05/11 20:43', 'size':'257 KB'})\n shogidokoro.leaf(None, 'Engine.xml', {'last_modified':'2024/09/13 20:20', 'size':'4 KB'})\n shogidokoro.leaf(None, 'GameResult.xml', {'last_modified':'2024/09/13 20:20', 'size':'2,357 KB'})\n shogidokoro.leaf(None, 'Shogidokoro.exe', {'last_modified':'2024/05/11 20:43', 'size':'4,902 KB', 'comment':'version 5.4.1'})\n shogidokoro.leaf(None, 'Shogidokoro.xml', {'last_modified':'2024/09/13 20:20', 'size':'8 KB'})\n shogidokoro.leaf(None, '\u304a\u8aad\u307f\u304f\u3060\u3055\u3044.txt', {'last_modified':'2024/05/11 15:24', 'size':'49 KB'})\n tools.leaf(None, 'Shogidokoro.zip', {'last_modified':'2024/04/27 20:23', 'size':'3.104 KB'})\n documents.leaf(None, 'Visual Studio 2022', {'last_modified':'2024/07/22 13:47'})\n documents.leaf(None, 'Default.rdp', {'last_modified':'2023/09/23 14:05'})\n\n# \u4efb\u610f\u3002\u4f59\u308a\u5217\u306e\u51fa\u529b\u9806\u3092\u6307\u5b9a\u3059\u308b\nforest.order_of_remainder_columns = ['last_modified', 'size', 'comment']\n\n# \u4efb\u610f\u3002\u8449\u8981\u7d20\u306b\u756a\u53f7\u3092\u632f\u3063\u3066\u3044\u304f\u3002\u8449\u306b\u9023\u756a\u3092\u632f\u308b\u6a5f\u80fd\u304c\u3042\u3063\u3066\u3001 TreeEntry#leaf_th \u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u53d6\u308a\u51fa\u305b\u307e\u3059\n#forest.renumbering()\n\n\n# \u68ee\u3092CSV\u5f62\u5f0f\u3067\u30d5\u30a1\u30a4\u30eb\u3078\u4fdd\u5b58\n# ---------------------------\nforest.to_csv(csv_file_path='./tests/diff_dump/actual/example_o1o1o0_tree_model_table.txt')\n```\n\n\ud83d\udc46\u3000(xltree==0.6.0 \u304b\u3089) `forest.remainder_column_name_list` \u30d7\u30ed\u30d1\u30c6\u30a3\u306f `forest.order_of_remainder_columns` \u306b\u540d\u79f0\u5909\u66f4 \n\n# \u4f8b\uff12\uff1a\u3057\u308a\u3068\u308a\n\nOutput: \n\n![View](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__22--0034-XltreeWordChainGame.png) \n\n\ud83d\udc46\u3000\u3057\u308a\u3068\u308a\u3068\u3044\u3046\u30b2\u30fc\u30e0\u306e\u8a18\u9332\u3067\u3059\u3002\u56f3\uff08Diagram\uff09\u306e\u8fba\uff08Edge\uff09\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u66f8\u304f\u306e\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059 \n\nInput: \n\n![Data](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__22--0039-XltreeWordChainGameData.png) \n\n```csv\nno,node0,edge1,node1,edge2,node2,edge3,node3,edge4,node4,edge5,node5,edge6,node6,edge7,node7,edge8,node8,result\n1,Word Chain Game,Ea,Eagle,E,Euler,R,Rex,,,,,,,,,,,ended with x\n2,Word Chain Game,Eb,Ebony,Y,Yellow,W,Wood,D,Door,R,Rocket,T,Tax,,,,,ended with x\n3,Word Chain Game,Ec,Eclair,R,Road,D,Dungeon,N,News,S,Sex,,,,,,,ended with x\n4,Word Chain Game,Ed,Edelweiss,S,Sox,,,,,,,,,,,,,ended with x\n7,Word Chain Game,En,English,Ha,Hand,Dog,Dog,G,Gorilla,A,Arm,M,Moon,N,Nice,,,adjective\n6,Word Chain Game,En,English,Ha,Hand,Doo,Door,R,Ring,G,Grape,E,Egg,G,Golf,F,Fox,ended with x\n5,Word Chain Game,En,English,Ha,Hand,Dr,Dragon,N,Nob,B,Box,,,,,,,ended with x\n8,Word Chain Game,En,English,He,Hex,,,,,,,,,,,,,ended with x\n9,Word Chain Game,En,English,Ho,Hook,Kit,Kitchen,N,Nickel,L,Lemon,N,Nickel,,,,,time up\n10,Word Chain Game,En,English,Ho,Hook,Kin,King,G,Goal,L,Lemon,N,Nickel,L,Lemon,,,repetition\n```\n\n\ud83d\udc46\u3000`edge` \u5217\u306f 1 \u304b\u3089\u59cb\u307e\u308b\u9023\u756a\u3067\u5897\u3084\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 `node` \u5217\u3088\u308a\u6df1\u3044\u756a\u53f7\u3092\u4ed8\u3051\u3066\u3082\u7121\u8996\u3055\u308c\u307e\u3059 \n\nScript: \n\n```py\nimport xltree as tr\n\n\n# \u51fa\u529b\u5148\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3092\u6307\u5b9a\u3057\u3001\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u30cf\u30f3\u30c9\u30eb\u53d6\u5f97\nwith tr.prepare_workbook(target='./examples/temp/example_o2o0_word_chain_game.xlsx', mode='w') as b:\n\n # \u8aad\u53d6\u5143CSV\u3092\u6307\u5b9a\u3057\u3001\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u30cf\u30f3\u30c9\u30eb\u53d6\u5f97\n with b.prepare_worksheet(target='WordChainGame', based_on='./examples/data/word_chain_game.csv') as s:\n\n # \u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3078\u6728\u69cb\u9020\u56f3\u3092\u63cf\u753b\n s.render_tree()\n\n # \u4f55\u304b\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\uff11\u3064\u4f5c\u6210\u3057\u305f\u3042\u3068\u3067\u3001\u6700\u521d\u304b\u3089\u5165\u3063\u3066\u3044\u308b 'Sheet' \u3092\u524a\u9664\n b.remove_worksheet(target='Sheet')\n\n # \u4fdd\u5b58\n b.save_workbook()\n```\n\n# \u4f8b\uff13\uff1a\u504f\u3063\u305f\u30b3\u30a4\u30f3\u3092\u6295\u3052\u3066\u8868\u3068\u88cf\u304c\u51fa\u308b\u78ba\u7387\n\nOutput: \n\n![View](https://github.com/muzudho/pyxltree/raw/main/docs_dev/img/202410__pg__22--0035-XltreeUnevenCoin.png) \n\n\ud83d\udc46\u3000\u30b9\u30bf\u30a4\u30eb\u3082\u5c11\u3057\u3060\u3051\u8a2d\u5b9a\u3067\u304d\u307e\u3059 \n\nInput: \n\u7701\u7565\u3057\u307e\u3059 \n\nScript: \n\n```py\nimport xltree as tr\n\n\n# \u5404\u7a2e\u8a2d\u5b9a\nsettings = {\n # \u5217\u306e\u5e45\n #'column_width_of_no': 4, # A\u5217\u306e\u5e45\u3002no\u5217\n #'column_width_of_root_side_padding': 3, # B\u5217\u306e\u5e45\u3002\u30c4\u30ea\u30fc\u69cb\u9020\u56f3\u306e\u6839\u5074\u30d1\u30c7\u30a3\u30f3\u30b0\n #'column_width_of_leaf_side_padding': 3, # \u30c4\u30ea\u30fc\u69cb\u9020\u56f3\u306e\u8449\u5074\u30d1\u30c7\u30a3\u30f3\u30b0\n 'column_width_of_node': 7, # \u4f8b\uff1aC, F, I ...\u5217\u306e\u5e45\u3002\u30ce\u30fc\u30c9\u306e\u7bb1\u306e\u5e45\n #'column_width_of_parent_side_edge': 2, # \u4f8b\uff1aD, G, J ...\u5217\u306e\u5e45\u3002\u30a8\u30c3\u30b8\u306e\u6c34\u5e73\u7dda\u306e\u3046\u3061\u3001\u89aa\u30ce\u30fc\u30c9\u306e\u65b9\n 'column_width_of_child_side_edge': 22, # \u4f8b\uff1aE, H, K ...\u5217\u306e\u5e45\u3002\u30a8\u30c3\u30b8\u306e\u6c34\u5e73\u7dda\u306e\u3046\u3061\u3001\u5b50\u30ce\u30fc\u30c9\u306e\u65b9\n\n # \u884c\u306e\u9ad8\u3055\n 'row_height_of_header': 13, # \u7b2c\uff11\u884c\u3002\u30d8\u30c3\u30c0\u30fc\n 'row_height_of_lower_side_padding': 13, # \u7b2c\uff12\u884c\u3002\u30c4\u30ea\u30fc\u69cb\u9020\u56f3\u306e\u8ef8\u306e\u756a\u53f7\u304c\u5c0f\u3055\u3044\u5074\u30d1\u30c6\u30a3\u30f3\u30b0\n 'row_height_of_upper_side_of_node': 13, # \u30ce\u30fc\u30c9\u306e\u4e0a\u5074\u306e\u30bb\u30eb\u306e\u9ad8\u3055\n 'row_height_of_lower_side_of_node': 6, # \u30ce\u30fc\u30c9\u306e\u4e0b\u5074\u306e\u30bb\u30eb\u306e\u9ad8\u3055\n 'row_height_of_node_spacing': 6, # \u30ce\u30fc\u30c9\u9593\u306e\u9ad8\u3055\n\n # \u80cc\u666f\u8272\u95a2\u9023\n 'bgcolor_of_tree': 'EEEEFF', # \u30c4\u30ea\u30fc\u69cb\u9020\u56f3\u306e\u80cc\u666f\n 'bgcolor_of_header_1': 'CCCCFF', # \u30d8\u30c3\u30c0\u30fc\u306e\u80cc\u666f\u8272\u305d\u306e\uff11\n 'bgcolor_of_header_2': '333366', # \u30d8\u30c3\u30c0\u30fc\u306e\u80cc\u666f\u8272\u305d\u306e\uff12\n 'bgcolor_of_node': 'EEFFCC', # \u80cc\u666f\u8272\n\n # \u6587\u5b57\u8272\u95a2\u9023\n 'fgcolor_of_header_1': '111122', # \u30d8\u30c3\u30c0\u30fc\u306e\u6587\u5b57\u8272\u305d\u306e\uff11\n 'fgcolor_of_header_2': 'EEEEFF', # \u30d8\u30c3\u30c0\u30fc\u306e\u6587\u5b57\u8272\u305d\u306e\uff12\n\n # \u6587\u5b57\u5bc4\u305b\u95a2\u9023\n 'horizontal_alignment_of_node': 'left', # \u6587\u5b57\u306e\u6c34\u5e73\u65b9\u5411\u306e\u5bc4\u305b\u3002\u898f\u5b9a\u5024 None\u3002'left', 'fill', 'centerContinuous', 'center', 'right', 'general', 'justify', 'distributed' \u306e\u3044\u305a\u308c\u304b\u3002\u6307\u5b9a\u3057\u306a\u3044\u306a\u3089 None\n 'vertical_alignment_of_node': None, # \u6587\u5b57\u306e\u5782\u76f4\u65b9\u5411\u306e\u5bc4\u305b\u3002\u898f\u5b9a\u5024 None\u3002'bottom', 'center', 'top', 'justify', 'distributed' \u306e\u3044\u305a\u308c\u304b\u3002\u6307\u5b9a\u3057\u306a\u3044\u306a\u3089 None\n\n # \u305d\u306e\u4ed6\u306e\u64cd\u4f5c\n 'do_not_merge_cells': False, # \u30bb\u30eb\u7d50\u5408\u3057\u306a\u3044\u306a\u3089\u771f\n}\n\n# \u51fa\u529b\u5148\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3092\u6307\u5b9a\u3057\u3001\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u30cf\u30f3\u30c9\u30eb\u53d6\u5f97\nwith tr.prepare_workbook(target='./examples/temp/example_o3o0_uneven_coin.xlsx', mode='w', settings=settings) as b:\n\n # \u8aad\u53d6\u5143CSV\u3092\u6307\u5b9a\u3057\u3001\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u30cf\u30f3\u30c9\u30eb\u53d6\u5f97\n with b.prepare_worksheet(target='UnevenCoin', based_on='./examples/data/uneven_coin.csv') as s:\n\n # \u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3078\u6728\u69cb\u9020\u56f3\u3092\u63cf\u753b\n s.render_tree()\n\n # \u4f55\u304b\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\uff11\u3064\u4f5c\u6210\u3057\u305f\u3042\u3068\u3067\u3001\u6700\u521d\u304b\u3089\u5165\u3063\u3066\u3044\u308b 'Sheet' \u3092\u524a\u9664\n b.remove_worksheet(target='Sheet')\n\n # \u4fdd\u5b58\n b.save_workbook()\n```\n\n\ud83d\udc46\u3000Settings \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002 \n\uff08`xltree>=0.1.0` \u304b\u3089\uff09 settings \u306f Dictionary \u578b\u306b\u306a\u308a\u307e\u3057\u305f \n\uff08`xltree>=0.2.0` \u304b\u3089\uff09 `column_width_of_row_header_separator` \u306f `column_width_of_root_side_padding` \u306b\u540d\u79f0\u5909\u66f4\u3057\u307e\u3057\u305f \n\uff08`xltree>=0.3.0` \u304b\u3089\uff09 `row_height_of_column_header_separator` \u306f `row_height_of_lower_side_padding` \u306b\u540d\u79f0\u5909\u66f4\u3057\u307e\u3057\u305f \n\n# \u4f8b\uff14\uff1a\u30c4\u30ea\u30fc\u69cb\u9020\u30e2\u30c7\u30eb\u306e\u4f5c\u6210\n\n(tree==0.4.2 \u304b\u3089) \u30c4\u30ea\u30fc\u69cb\u9020\u306e\u30e2\u30c7\u30eb\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059 \n\n\ud83d\udc47\u3000\u4ee5\u4e0b\u306f\u30bf\u30fc\u30df\u30ca\u30eb\u8868\u793a \n\nOutput: \n\n```plaintext\n\ud83d\udcc1 C\n\u2514\u2500\u2500 \ud83d\udcc1 Users\n \u2514\u2500\u2500 \ud83d\udcc1 Muzudho\n \u2514\u2500\u2500 \ud83d\udcc1 OneDrive\n \u2514\u2500\u2500 \ud83d\udcc1 Documents\n \u2514\u2500\u2500 \ud83d\udcc4 (1) GitHub\n \u2514\u2500\u2500 \ud83d\udcc1 Tools\n \u2514\u2500\u2500 \ud83d\udcc1 Shogidokoro\n \u2514\u2500\u2500 \ud83d\udcc1 Engine\n \u2514\u2500\u2500 \ud83d\udcc4 (2) Lesserkai.exe\n \u2514\u2500\u2500 \ud83d\udcc4 (3) Lesserkai_ja.txt\n \u2514\u2500\u2500 \ud83d\udcc4 (4) public.bin\n \u2514\u2500\u2500 \ud83d\udcc1 ja\n \u2514\u2500\u2500 \ud83d\udcc4 (5) Shogidokoro.resources.dll\n \u2514\u2500\u2500 \ud83d\udcc4 (6) Engine.xml\n \u2514\u2500\u2500 \ud83d\udcc4 (7) GameResult.xml\n \u2514\u2500\u2500 \ud83d\udcc4 (8) Shogidokoro.exe\n \u2514\u2500\u2500 \ud83d\udcc4 (9) Shogidokoro.xml\n \u2514\u2500\u2500 \ud83d\udcc4 (10) \u304a\u8aad\u307f\u304f\u3060\u3055\u3044.txt\n \u2514\u2500\u2500 \ud83d\udcc4 (11) Shogidokoro.zip\n \u2514\u2500\u2500 \ud83d\udcc4 (12) Visual Studio 2022\n \u2514\u2500\u2500 \ud83d\udcc4 (13) Default.rdp\n```\n\nScript: \n\n```py\nimport xltree as tr\n\n\n# \u51fa\u529b\u5148\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3092\u6307\u5b9a\u3057\u3001\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u30cf\u30f3\u30c9\u30eb\u53d6\u5f97\nwith tr.prepare_workbook(target='./examples/temp/example_o1o0_tree_drive.xlsx', mode='w') as b:\n\n # \u8aad\u53d6\u5143CSV\u3092\u6307\u5b9a\u3057\u3001\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u30cf\u30f3\u30c9\u30eb\u53d6\u5f97\n with b.prepare_worksheet(target='Drive', based_on='./examples/data/drive_by_table.csv') as s:\n\n def print_child(indent, node):\n \"\"\"\u518d\u5e30\u7684\u306b\u5b50\u30ce\u30fc\u30c9\u3092\u8868\u793a\"\"\"\n succ_indent = indent + ' '\n for child_entry in node.child_entries.values():\n # \u30a8\u30c3\u30b8\u30c6\u30ad\u30b9\u30c8\n if child_entry.edge_text is not None:\n et = f\"\u2500{child_entry.edge_text}\u2500\"\n else:\n et = '\u2500\u2500'\n \n # \u8449\u30ce\u30fc\u30c9\n if not child_entry.has_children():\n print(f\"{indent}\u2514{et} \ud83d\udcc4 ({child_entry.leaf_th}) {child_entry.node_text}\")\n \n # \u4e2d\u9593\u30ce\u30fc\u30c9\n else:\n print(f\"{indent}\u2514{et} \ud83d\udcc1 {child_entry.node_text}\")\n print_child(indent=succ_indent, node=child_entry) # \u518d\u5e30\n\n # \u6728\u69cb\u9020\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u8868\u793a\n for root_entry in s.forest.multiple_root_entry.values():\n print(f\"\ud83d\udcc1 {root_entry.node_text}\")\n print_child(indent='', node=root_entry)\n```\n\n\ud83d\udc46\u3000\u4ee5\u4e0a\u304c\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u4ed8\u5c5e\u3057\u3066\u3044\u308b\u30c4\u30ea\u30fc\u69cb\u9020\u306e\u64cd\u4f5c\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3067\u3059\u3002\u4ed6\u306b\u4fbf\u5229\u306a\u30c4\u30ea\u30fc\u69cb\u9020\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u30fc\u304c\u3042\u308c\u3070\u3001\u305d\u3061\u3089\u3078\u5185\u5bb9\u3092\u79fb\u3057\u66ff\u3048\u3066\u304f\u3060\u3055\u3044 \n(xltree==0.5.0 \u304b\u3089) `child_nodes` \u3092 `child_entries` \u3078\u540d\u79f0\u5909\u66f4\u3002 `node.text` \u306f `entry.node_text` \u3078\u540d\u79f0\u5909\u66f4\u3002 `s.multiple_root_entry` \u306f `s.forest.multiple_root_entry` \u3078\u5909\u66f4\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 \u3080\u305a\u3067\u3087 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Render tree structure diagram using border on Excel.",
"version": "0.7.0",
"project_urls": {
"Repository": "https://github.com/muzudho/pyxltree.git"
},
"split_keywords": [
"border",
" excel",
" tree structure diagram"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1fabc91d67c5b26f9f727c90e4c96286116978ff4402728b94d91cd7bd89d4d5",
"md5": "3c939fad6efe888488a9892d654cd81e",
"sha256": "737a5afb04da4a6cc21d802a3c7f32e23c120ca5409f7bc567cb394eed30eb5f"
},
"downloads": -1,
"filename": "xltree-0.7.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "3c939fad6efe888488a9892d654cd81e",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 38493,
"upload_time": "2024-10-26T17:49:48",
"upload_time_iso_8601": "2024-10-26T17:49:48.855760Z",
"url": "https://files.pythonhosted.org/packages/1f/ab/c91d67c5b26f9f727c90e4c96286116978ff4402728b94d91cd7bd89d4d5/xltree-0.7.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "881ef0b8b89fd86dcc205a14d4db2e7f4aa90a8c03185c60a1348abc647bc2c4",
"md5": "b998fd0da1f8df706ec1788366326224",
"sha256": "8c6842998278bff0e5f2c4b4c86fc75e922a75e49dbb0c3eb30acc5eab01d1b6"
},
"downloads": -1,
"filename": "xltree-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "b998fd0da1f8df706ec1788366326224",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 33351,
"upload_time": "2024-10-26T17:50:37",
"upload_time_iso_8601": "2024-10-26T17:50:37.584954Z",
"url": "https://files.pythonhosted.org/packages/88/1e/f0b8b89fd86dcc205a14d4db2e7f4aa90a8c03185c60a1348abc647bc2c4/xltree-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-26 17:50:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "muzudho",
"github_project": "pyxltree",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "xltree"
}