Skip to main content

GUI for flinventory for viewing and editing inventory

Project description

flinventory GUI

A GUI for the flinventory project/ data format.

Including a fuzzy search that prefers more exact matches and includes all alternative names and descriptions of things.

Search screenshot

More screenshots for the edit mode can be found in the very basic docs.

Run

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

Getting prerequisites:

  • cd flinventory-gui
    nix-shell
    
  • conda (not sure if that still works)
    sudo apt install pdf2svg texlive-full
    # or
    sudo dnf install texlive-scheme-full pdf2svg
    # for actually needed LaTeX packages see shell.nix
    # or whatever package manager you use
    conda create -f environment.yml
    conda activate bikeparts-gui
    pip install flinventory-gui
    
  • or virtualenv:
    sudo apt install pdf2svg texlive-full
    # or
    sudo dnf install texlive-scheme-full pdf2svg
    # for actually needed LaTeX packages see shell.nix
    # or whatever package manager you use
    python -m venv .venv
    source .venv/bin/activate
    pip install -r flinventory-gui
    

Getting data: git clone -b harzgerode-main https://codeberg.org/flukx/flings.git

Run it:

flinventory-webgui flings

It should open a browser with the search page. Otherwise, open 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.

Rebuild during development

In the nix-shell, you can replace the flinventory-gui with the current version if you've changed something:

pdm build
pip install dist/flinventory_gui-...py3-none-any.whl --upgrade
# run again
flinventory-webgui flings

or just (and get changes pick-uped immediately)

python flinventory_gui/search.py flings

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 Fedora KDE I opened "Firewall" and in the Configuration "Runtime" in Tab "Zones" in zone "public" in tab "Ports" added 11111 for protocol tcp.

In NixOS KDE I typed (for temporary access):

sudo iptables -A INPUT -p tcp --dport 11111 -j ACCEPT
sudo systemctl reload firewall

For permanent usage, use the configuration.nix with the line networking.firewall.allowedTCPPorts = [ 11111 ];.

Data

The data directory is given as a mandatory command-line argument. Most of the content and structure of this data directory is described in the documentation of flinventory. Optional data that is not used by flinventory itself and therefore not described there, is:

  • a directory website_resources
    • with a favicon named favicon.ico
    • and a directory translatio with translation files for the terms that are defined in the inventory and appear in the GUI, namely the level names in the schema. The file structure is that for the package i18nice, that is:
      • thing_editor.de.yml (and with en or other languages):
        de:
          room: Raum
          from-left: von links
          level: Regalbrett
          workshop: Werkstatt
        

Development setup

with nix-shell

Run nix-shell and a nix-shell with the necessary python packages is created based on the shell.nix file. Note that NiceGUI is unfortunately not available via nix-packages and therefore installed in a virtual environment with pip. This virtual environment has the advantage that you can use it as a local interpreter for your IDE. At least in pycharm it can be used.

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 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flinventory_gui-0.10.3.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flinventory_gui-0.10.3-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file flinventory_gui-0.10.3.tar.gz.

File metadata

  • Download URL: flinventory_gui-0.10.3.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.24.2 CPython/3.13.4 Linux/6.12.35

File hashes

Hashes for flinventory_gui-0.10.3.tar.gz
Algorithm Hash digest
SHA256 d79e6ac4ddeb745654ad20888f8bdeca9dd93612440dd0f4b2c3ba101dac3dd8
MD5 51552244497eda5dbbdc9e3320cf9bb3
BLAKE2b-256 b86d4349518d4da80ee98782d24d5d196cc69e39d4f7b06d1302d79e5e535178

See more details on using hashes here.

File details

Details for the file flinventory_gui-0.10.3-py3-none-any.whl.

File metadata

  • Download URL: flinventory_gui-0.10.3-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.24.2 CPython/3.13.4 Linux/6.12.35

File hashes

Hashes for flinventory_gui-0.10.3-py3-none-any.whl
Algorithm Hash digest
SHA256 12057dd2b1af52650e6351ae8dea5abd98aa4f8b1672f0944af09c999e09800a
MD5 1d03c07a3c7c314e184c1762d04f6a9a
BLAKE2b-256 7e44d14dcc31fb881f10a85b7f138feb30ba053ab46a58fe3ed204ea735d7364

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page