From 9fe8a8d7a25dfa6a42df34bebf3ed0f52b74c3f6 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Mon, 12 Sep 2022 20:45:37 -0800 Subject: [PATCH] add CSV import documentation --- docs/docs/assets/stylesheets/extras.css | 2 +- docs/docs/import-csv.md | 35 ++++++++++++++++++------- docs/mkdocs.yml | 14 ++++++++++ 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/docs/docs/assets/stylesheets/extras.css b/docs/docs/assets/stylesheets/extras.css index 7738282..72ae471 100644 --- a/docs/docs/assets/stylesheets/extras.css +++ b/docs/docs/assets/stylesheets/extras.css @@ -1,5 +1,5 @@ [data-md-color-scheme="homebox"] { - --md-primary-fg-color: #5d5656; + --md-primary-fg-color: #5b7f67; --md-primary-fg-color--light: #5b7f67; --md-primary-fg-color--dark: #90030c; } diff --git a/docs/docs/import-csv.md b/docs/docs/import-csv.md index 95b92a0..32cf208 100644 --- a/docs/docs/import-csv.md +++ b/docs/docs/import-csv.md @@ -1,28 +1,41 @@ # CSV Imports -This document outlines the CSV import feature of Homebox and how to use it. - ## Quick Start Using the CSV import is the recommended way for adding items to the database. It is always going to be the fastest way to import any large amount of items and provides the most flexibility when it comes to adding items. **Limitations** - - Currently only supports importing items + + - Currently only supports importing items, locations, and labels - Does not support attachments. Attachments must be uploaded after import +**Template** + +You can use this snippet as the headers for your CSV. Copy and paste it into your spreadsheet editor of choice and fill in the value. + +```csv +Import RefLocation Labels Quantity Name Description Insured Serial Number Model Number Manufacturer Notes Purchase From Purchased Price Purchased Time Lifetime Warranty Warranty Expires Warranty Details Sold To Sold Price Sold Time Sold Notes +``` + +!!! tip "Column Order" + Column headers are just there for reference, the important thing is that the order is correct. You can change the headers to anything you like. + + ## CSV Reference -| Column Heading | Type | Description | +| Column | Type | Description | | ----------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| ImportRef | String (100) | Future | | Location | String | This is the location of the item that will be created. These are de-duplicated and won't create another instance when reused. | -| Labels | `;` Separated String | List of labels to apply to the item seperated by a `;`, can be existing or new | +| Labels | `;` Separated String | List of labels to apply to the item separated by a `;`, can be existing or new | | Quantity | Integer | The quantity of items to create | | Name | String | Name of the item | | Description | String | Description of the item | +| Insured | Boolean | Whether or not the item is insured | | Serial Number | String | Serial number of the item | | Model Number | String | Model of the item | | Manufacturer | String | Manufacturer of the item | -| Notes | String | General notes about the product | +| Notes | String (1000) | General notes about the product | | Purchase From | String | Name of the place the item was purchased from | | Purchase Price | Float64 | | | Purchase At | Date | Date the item was purchased | @@ -32,10 +45,12 @@ Using the CSV import is the recommended way for adding items to the database. It | Sold To | String | Name of the person the item was sold to | | Sold At | Date | Date the item was sold | | Sold Price | Float64 | | +| Sold Notes | String (1000) | | **Type Key** -| Type | Format | -| ------ | ------------------ | -| String | Max 255 Characters | -| Date | YYYY-MM-DD | +| Type | Format | +| ------- | --------------------------------------------------- | +| String | Max 255 Characters unless otherwise specified | +| Date | YYYY-MM-DD | +| Boolean | true or false, yes or no, 1 or 0 - case insensitive | diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index d26e480..091f925 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -27,3 +27,17 @@ theme: extra_css: - assets/stylesheets/extras.css + +markdown_extensions: + - pymdownx.emoji: + emoji_index: !!python/name:materialx.emoji.twemoji + emoji_generator: !!python/name:materialx.emoji.to_svg + - def_list + - pymdownx.highlight + - pymdownx.superfences + - pymdownx.tasklist: + custom_checkbox: true + - admonition + - attr_list + - pymdownx.tabbed + - pymdownx.superfences