|
1 | 1 | <img src="./assets/banner.webp" alt="Folder Structure Pro" style="width: 100%; height: 250px; border: 4px solid rgba(255, 255, 255, 0.9); border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);"> |
2 | 2 |
|
3 | 3 | <p align="center"> |
4 | | - <a href="https://marketplace.visualstudio.com/items?itemName=iamshreydxv.copy-folder-structure?cacheSeconds=3600"> |
5 | | - <img src="https://img.shields.io/visual-studio-marketplace/v/iamshreydxv.copy-folder-structure?cacheSeconds=3600" alt="Marketplace Version"/> |
| 4 | + <a href="https://marketplace.visualstudio.com/items?itemName=iamshreydxv.copy-folder-structure"> |
| 5 | + <img src="https://img.shields.io/visual-studio-marketplace/v/iamshreydxv.copy-folder-structure" alt="Marketplace Version"/> |
6 | 6 | </a> |
7 | | - <a href="https://img.shields.io/visual-studio-marketplace/d/iamshreydxv.copy-folder-structure?cacheSeconds=3600"> |
8 | | - <img src="https://img.shields.io/visual-studio-marketplace/d/iamshreydxv.copy-folder-structure?cacheSeconds=3600" alt="Downloads"/> |
| 7 | + <a href="https://marketplace.visualstudio.com/items?itemName=iamshreydxv.copy-folder-structure"> |
| 8 | + <img src="https://img.shields.io/visual-studio-marketplace/d/iamshreydxv.copy-folder-structure" alt="Downloads"/> |
9 | 9 | </a> |
10 | | - <a href="https://marketplace.visualstudio.com/items?itemName=iamshreydxv.copy-folder-structure?cacheSeconds=3600"> |
11 | | - <img src="https://img.shields.io/visual-studio-marketplace/r/iamshreydxv.copy-folder-structure?cacheSeconds=3600" alt="Ratings"/> |
| 10 | + <a href="https://marketplace.visualstudio.com/items?itemName=iamshreydxv.copy-folder-structure"> |
| 11 | + <img src="https://img.shields.io/visual-studio-marketplace/r/iamshreydxv.copy-folder-structure" alt="Ratings"/> |
12 | 12 | </a> |
13 | 13 | </p> |
14 | 14 |
|
15 | 15 | ## Table of Contents |
16 | | -- [✨ Features](#features) |
17 | | -- [🚀 Quick Start](#quick-start) |
18 | | -- [📖 Detailed Usage](#detailed-usage) |
| 16 | +- [Features](#features) |
| 17 | +- [Quick Start](#quick-start) |
| 18 | +- [Detailed Usage](#detailed-usage) |
19 | 19 | - [Copy Folder Structure](#copy-folder-structure) |
20 | 20 | - [Create Folder Structure](#create-folder-structure) |
21 | 21 | - [Copy File Name](#copy-file-name) |
22 | | -- [⚙️ Settings](#settings) |
23 | | -- [📸 Preview](#preview) |
| 22 | +- [Settings](#settings) |
| 23 | +- [Preview](#preview) |
24 | 24 | - [Setting](#settings-1) |
25 | 25 | - [Context Menu](#context-menu) |
26 | 26 | - [Copy File Name](#copy-file-name-2) |
27 | 27 | - [Create Folder Structure](#create-folder-structure-2) |
28 | 28 | - [Common Usage](#common-usage) |
29 | | - - **[Usage With Git Ingest](#with-git-ingest)** |
30 | | -- [🔍 How It Works](#how-it-works) |
31 | | -- [❓ Troubleshooting](#troubleshooting) |
32 | | -- [📄 License](#license) |
33 | | -- [📬 Contact](#contact) |
34 | | - |
35 | | -## ✨ Features |
36 | | -- **Copy Folder Structure** 📋 |
37 | | - - **Two Output Formats**: |
38 | | - - 🌳 **Plain Text Format** (GitIgnest-style tree structure) (default) |
39 | | - - 📝 **JSON Format** |
40 | | - - Right-click menu integration |
41 | | - - Smart `.gitignore` handling |
42 | | - |
43 | | -- **Create Folder Structure** 🏗️ |
44 | | - - Support for both JSON and Plain Text formats |
45 | | - - Interactive UI with examples |
46 | | - - Input validation |
47 | | - |
48 | | -- **Copy File Name** 📎 |
49 | | - - Quick file name copying |
50 | | - - Error handling and feedback |
51 | | - |
52 | | -## 🚀 Quick Start |
| 29 | + - [With Git Ingest](#with-git-ingest) |
| 30 | +- [Copy Folder Structure Output](#copy-folder-structure-output) |
| 31 | +- [How It Works](#how-it-works) |
| 32 | +- [Troubleshooting](#troubleshooting) |
| 33 | +- [License](#license) |
| 34 | +- [Contact](#contact) |
| 35 | + |
| 36 | +## Features |
| 37 | +- Copy Folder Structure |
| 38 | + - Two output formats: |
| 39 | + - Plain Text (GitIngest-style tree) |
| 40 | + - JSON |
| 41 | + - Context menu integration |
| 42 | + - Respects .gitignore |
| 43 | + |
| 44 | +- Create Folder Structure |
| 45 | + - JSON and Plain Text inputs |
| 46 | + - Modern UI with live preview, validation, and line numbers |
| 47 | + - Replace/Skip existing items prompt (Replace sends to Trash) |
| 48 | + |
| 49 | +- Copy File Name |
| 50 | + - Quick file name copying to clipboard |
| 51 | + |
| 52 | +## Quick Start |
53 | 53 | 1. Install the extension |
54 | 54 | 2. Right-click any folder in Explorer |
55 | | -3. Choose "Copy Folder Structure" or "Create Project Using Folder Structure" |
| 55 | +3. Choose "Copy Folder Structure" or "Create Folder Structure" |
56 | 56 |
|
57 | | -## 📖 Detailed Usage |
| 57 | +## Detailed Usage |
58 | 58 |
|
59 | 59 | ### Copy Folder Structure |
60 | | -1. **Right-click** a folder in Explorer |
61 | | -2. Select **Copy Folder Structure** |
| 60 | +1. Right-click a folder in Explorer |
| 61 | +2. Select Copy Folder Structure |
62 | 62 | 3. Structure is copied in your preferred format (JSON/Plain Text) |
63 | 63 |
|
64 | 64 | ### Create Folder Structure |
65 | | -1. **Right-click** in Explorer or use Command Palette |
66 | | -2. Choose **Create Folder Structure** |
67 | | -3. Enter target directory |
| 65 | +1. Right-click in Explorer or use Command Palette |
| 66 | +2. Choose Create Folder Structure |
| 67 | +3. Select the target directory |
68 | 68 | 4. Select format and paste structure |
69 | | -5. Click Submit |
| 69 | +5. Click Create |
70 | 70 |
|
71 | 71 | ### Copy File Name |
72 | | -- Right-click any file |
73 | | -- Select **Copy File Name** |
| 72 | +- Right-click any file → Copy File Name |
74 | 73 |
|
75 | | -## Usage: |
| 74 | +## Settings |
| 75 | +- outputFormat: JSON Format | Plain Text Format |
| 76 | +- ignorePatterns: patterns to ignore when copying |
| 77 | +- respectGitignore: whether to honor .gitignore |
76 | 78 |
|
77 | | -### Copy Folder Structure: |
78 | | -1. **Right-click a folder** in **Explorer** and select **Copy Folder Structure**. |
79 | | -2. Alternatively, open the **Command Palette** (`Ctrl+Shift+P`) and search for **Copy Folder Structure**. |
| 79 | +## Preview |
80 | 80 |
|
81 | | -### Create Folder Structure: |
82 | | -1. **Right-click a folder** in **Explorer** and select **Create Project Using Folder Structure**. |
83 | | - - Alternatively, open the Command Palette (`Ctrl+Shift+P`) and search for **Create Project Using Folder Structure**. |
84 | | -2. Enter the target directory path where the structure should be created. |
85 | | -3. Choose the input format (`JSON` or `Plain Text`). |
86 | | -4. Provide the folder structure input (e.g., from **Copy Folder Structure**) in the UI editor and click **Submit**. |
87 | | - |
88 | | -### Copy File Name: |
89 | | -1. **Right-click a file** in **Explorer** and select **Copy File Name**. |
90 | | -2. Alternatively, open the **Command Palette** (`Ctrl+Shift+P`) and search for **Copy File Name**. |
91 | | - |
92 | | -## Settings: |
93 | | -- **outputFormat**: Choose between: |
94 | | - - `JSON Format` |
95 | | - - `Plain Text Format` |
96 | | -- **ignorePatterns**: |
97 | | - - Add the folders you usually ignore here |
98 | | -- Modify this setting in **Settings** (`Ctrl+,`) under `folderStructure`. |
99 | | - |
100 | | -## Preview: |
101 | | - |
102 | | -### Settings: |
| 81 | +### Settings |
103 | 82 | <img src="./assets/cfs_settings.webp" alt="Settings" style="height: 250px; border: 4px solid rgba(255, 255, 255, 0.9); border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);"> |
104 | 83 |
|
105 | | -### Context Menu: |
| 84 | +### Context Menu |
106 | 85 | <img src="./assets/cfs_explorer_context.webp" alt="Explorer Context" style="height: 300px; border: 4px solid rgba(255, 255, 255, 0.9); border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);"> |
107 | 86 |
|
108 | | -### Copy File Name: |
| 87 | +### Copy File Name |
109 | 88 | <img src="./assets/copy_file_name.gif" alt="Copy File Name Example" style="height: 300px; border: 4px solid rgba(255, 255, 255, 0.9); border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);"> |
110 | 89 |
|
111 | | -### Create Folder Structure: |
| 90 | +### Create Folder Structure |
112 | 91 |
|
113 | | -##### Common Usage: |
| 92 | +#### Common Usage |
114 | 93 | <img src="./assets/common_usage.gif" alt="Common Usage" style="width: 100%; border: 4px solid rgba(255, 255, 255, 0.9); border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);"> |
115 | 94 |
|
116 | | -##### With Git Ingest: |
| 95 | +#### With Git Ingest |
117 | 96 | <img src="./assets/usage_with_gitIngest.gif" alt="Usage With Git Ingest" style="width: 100%; border: 4px solid rgba(255, 255, 255, 0.9); border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);"> |
118 | 97 |
|
119 | | -### Copy Folder Structure Output: |
120 | | -- **JSON Format**: |
121 | | - ```json |
122 | | - { |
123 | | - "app": { |
124 | | - "index.js": null, |
125 | | - "hello.js": null |
126 | | - }, |
127 | | - "test": { |
128 | | - "test.ts": null |
| 98 | +## Copy Folder Structure Output |
| 99 | + |
| 100 | +- JSON (files as type strings): |
| 101 | +```json |
| 102 | +{ |
| 103 | + "app": { |
| 104 | + "api": { |
| 105 | + "analyze-typography": { |
| 106 | + "route": "ts" |
129 | 107 | } |
130 | | - } |
131 | | - ``` |
132 | | -- **Plain Text Format** (GitIgnest-style, LLM-friendly): |
133 | | - ``` |
134 | | - Directory structure: |
135 | | - └── project/ |
136 | | - ├── app/ |
137 | | - │ ├── index.js |
138 | | - │ └── hello.js |
139 | | - └── test/ |
140 | | - └── test.ts |
141 | | - ``` |
142 | | - |
143 | | -## How It Works: |
144 | | -### Copy Folder Structure: |
145 | | -1. Scans the folder structure, respecting `.gitignore` files. |
146 | | -2. Excludes files like `node_modules` and hidden files by default. |
147 | | -3. Copies the structure to the clipboard in the selected format: |
148 | | - - JSON: Standard hierarchical object representation |
149 | | - - Plain Text: GitIgnest-style format that's easily readable by both humans and LLMs |
150 | | - |
151 | | -### Create Folder Structure: |
152 | | -1. Reads user input from the provided webview. |
153 | | -2. Validates and parses the input (`JSON` or `Plain Text`). |
154 | | -3. Generates folders and files in the specified target directory. |
155 | | - |
156 | | -### Copy File Name: |
157 | | -1. Right-click a file in the **Explorer**. |
158 | | -2. Copies the file name to the clipboard. |
159 | | -3. Supports only **local files** and provides feedback on success or error (e.g., file inaccessible, permission denied). |
160 | | - |
161 | | -## Troubleshooting: |
162 | | -- **No Option in Context Menu**: Reload VS Code (`Ctrl+Shift+P` → `Reload Window`). |
163 | | -- **Clipboard Not Working**: Check system permissions. |
164 | | -- **Input Error (Create)**: Ensure the input follows the required JSON or Plain Text format. |
165 | | -- **Copy File Name Not Working**: Ensure a valid, accessible file is selected. |
166 | | - |
167 | | -## License: |
168 | | -This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details. |
169 | | - |
170 | | -## Contact: |
171 | | -For questions or feedback, open an issue on the [GitHub repository](https://github.com/ShreyPurohit/copy-folder-structure-vscode/issues). |
| 108 | + }, |
| 109 | + "favicon": "ico", |
| 110 | + "globals": "css", |
| 111 | + "layout": "tsx", |
| 112 | + "page": "tsx" |
| 113 | + } |
| 114 | +} |
| 115 | +``` |
| 116 | + |
| 117 | +- Plain Text (GitIngest-style, human-friendly): |
| 118 | +``` |
| 119 | +Directory structure: |
| 120 | +└── app/ |
| 121 | + ├── api/ |
| 122 | + │ └── analyze-typography/ |
| 123 | + │ └── route.ts |
| 124 | + ├── favicon.ico |
| 125 | + ├── globals.css |
| 126 | + ├── layout.tsx |
| 127 | + └── page.tsx |
| 128 | +``` |
| 129 | + |
| 130 | +Plain Text rules: |
| 131 | +- First line is ignored as a header (may contain any text) |
| 132 | +- Every line must use connectors (├── or └──; ASCII |-- or `-- also supported) |
| 133 | +- Exactly one root directory (level 0) and it must end with `/` |
| 134 | +- Indentation must increase by exactly one level |
| 135 | +- The UI shows invalid line numbers; if invalid, Create asks for confirmation before proceeding |
| 136 | + |
| 137 | +## How It Works |
| 138 | +### Copy Folder Structure |
| 139 | +1. Scans the folder while respecting .gitignore |
| 140 | +2. Excludes node_modules and hidden files by default |
| 141 | +3. Copies in the selected format: |
| 142 | + - JSON: hierarchical object; files are type strings (e.g., "index": "ts") |
| 143 | + - Plain Text: GitIngest-style tree |
| 144 | + |
| 145 | +### Create Folder Structure |
| 146 | +1. Reads input from the webview |
| 147 | +2. Validates and parses (JSON or Plain Text) |
| 148 | +3. Prompts to Replace/Skip if target items exist; Replace sends to Trash |
| 149 | +4. Generates folders and files (no overwrite by default) |
| 150 | + |
| 151 | +### Copy File Name |
| 152 | +1. Right-click a file in Explorer |
| 153 | +2. Copies the file name to clipboard |
| 154 | + |
| 155 | +## Troubleshooting |
| 156 | +- No Option in Context Menu: Reload VS Code (Ctrl+Shift+P → Reload Window) |
| 157 | +- Clipboard Not Working: Check system permissions |
| 158 | +- Input Error (Create): Ensure input follows JSON or Plain Text format |
| 159 | +- Copy File Name Not Working: Ensure a valid local file is selected |
| 160 | + |
| 161 | +## License |
| 162 | +MIT — see [LICENSE](./LICENSE) |
| 163 | + |
| 164 | +## Contact |
| 165 | +Open an issue on the [GitHub repository](https://github.com/ShreyPurohit/folder-structure-pro-vscode/issues) |
| 166 | + |
0 commit comments