About the Parts Lister
This website is a front-end for viewing Bill of Material information on the RepRap project in an easy to manage, centralized, and database driven fashion. The master data is stored in Google Docs to make data entry easy, to take advantage of their excellent UI, as well as author controls. The code and the data are all licensed under the GPL.
Get the data!
- Access the Google Spreadsheet
- Access the imported MySQL data
- View the Subversion repository
- You can also link to a unique part like this: 'http://parts.reprap.org/uniquepart/My Part Name'
The master version of the data is stored in a Google Spreadsheet. The reason is that Google Spreadsheets provides us with a great interface, easy data export, and solid backups / reliability. We use their spreadsheet UI to format the data, their CSV publishing option to programmatically access the data, and their always-on nature as being Google for reliability.
In order to be useful in a web context, the data stored on Google must be parsed into something the machine can handle and manipulate. We have an import script that runs, and imports the spreadsheet into a MySQL database. For this to work successfully, the data must follow a specific format. That is detailed below.
The suppliers list simply contains a list of all the suppliers that are referenced later on in the Bill of Materials. It has a relatively simple format. The first two lines are for humans, and are ignored. Following that, each line represents a unique supplier. Here are the definitions for each field:
|Name||A free-form name field for the supplier. It should be unique to that supplier.|
|Prefix||This is used when specifying supplied parts for each unique part. It should be unique to each supplier, short, and something easy to remember.|
|Website||This is the url to the main|
|Description||Free form text description of the supplier. The more informative, the better.|
|Countries||A comma separated list of countries that the supplier supplies for. Not currently used.|
|Buy Link||A string used to generate the URL where a user can buy a part. When the URL is generated, two strings are replaced with variables: %%PARTID%% is replaced with the part number, and %%QUANTITY%% is replaced with the quantity to purchase.|
Unique Parts List
The unique parts list contains a list of each type of part used in the project. Later, in the raw part lists, quantities and associations for the components of each module are listed. The unique part list holds descriptions, urls, units, suppliers, and other information unique to a part. The list is grouped by type. The first two lines are discarded and for humans only. There are also two lines between each group of parts that are discarded as well. The rest of the lines each represent a unique part. Here are the definitions for each field:
|Name||A free-form name field for the part. It should be unique to other parts with the same type. Also, when parts are specified elsewhere, they are matched exactly on the name. If you change the name here, make sure you change all the names that reference it to the new name. Otherwise things will break.|
|Type||This is the type of the part. Generally you should put a part into an existing type, but if it doesn't fit, then create a new part type. Certain types (module, assembly, rods, etc.) are used for special things by the software.|
|Description||Free for text description of the part. The more informative, the better.|
|URL||A URL that links to more detailed information on the part.|
|Unit||What units the part is measured in (g, mm, etc.)|
Any field after 'Unit' is a supplier field. You may specify any number of suppliers. In each thing, you are specifying 3 different things:
Supplier - the prefix of the supplier
Part # - the part number or id that is used by the supplier. this is used in URL generation and other various things
Quantity - this is an optional field if the item contains multiple units of the part. for example a pack of bolts.
Single Quantity Example: RRRF:12
Module Raw Parts Lists
Now that suppliers and parts have been specified, the rest of the sheets fall under the 'raw parts' category. Basically, every module is broken down into its component parts, part types, and quantities. You can also specify a part id that is not used and is for easy reference only. Blank lines are ignored. Here are the definitions for each field:
|Part Id||Short text that identifies the part. Not used for anything.|
|Name||This name uniquely identifies the unique part required. It is important to get the name correct (ie. use the exact same name as the unique part). Also, certain types use a type of formatting in order to let you specify the length. Rods and Studding are two examples of this. The format is like this:
Studding: M5 x 300mm (meaning a M5 stud, 300mm length)
Rods: 8mm x 340mm (meaning a 8mm diameter rod, 340mm length)
Belts: MXL x 950mm (meaning MXL size, 950mm length).
As long as the name starts with that format, you can add text in afterwards. For example:
M8 x 40 (X idler) will parse correctly.
|Quantity||The quantity field determines how many items are required. You should input this in the number of units the part is measured in. If no units are specified, enter the number of items required.|
The type has to match the type specified for the part in the unique part list. Also, there are two special types: module and assembly.
The module type references another module list in the system. When a part list is generated for the parent module, it can also load the part list from the child module specified.
The assembly type allows you to specify sub-assemblies in the current module. All the items below the assembly will have their quantity multiplied by the assembly quantity. An assembly ends when a blank line is encountered.