Skip to content

Commit

Permalink
docs: add instructions explaining library import
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Berezovsky committed Dec 23, 2023
1 parent 438acc6 commit 84b4853
Showing 1 changed file with 41 additions and 7 deletions.
48 changes: 41 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

![Tapen Picture](https://raw.githubusercontent.com/corvis/tapen/master/docs/assets/cover-picture.png "Tapen cover image")


<h2 align="center">Tapen</h2>

<p align="center">
Expand All @@ -18,10 +16,10 @@
</p>


**Tapen** is a tool for composing and printing labels on label printers. At the moment only Brother printers are supported.
**Tapen** is a tool for composing and printing labels on label printers. At the moment only Brother printers are
supported.
Developed and tested on linux only.


## Basic Usage

Just print a line of text covering all available height of the tape:
Expand Down Expand Up @@ -54,15 +52,51 @@ There are a couple of possible installation methods:
1. With pip: `pip install tapen`
2. Use pre-compiled binary. Just download binary from [releases page](https://github.com/corvis/tapen/releases)

## Usage guide

### Libraries

Library is a collection of templates to be used for printing. You can connect a library using `tapen import-lib`
command. The general syntax is:

```shell
tapen import-lib <library-name> <library-locator>
```

Where:

* `library-name` - name you will be using to refer to the library locally. You decide how you want to call the library,
however the name should be unique for your local installation.
* `library-locator` - locator pointing the library. It can be a path to a local directory or a URL to a remote library.
The exact syntax depends on the storage. See below for details.

There are a few library storages supported:

| Storage | Locator syntax | Description |
|-------------------|---------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| Local directory | `local:/path/to/library` | Path to a directory containing library files. |
| Github repository | `github://owner/repo[@tag-or-branch]` | Github repository containing library files, **optionaly** you can include the tag or branch name. Example: `github://JointBox/labels@master` |

Examples:

```shell
# Import library from local directory
tapen import-lib my-lib1 local:/path/to/library
# Import library from github repository
tapen import-lib my-lib2 github://JointBox/labels
tapen import-lib my-lib3 github://JointBox/labels@master
```

# Credits

* Dmitry Berezovsky (@corvis) - author and main maintainer
* Dominic Radermacher (blip@mockmoon-cybernetics.ch) - creator of libptouch, the source code of this library was used to understand the interface to Brotehr devices.
* Dominic Radermacher (blip@mockmoon-cybernetics.ch) - creator of libptouch, the source code of this library was used to
understand the interface to Brotehr devices.
* [CLI Rack](https://github.com/corvis/cli-rack)

# Disclaimer

This module is licensed under MIT. This means you are free to use it in commercial projects.

The GPLv3 license clearly explains that there is no warranty for this free software. Please see the included LICENSE file
for details.
The GPLv3 license clearly explains that there is no warranty for this free software. Please see the included LICENSE
file for details.

0 comments on commit 84b4853

Please sign in to comment.