Skip to content

Unleash the ultimate power to peer into the very soul of your directories! This script meticulously maps your folders into glorious JSON, even respecting your most secretive .pyignore wishes. Prepare for data divination!

License

Notifications You must be signed in to change notification settings

ClaireYurev/py-spyglass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🌟 PySpyglass: Prepare to be Illuminated! 🌟

✨ Behold! The Atomic Directory Decoder Ring ✨

Are you tired of blindly stumbling through the labyrinthine corridors of your project's file system? Do you yearn for a crystal-clear, JSON-ified vision of your directory's destiny? Then gaze no further, intrepid explorer, for PySpyglass has arrived to banish the darkness and bathe your folders in the radiant light of structured data!

This magnificent Python script doesn't just list your files and folders – oh no, it orchestrates a grand symphony of directory dissection! It fearlessly dives deep into the hierarchical heart of your project, emerging with a beautifully crafted JSON blueprint, ready for your analytical or programmatic whims.

🔥 Key Features That Will Melt Your Mind 🔥

  • The All-Seeing Eye of File Organization: Scans your directories with the precision of a laser-guided unicorn, revealing every nook and cranny.
  • .pyignore Whisperer: Respects your hidden secrets like a seasoned spy, effortlessly skipping the files and folders you deem unworthy of JSONification (as defined in your .pyignore file).
  • Recursive Revelations: Plunges fearlessly into subdirectories, unearthing deeply buried structures with unwavering determination. No folder is too far, no file too hidden!
  • JSON Jukebox: Spits out a meticulously formatted JSON representation, ready to be consumed by your favorite data wrangling tools or displayed in a dazzling, data-driven dashboard.
  • Real-Time Reporting (Sort Of!): Gives you tantalizing glimpses into its progress (if you uncomment some lines!), making you feel like you're right there in the directory-diving action!

🛠️ Installation: Summon the Script! 🛠️

Fear not, for summoning this power is as simple as chanting these magical incantations (commands):

git clone https://github.com/ClaireYurev/py-spyglass

Then:

cd py-spyglass  # Or whatever glorious name you bestow upon the folder

(No actual installation needed, it's pure Python magic!)

Use code with caution. Markdown 🚀 Usage: Unleash the Power! 🚀 Prepare for the revelation! Navigate to the directory you wish to explore (the one containing the script or where you want the output to be saved) and simply invoke the incantation:

py-spyglass.py

Witness as PySpyglass springs into action, diligently analyzing the surrounding landscape! A .pyignore file in the target directory? Fear not, it will be heeded! A majestic JSON file, named with the current date and time, will appear, containing the illuminated structure of your folders.

For example, if you run it today, the output might be something like: directory-structure-2023-10-27-14-30-00.txt (or whatever time it happens to be when you unleash the magic!).

🤫 The Power of the .pyignore Whisper 🤫 Want to keep certain files or folders shrouded in mystery? Simply create a .pyignore file in the target directory. List the patterns you wish to exclude, one per line. Think of it as your digital bouncer, deciding who gets past the velvet rope into the JSON party!

Lines starting with # are treated as whispers (comments) and ignored.

folder_to_ignore will magically vanish.

secret_file.txt will remain unseen.

root_folder_to_ignore will exclude that specific folder at the root level of the scan. (No Slashes Please)

*.log will cloak all log files from view.

🎨 Customization: Bend the Script to Your Will! 🎨 Currently, the output filename is automatically generated. Feel free to tweak the script if you desire a different naming convention. Perhaps you want to add more emojis? The power is yours!

🙌 Contributing: Join the League of Illuminators! 🙌 Have you discovered an ancient incantation to make PySpyglass even more insightful? Do you have ideas for dazzling new features that will make the file system tremble with awe? Fork this repository, weave your magical code, and submit a pull request! Let us build the ultimate directory-decoding artifact together!

📜 License: The Gift of Openness! 📜 This magnificent creation is offered under the permissive MIT License. Feel free to use it, share it, modify it, and generally spread the joy of structured directory knowledge!

🎉 The Grand Finale! 🎉 So, what are you waiting for? Dive in, unleash PySpyglass, and finally understand the intricate dance of your files and folders! Go forth and illuminate!

About

Unleash the ultimate power to peer into the very soul of your directories! This script meticulously maps your folders into glorious JSON, even respecting your most secretive .pyignore wishes. Prepare for data divination!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages