LoginSignup
13
6

ファイルツリー生成

Posted at

初めてコードレビューをしていただいた際に、教えていただいた感激機能を共有:sparkles:

Ascii Tree Generator

階層構造テキストを生成してくれる機能

階層構造テキストとは...
README.mdに記載したりするコードのファイル構造のこと。

├── Main
│   ├── hello.py
│   └── test.py
└── Text
    └── world.txt

・ディレクトリ構成図
・ファイルツリー
など色々な呼び方があるみたい:thinking:

上記のものを作成する際に便利なのが Ascii Tree Generator
スクリーンショット 2024-05-17 212351.png

使用方法

.txtファイルに下記のように入力

#Main
##hello.py
##test.py
#Text
###SubMain
###subText.txt
##world.txt

Mainディレクトリの中にhello.pyとtest.pyが存在する
Textディレクトリの中にあるworld.txt
Textディレクトリの中にあるSubMainディレクトリ
また、SubMainディレクトリ中にあるsubText.txt

文字やとわかりづら...

記述したテキストをドラッグし、右クリック

Format Text to Tree Stringを選択

スクリーンショット 2024-05-17 213626.png



すると、このように変換される

├── Main
│   ├── hello.py
│   └── test.py
└── Text
    ├── SubMain
    │   └── subText.txt
    └── world.txt

ありがたい機能:sparkles:

参考記事

VS Code でファイルツリー風の階層構造テキストを生成する方法

13
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
6