Organize the custody of all kinds of parts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
finga c00d4a40cb Create `parts-cli` 1 year ago
migrations Add new attribute type `Date` 1 year ago
parts Create `parts-cli` 1 year ago
parts-cli Create `parts-cli` 1 year ago
parts-web Unravel library and web application 1 year ago
.env Store parts with basic attributes 1 year ago
.gitignore Store parts with basic attributes 1 year ago
Cargo.lock Create `parts-cli` 1 year ago
Cargo.toml Create `parts-cli` 1 year ago
README.md Create `parts-cli` 1 year ago
Rocket.toml Unravel library and web application 1 year ago
diesel.toml Unravel library and web application 1 year ago

README.md

Parts

Organize the custody of all kinds of parts.

Building And Installing Parts

In order to build Parts the Rust toolchain and the diesel_cli tool are needed. This section shows the typical steps.

Install Rust

Install the Rust toolchain from rustup.rs.

Diesel Dependencies

In order for Diesel to be able to handle SQLite databases we need to install the build dependency libsqlite3-dev and then build diesel_cli.

    sudo apt install libsqlite3-dev
    cargo install diesel_cli --no-default-features --features sqlite

Database Setup

To create the database with diesel run:

    diesel migration run

Build Parts

Parts consists of the library parts, an application with a command line interface parts-cli and a web application parts-web.

To build all applications execute:

    cargo b

or to build the release versions:

    cargo b --release

(Note that cargo's release flag can always be used with build (b) or run (r).)

Only one of the two applications can be built with:

    cargo b --bin parts-cli

for the command line application, or for the web application:

    cargo b --bin parts-web

Run Parts

One of the two applications can be started with:

    cargo r --bin parts-cli

and the other with:

    cargo r --bin parts-web

Configuration

Parts currently does not support any configuration functionality on its own. What is still configurable is the location of the database in the .env file and for parts-web the Rocket.toml file can also be used to configure Rocket.

General Concepts

In this section explains the basic concepts of Parts.

Attributes

Attributes describe a possible value or property and are put together by a name and a type.

Attribute Types

Currently only basic types are implemented.

  • Boolean
  • Integer
  • Float
  • Text
  • Date

Parts

For each property which should be mapped to a part an attribute has to be created.

parts-cli

A small CLI application which covers the same features as parts-web.

parts-web

Use parts in the browser, this is a bit more straightforward than parts-cli.