ujjawalpoudel / folder-structure-generator

Folder Structure Generator is a Python package that simplifies the generation of project directory structures. It provides an easy way to create a predefined directory tree that can be copied and pasted into project documentation or README files.
Apache License 2.0
5 stars 0 forks source link

Ignoring sub-folders #1

Open Dian-New-Dev opened 2 weeks ago

Dian-New-Dev commented 2 weeks ago

Hi, beginner here and this is my first issue ever so I apologize if I'm doing this wrong.

I loved your tool, but I got a little confused on how to tell it to ignore sub-folders. Like, what if I want to ignore the node_modules in the server folder, but not the node_modules in the client module?

Just a minor issue. The script worked wonders, thank you!

ujjawalpoudel commented 2 weeks ago

Hi @Dian-New-Dev,

Thank you for bringing up this issue, and welcome to GitHub!

Initially, the script was designed to handle ignores at the main folder level, so sub-folder ignores like the one you mentioned weren't accounted for. Thanks to your feedback, I've updated the code to allow specifying both main and sub-folder directories in the folders_to_ignore variable.

To ignore specific sub-folders, such as server/node_modules, you can now pass the path from the main directory (e.g., "server/node_modules"). This update should provide more flexibility in managing folder ignores.

I've committed the changes here: Commit 5292207. Feel free to check it out, and let me know if you have any further questions!