Code Monkey home page Code Monkey logo

directory-architecture's Introduction

Directory Architecture

Build Status

Works with Python 3.

When I make tutorials or give reports I like displaying all the files and directories of a project like a cascade. These can be cumbersome to type by hand and so I wrote a small script to generate these automatically, a bit like tree.

Usage

Basic

python probe.py example/
example
├───┐ static
│   ├───┐ js
│   │   ├─── Leaflet.vector-markers.min.js
│   │   └─── Leaflet.vector-markers.js
│   ├───┐ data
│   │   └─── Toulouse.csv
│   └───┐ css
│       ├─── Leaflet.vector-markers.css
│       └─── Leaflet.vector-markers.css.map
├───┐ lib
│   ├─── __init__.py
│   └─── JCDecaux.py
├───┐ templates
│   └─── index.html
├─── serve.py
└─── update.py

By doing this a markdown file called architecture.md is saved into the directory that is probed. It ressembles the example above. You can use both absolute and relative paths. You don't have to worry about the / at the end.

Ignoring files with certain extensions

python probe.py example/ -i js css
example
├───┐ static
│   ├───┐ js
│   ├───┐ data
│   │   └─── Toulouse.csv
│   └───┐ css
│       └─── Leaflet.vector-markers.css.map
├───┐ lib
│   ├─── __init__.py
│   └─── JCDecaux.py
├───┐ templates
│   └─── index.html
├─── serve.py
├─── architecture.md
└─── update.py

Probing to a certain level

python probe.py example/ -d 0
example
├───┐ static
├───┐ lib
├───┐ templates
├─── serve.py
├─── architecture.md
└─── update.py

To do

  • Add filter
  • Add prety graphics

Contact

If you want to implement a new feature please feel free to send me a mail ([email protected]) and I'll be glad to discuss/help.

Reddit thread

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.