<<<<<<< HEAD
BRANCH is a user module for expressing vertical / horizontal relationship between objects
inspired by directory branches, no additional libraries needed (acts only with lists)
-
you only need to download 'branch.py'. import this as an module in anywhere you want, and use with single lined code.
-
branch making is only based on the bracketed sign and the sequence you write.
-
[m] is for the top level titles, in this example, are 'clothes', 'coffee', 'Python'.
-
[s] is sub-level of [m], [ss] is sub-level of [s], continously, [sss] is sub-level of [ss]..
-
the shape of the branch will be automatically determined
< Input >
string = '[m] clothes [s] shirts [s] pants [ss] denim [sss] tapered [s] accessories [m] coffee [s] espresso [s] latte [m] Python [s] branch [ss] init_theme'
< Result >
- Default -
.
├─clothes
│ ├─shirts
│ ├─pants
│ │ └─denim
│ │ └─tapered
│ └─accessories
│
├─coffee
│ ├─espresso
│ └─latte
│
└─Python
└─branch
└─init_theme
< Themes >
- Larva race theme - - Korean -
Larva race!
.
...෴ ㅏㅡclothes
...෴ ㅣ ㅏㅡshirts
...෴ ㅣ ㅏㅡpants
...෴ ㅣ ㅣ ㄴㅡdenim
...෴ ㅣ ㅣ ㄴㅡtapered
...෴ ㅣ ㄴㅡaccessories
ㅣ
...෴ ㅏㅡcoffee
...෴ ㅣ ㅏㅡespresso
...෴ ㅣ ㄴㅡlatte
ㅣ
...෴ ㄴㅡPython
...෴ ㄴㅡbranch
...෴ ㄴㅡinit_theme
import sys
sys.path.append(*location(dir) of branch.py*)
import branch as brn
from imp import reload
reload(brn)
import sys
sys.path.append(%%your branch location%%)
import branch as brn
string = '[m] clothes [s] shirts [s] pants [ss] denim [sss] tapered [s] accessories \
[m] coffee [s] espresso [s] latte \
[m] Python [s] branch [ss] init_theme'
default = brn.branch(string)
theme_larva = brn.branch_theme('larva', string)
theme_korean = brn.branch_theme('theme_korean', string)
*you can also make your own theme ! define a new theme as a funtion, declare new 'top, bar, empty, middle, end, tip' variables with utf-8 characters, and try ur own theme by using 'branch_theme('your_theme', string)' !
=======
BRANCH is a user module for expressing vertical / horizontal relationship between objects
inspired by directory branches, no additional libraries needed (acts only with lists)
-
you only need to download 'branch.py'. import this as an module in anywhere you want, and use with single lined code.
-
branch making is only based on the bracketed sign and the sequence you write.
-
[m] is for the top level titles, in this example, are 'clothes', 'coffee', 'Python'.
-
[s] is sub-level of [m], [ss] is sub-level of [s], continously, [sss] is sub-level of [ss]..
-
the shape of the branch will be automatically determined
< Input >
string = '[m] clothes [s] shirts [s] pants [ss] denim [sss] tapered [s] accessories [m] coffee [s] espresso [s] latte [m] Python [s] branch [ss] init_theme'
< Result >
- Default -
.
├─clothes
│ ├─shirts
│ ├─pants
│ │ └─denim
│ │ └─tapered
│ └─accessories
│
├─coffee
│ ├─espresso
│ └─latte
│
└─Python
└─branch
└─init_theme
< Themes >
- Larva race theme - - Korean -
Larva race!
.
...෴ ㅏㅡclothes
...෴ ㅣ ㅏㅡshirts
...෴ ㅣ ㅏㅡpants
...෴ ㅣ ㅣ ㄴㅡdenim
...෴ ㅣ ㅣ ㄴㅡtapered
...෴ ㅣ ㄴㅡaccessories
ㅣ
...෴ ㅏㅡcoffee
...෴ ㅣ ㅏㅡespresso
...෴ ㅣ ㄴㅡlatte
ㅣ
...෴ ㄴㅡPython
...෴ ㄴㅡbranch
...෴ ㄴㅡinit_theme
import sys
sys.path.append(%%location(dir) of branch.py%%)
import branch as brn
from imp import reload
reload(brn)
import sys
sys.path.append(%%location(dir) of branch.py%%)
import branch as brn
string = '[m] clothes [s] shirts [s] pants [ss] denim [sss] tapered [s] accessories \
[m] coffee [s] espresso [s] latte \
[m] Python [s] branch [ss] init_theme'
default = brn.branch(string)
theme_larva = brn.branch_theme('larva', string)
theme_korean = brn.branch_theme('theme_korean', string)
*you can also make your own theme by defining a new 'theme function'. In the function, declare new 'top, bar, empty, middle, end, tip' variables with utf-8 characters, and try the custom theme by using 'themed_str = brn.branch_theme('your_theme', string)'
05d49652df26e27f1087868f4c40d6a02af1ba04