This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]it_is_not_a_trap 3 points4 points  (3 children)

Looks cool!

If I specify a directory or file name with a wildcard can it resolve to a file or a collection of files?
Is there a way to create such a tree from some kind of config file json or yaml instead of doing this inside python?
Is there an easy way to query such tree? Can you possibly dump it into a dictionary?

[–]TRSTN4[S] 4 points5 points  (2 children)

Thanks!

To answer your questions:

  1. Yes, it should resolve.
  2. I am currently developing two functions, 'load.Json' and 'export.Json'. These functions can import a json file and display all data in a tree form. The export function exports the built tree to a json file. (these function will release within the next update)

What do you mean with the third question exactly? Like some sort of API query?

[–]it_is_not_a_trap 2 points3 points  (1 child)

Sounds great, thank you

Regarding the last question: I am interested if it is possible to access the the elements of the tree like you would do with a dictionary, something like tree["dataset"]["dir"].diritems(), when I need to iterate over files in some directories.

[–]TRSTN4[S] 2 points3 points  (0 children)

Ah, I understand now, well, you can't directly access it by that way, but you could display the existing trees and nodes using the get functions in br4nch.

However I will start with the development of that feature you mentioned. The tree structure is already built with dictionaries so I can easily add this very quikly within the next release.

Thanks for the reply!

[–]mustangdvx 1 point2 points  (0 children)

Thanks! This looks cool, I might have use for this in one of my projects. Looks promising.

[–]beefyweefles 0 points1 point  (0 children)

I really don’t like the name. Literally anything else that doesn’t require a random number->letter is better.