Subject:
|
Re: Standardized Inventory File Format?
|
Newsgroups:
|
lugnet.db.inv
|
Date:
|
Sun, 3 Oct 1999 19:28:30 GMT
|
Viewed:
|
692 times
|
| |
| |
In lugnet.db.inv, Gary Williams writes:
> 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?
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 number of free XML-parsers
available for different programming languages (or we'll just write one).
Check out http://www.w3.org/XML/.
Suggestion:
<?xml version="1.0"?>
<!DOCTYPE LEGO INVENTORY "inventory.dtd">
<INVENTORY>
<PART NAME="1221" COUNT="3" COLOR="red">
<!-- This is a comment -->
...
</INVENTORY>
|
|
Message has 1 Reply:
Message is in Reply To:
| | Standardized Inventory File Format?
|
| 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 (...) (25 years ago, 18-Sep-99, to lugnet.db.inv)
|
25 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|