the nobvisual
package is made to help the understanding of deeply nested structure. Here is a short version of the documentation
NOB VISUAL
Visualization of nested objects. The main output is a circular packing in Tkinter with an “hover interaction”. By hovering over the circles, the user can peek at the content.
Example of nobvisual on a folder structure. Three subfolders show a similar content. Yellow circles are binary files, blue are ASCII files.
This last example is for a nested object build on a folder structure, but nob visual output can be run on various nested objects, particularly or JSON or YAML contents.
See the full online documentation on ReadTheDocs.
Installation
Installation using Pypi:
> pip install nobvisual
Usage
Use the CLI for a basic terminal usage.
--------------- NOB VISUAL --------------------
You are now using the Command line interface of Nob Visual a Python3
helper to explore Nested Objects, created at CERFACS (https://cerfacs.fr).
This package is mean to be used as a dependency of other packages, to
provide a tkinker canvas rendering the nested structure of nesteds
objects.
This is a python package currently installed in your python environement.
Options:
--help Show this message and exit.
Commands:
cmpfile Compare the content of two serialization files.
tree Show current wkdir visually.
treefile Show the content of a serialization file.
Content
Folder visualization
The command >nobvisual tree
is equivalent to the tree
command, but visually.
It gives the following output:
The size of each circle at the same level is proportional to the log10 size of each objects.
The CLI trigger the function nobvisual.visual_tree(wkdir)
.
Serialization file visualization
The command >nobvisual treefile
shows the content of a serialization file.
Supported formats are :
- YAML
- JSON
It gives the following output:
Colors are illustrating the type of record found at the end of each branch.
The size of each node is proportional to the number records depending of the nodes.
The command calls the function nobvisual.visual_treefile(path)
.
Serialization file comparison
The command >nobvisual cmpfile
compares the content of two serialization file.
Supported formats are the same as before
It gives the following output:
Colors help to understand what is only in the left file, only on the *right$ file, or differ between the two.
The command calls the function nobvisual.visual_comparefile(path_left, path_right)
.
If you use a custom file format for your data, and you can express it in a nested object, maybe you will be interested in the next function nobvisual.nob_compare_tkinter(noba, nobb, title=None)
.
Acknowledgement
Nobvisual is a service created in the EXCELLERAT Center Of Excellence, funded by the European community.