- C++ 97.1%
- Makefile 2.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| create.sql | ||
| csv.cpp | ||
| csv.h | ||
| destroy.sql | ||
| item.cpp | ||
| item.h | ||
| main.cpp | ||
| Makefile | ||
| README.md | ||
| str_lib.cpp | ||
| str_lib.h | ||
| test.cpp | ||
Part Management Client (pmcli)
This tool is intendet to manage a LEGO collection from the terminal. I have different boxes and drawers and need this tool to keep track of what parts are located where.
Installation
Download the repository and run make deb. Then install the created .deb-file using apt.
Usage
Start the program by typing pmcli. Upon first usage you are prompted to enter the database
credentials. They are saved in ~/.pmcli/login.txt. Since the file is unencrypted it is not advised
to save the password.
After you etered the part you are searching for, you can navigate with the arrow-keys (or 'hjkl'), select the part with enter or start a new search by pressing escape. You can stop the program by pressing Ctrl-C and you can stop entering a new location by pressing ESC.
There are several command line options available:
--infoor-igives you information about the container usage.--updateor-ulets you update the underlying part database. Download the parts, the colors or the part and color codes as a tab-delimited file from here: https://www.bricklink.com/catalogDownload.asp After that supply the files one by one to pmcli with the-uflag:pmcli -u colors.txt.--annotateor-aannotates a Bricklink XML-partlist. It adds the storage location and if there are parts in the location (filled/empty).--extractor-etakes all parts in the provided XML-file out of the storage. If you have built a model you can then bulk-extract all used parts, so that the database remains up to date.--returnor-rputs the parts of an XML-file back into storage. It therefore is the opposite of--extract.--missingor-mcreates a new part list from an XML-file that only contains the missing parts from the part list.-ssets a storage prefix when entering part locations. This is handy when inserting a lot of part locations.
Dependencies
This project requires:
- pugixml
- pqxx
libpqxx - C++ and PostgreSQL
This program uses libpqxx version 7.10 which comes preinstalled on Debian 13. https://pqxx.org/libpqxx/ https://libpqxx.readthedocs.io/stable/
pqxx
Follow the install instructions here: https://pugixml.org/docs/manual.html#install
Download the .tar.gz folder and extract it to libs/.
Psql Docker Container
If you plan to use a psql docker container on a synology NAS running DSM 7.1 set the following environment variables:
- POSTGRES_PASSWORD
- POSTGRES_USER
- POSTGRES_DB
To keep your data in the docker container do the following:
- Click "Add Folder" and create/select a folder like
/docker/postgres/data. - Mount it to
/var/lib/postgresql/data.