-
-
Notifications
You must be signed in to change notification settings - Fork 251
Added documentation for the external label service feature. #1018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
danhoban
wants to merge
2
commits into
sysadminsmedia:main
Choose a base branch
from
danhoban:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # External Label Service | ||
|
|
||
| You can use an external web service to generate asset and location labels in homebox. This is useful if you have custom requirements for your labels and are happy to spin up a web service that can accept incoming requests and return an image file for homebox to use. | ||
|
|
||
| ::: info "Note" | ||
|
|
||
| This service is not called to generate sheets of labels accessed via the label generator function. It is used when creating labels from an item or location. | ||
|
|
||
| ::: | ||
|
|
||
| ## Configuration | ||
|
|
||
| The extenal service is configured using the `HBOX_LABEL_MAKER_LABEL_SERVICE_URL` enviroment variable. | ||
|
|
||
| ## Request | ||
|
|
||
| The service is called using an **HTTP `GET` request**. All parameters are passed as part of the **query string**. | ||
|
|
||
| #### Headers | ||
|
|
||
| - **User-Agent**: Homebox-LabelMaker/1.0 | ||
|
|
||
| - **Accept**: image/* | ||
|
|
||
| #### Parameters | ||
|
|
||
| | Parameter | Type | Description | Value | | ||
| | --------------------- | ------ | -------------------------------------------- | --------------------------------------------------------------------- | | ||
| | AdditionalInformation | string | Extra free text to include on the label. | `HBOX_LABEL_MAKER_ADDITIONAL_INFORMATION` | | ||
| | ComponentPadding | int | Padding around label components (pixels). | `HBOX_LABEL_MAKER_PADDING` | | ||
| | DescriptionFontSize | float | Font size for the description text. | | | ||
| | DescriptionText | string | Descriptive text, can be multi-line. | Item name or "Homebox Location" | | ||
| | Dpi | float | Rendering resolution (dots per inch). | | | ||
| | DynamicLength | bool | Whether the label length should auto-adjust. | `HBOX_LABEL_MAKER_DYNAMIC_LENGTH` | | ||
| | Height | int | Label height in pixels. | `HBOX_LABEL_MAKER_HEIGHT` | | ||
| | Margin | int | Margin around the label in pixels. | `HBOX_LABEL_MAKER_MARGIN` | | ||
| | QrSize | int | Size of the QR code element in pixels. | | | ||
| | TitleFontSize | float | Font size for the title text. | | | ||
| | TitleText | string | Main label title (e.g. product code). | Asset ID or Location Name | | ||
| | URL | string | URL to be encoded into the QR code. | Generated based on the configured homebox URL and Asset / Location ID | | ||
| | Width | int | Label width in pixels. | `HBOX_LABEL_MAKER_WIDTH` | | ||
|
|
||
| ## Response | ||
|
|
||
| The external service should respond with the following specifications; | ||
|
|
||
| - **Size:** Less than or equal to `HBOX_WEB_MAX_UPLOAD_SIZE` (Default: 10Mb) | ||
|
|
||
| - **Content-Type**: Specified in the response header should be of the type image/* | ||
|
|
||
| - **Time**: Within the time specified in `HBOX_LABEL_MAKER_LABEL_SERVICE_TIMEOUT` (Default 30s) | ||
|
|
||
|
|
||
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.