IRC-SPHERE / HyperStream

HyperStream
https://irc-sphere.github.io/HyperStream/
MIT License
13 stars 5 forks source link

Format for printing plate definition #25

Closed Srceh closed 6 years ago

Srceh commented 6 years ago

According to the example in plate_manager.py, the format to read plate definitions should be:

{'H1': [(('house', '1'),)]}

that is: identifier[tag:data].

However, for the current implementation, it is: tag[identifier:data].

( in container.py ('{0}[{1}:{2}]'.format(display_value, self[nid].identifier, str(self[nid].data))))

So I just wonder if the previous one makes more sense.

For instance, for tutorial 5:

country[country_NZ:NZ] country[country_Australia:Australia]

We can change it to:

country_NZ[country:NZ] country_Australia[country:Australia]

Srceh commented 6 years ago

or [tag:data]identifier

It is just given (identifier = tag + data), I don't feel right to put identifier and data together in a [].

tdiethe commented 6 years ago

I guess you're talking about the output that is printed by a MetaDataTree object? It's worth pointing out the history here: I wanted to use a tree structure, and treelib was nearly an ideal off-the-shelf implementation, but I did find the back end printing wasn't great, so I created the MetaDataTree object which only overrides that.

That said, I actually think your way of displaying it (country_NZ[country:NZ]) totally makes sense for the displaying of the tree. In that case I'm happy for that to be changed round.

Or did you (also) mean something else?

Srceh commented 6 years ago

@tdiethe Yes, that's exactly what I am thinking. I'll do some modifications on the tree then.