Metadata-Version: 2.1
Name: dbm-systray
Version: 0.1.6
Summary: 
Author: sean
Author-email: sean.li@vectorindex.cloud
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: litecli (>=1.13.2,<2.0.0)
Requires-Dist: omegaconf (>=2.3.0,<3.0.0)
Requires-Dist: pillow (>=11.0.0,<12.0.0)
Requires-Dist: pystray (>=0.19.5,<0.20.0)
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
Requires-Dist: sqlite-web (>=0.6.4,<0.7.0)
Description-Content-Type: text/markdown

# dbm-systray

Database Tray Application

## Installation

```sh
# Create a virtual environment
python -m venv venv

# Activate virtual environment (Windows)
venv\Scripts\activate

# Install the package
pip install dbm-systray
```

## Usage

```sh
# View help
python app.py -h

usage: app.py [-h] [-c CONFIG] [-p PORTS PORTS]

Database Tray Application

options:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        path to the configuration file (default: configs/config.json)
  -p PORTS PORTS, --ports PORTS PORTS
                        available ports: <starting_port_number> <num_ports>
```

## Configuration File Format

The `config.json` file should be a JSON array where each element represents an entry with the following properties:

- `name` (string): The name of the resource.
- `path` (string): The file path to the resource. Only `.sqlite` and `.json` file extensions are supported.

### JSON Schema for `config.json`

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string"
      },
      "path": {
        "type": "string",
        "pattern": "\\.(sqlite|json)$"
      }
    },
    "required": ["name", "path"],
    "additionalProperties": false
  }
}
```

## Environment Configuration

The program will read the starting directory and look for a `.env` file. In the `.env` file, you can configure the following environment variables:

1. `EDITOR` - Specifies the text editor to be used.
2. `SQLITE_BROWSER_EXE` - Path to the SQLite browser executable.
3. `SQLITE_WEB` - Configuration for the SQLite web server.
4. `LITECLI` - Path to the LiteCLI executable for interacting with SQLite databases.


