Subject:
|
Standardized Inventory File Format?
|
Newsgroups:
|
lugnet.db.inv
|
Date:
|
Sat, 18 Sep 1999 17:20:12 GMT
|
Viewed:
|
629 times
|
| |
| |
Hello,
I originally posted this idea in lugnet.cad.dev, and Jacob Sparre Andersen
suggested I consult with the patrons of this group.
For the Lego CAD program I'm developing, I got the idea for allowing users
to load a set inventory file if they wanted to build a model using only the
parts from a particular set. Then the parts from that set would appear in a
special part bin window. As the user dragged parts out of this bin to build
their model, the bin would become emptier, thus reducing the time required
to find the needed parts.
I've noticed that most people format their inventories slightly differently.
So...I'd like to propose the development of some standard set inventory file
format that everyone could agree on, and would be easy to parse. I'm sure
other programs could also benefit from this format (inventory tracking
programs, perhaps).
I think it should be text-based like the DAT file format.
Just one of many possibilities:
A line beginning with '0' would be a comment; for any other line, the first
field would be the quantity of that part, the second field would be the
DAT file name, the third field would be a color code (or color name). The
fourth field would be an optional human-readable description that would
usually be ignored by the parsers.
Obviously we'd need to agree on a delimiter between fields. Spaces can be
used, but if the color is specified by name, then it couldn't have spaces in
it (e.g. dark gray).
Comments?
|
|
Message has 3 Replies: | | Re: Standardized Inventory File Format?
|
| (...) I solve that problem by using *3 or more spaces* as the delimiter. If you want to delimit the next field, you must always use at least 3 spaces in a row. This allows things like color names to include spaces and allows for a little human error (...) (25 years ago, 22-Sep-99, to lugnet.db.inv)
| | | Re: Standardized Inventory File Format?
|
| (...) Why not adopt XML? Watching this thread, I have seen discussions about parsing such inventories in different programming languages and about the fact that it should be readable by human beings. XML is designed exactly for that. There are a (...) (25 years ago, 3-Oct-99, to lugnet.db.inv)
| | | Re: Standardized Inventory File Format?
|
| Hi, I'm new here but I live in database land. The work already put into the CAD program inventories should not be underestimated. For your text file format, use columns, use tabs or commas for delimiters. People should be able and expected to enter (...) (25 years ago, 14-Oct-99, to lugnet.db.inv)
|
25 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|