Metadata-Version: 2.1
Name: flinventory_gui
Version: 0.1.3
Summary: GUI for flinventory for viewing and editing inventory
Author-Email: flukx <flinventory-gui-flukx@612211124.xyz>
License: GPL3
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Customer Service
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Project-URL: Homepage, https://codeberg.org/flukx/flinventory-gui
Project-URL: Issues, https://codeberg.org/flukx/flinventory-gui/issues
Requires-Python: >=3.12
Requires-Dist: nicegui>=2.12.1
Requires-Dist: flinventory>=0.4.2
Description-Content-Type: text/markdown

# flinventory GUI

![Search screenshot](docs/screenshot_search.png)

A GUI for the flinventory project/ data format.

## Run

Getting code:
`git clone https://codeberg.org/flukx/flinventory-gui.git`

Getting prerequisites:
- Getting flinventory, which is not published as a package yet:
- ```commandline
  git clone https://codeberg.org/flukx/flinventory.git
  cd flinventory
  nix-shell  # or install pdm your way
  pdm build
```
Then use the way you prefer:
- ```commandline
  conda create -f environment.yml`
  conda activate bikeparts-gui
  pip install flinventory/dist/dist/flinventory-0.1.1-py3-none-any.whl
  ```
- or virtualenv:
  ```commandline
  python -m venv .venv
  source .venv/bin/activate
  pip install -r nicegui flinventory/dist/dist/flinventory-0.1.1-py3-none-any.whl
  ```
- or nix-shell (unfortunately no working setup found. Please help!)

Getting data: `git clone -b harzgerode-main https://codeberg.org/flukx/flings.git`
Run it:
```commandline
python flinventory_gui/search.py flings
```
It should open a browser with the search page. Otherwise, open [localhost:11111](http://localhost:11111)
in your browser.

To see all options run `python flinventory_gui/search.py --help` but note that many of them are inherited
from the underlying module `flinventory` and are not used.

### Build and install with pip
Building `flinventory_gui`:
`pdm build`
and install in a venv:
  ```commandline
  python -m venv .venv
  source .venv/bin/activate
  pip install dist/....whl
  ```
But currently it is supported to actually run this installed package.

## Making website accessible in local network

It's nice to use the thing search on the computer where it is run but often it's more helpful to
use it on other mobile devices. Therefore, you can make the search page available in the local network
by opening the port (by default `11111` in the firewall.)

In KDE I opened "Firewall" and in the Configuration "Runtime" in Tab "Zones" in zone "public" in tab "Ports"
added `11111` for protocol `tcp`.

## Ideas for the future

- Somehow really make the search async. Since filtering the correct parts and displaying them
  has no waiting periods (with `await`) it cannot really be cancelled.
  - Also helpful: show only 10 best results.
- Add filter for search that shows a bike where you can click on parts. And then only parts that are
  "part_of" this are shown. When clicked on the brakes, it shows a list of brake types (sub categories)
  that you can click on again. [Interactive image](https://nicegui.io/documentation/interactive_image)
  could be helpful.
  - Make this filter keyboard accessible. Ctrl+F activates choice, then letter chooses something which is
    marked in the text on the bike picture.
- Figure out why sometimes the page reloads completely.
