Metadata-Version: 2.4
Name: wirez-py
Version: 1.0.6
Summary: Remember and retrieve file paths by name — from any program, anywhere.
Author: 
License: MIT
Project-URL: Homepage, https://github.com/kulbir/wires
Keywords: files,path,registry,bookmark,wires
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Dynamic: requires-python

# wirez-py

```
              /$$
             |__/
 /$$  /$$  /$$ /$$  /$$$$$$   /$$$$$$  /$$$$$$$$        /$$$$$$  /$$   /$$
| $$ | $$ | $$| $$ /$$__  $$ /$$__  $$|____ /$$/       /$$__  $$| $$  | $$
| $$ | $$ | $$| $$| $$  \__/| $$$$$$$$   /$$$$/       | $$  \ $$| $$  | $$
| $$ | $$ | $$| $$| $$      | $$_____/  /$$__/        | $$  | $$| $$  | $$
|  $$$$$/$$$$/| $$| $$      |  $$$$$$$ /$$$$$$$$      | $$$$$$$/|  $$$$$$$
 \_____/\___/ |__/|__/       \_______/|________/      | $$____/  \____  $$
                                                      | $$       /$$  | $$
                                                      | $$      |  $$$$$$/
                                                      |__/       \______/
```

**Remember and retrieve file paths by name — from any program, anywhere.**

```
pip install wirez-py
```

---

## Quick Start

```python
import wires

wires.save("config", "/path/to/config.json")
wires.get("config")   # → "/path/to/config.json"
```

---

## All Features

### Save & Retrieve

```python
wires.save("myfile", "/path/to/file.txt")      # register a file
wires.remember("myfile", "/path/to/file.txt")  # same as save

wires.get("myfile")      # → str path
wires.recall("myfile")   # same as get
wires.path("myfile")     # → pathlib.Path
```

### List & Verify

```python
wires.list_all()   # → dict of all registered wires
wires.verify()     # check for missing or moved files
                   # → {"myfile": "ok", "old": "missing", "data": "moved? found at /new/path"}
```

### Fix & Remove

```python
wires.update_path("myfile", "/new/location/file.txt")  # fix after a file moves
wires.remove("myfile")                                  # unregister
```

### Dump

Copy all registered files into a folder:

```python
wires.dump()               # → copies everything to ./wirez_dump/
wires.dump("my_backup")    # → copies to ./my_backup/
```

### Pass File to a Program

Send a registered file directly to another program:

```python
wires.passfile("myvideo", "vlc")      # open in VLC
wires.passfile("mydoc", "notepad")    # open in Notepad
```

### Media Playback

Play registered mp4/mp3 files inside a defined screen region.
Requires: `pip install pygame opencv-python`

```python
# Define the screen region (x1, y1, x2, y2) in pixels
wires.set_playspace(0, 0, 1280, 720)

# Play a registered file (asks for permission first)
wires.play("myvideo")   # mp4
wires.play("mysong")    # mp3 / wav / ogg

# Get current playspace
wires.get_playspace()   # → {"x1": 0, "y1": 0, "x2": 1280, "y2": 720}
```

### Debug & Logging

```python
wires.enable_debug(True)            # verbose output to stderr
wires.enable_warnings(False)        # silence warnings
wires.set_log_file("wires.log")     # custom log file (default: ~/.wires/wires.log)
wires.set_log_file(None)            # disable file logging
```

### Self-Update

```python
wires.update()   # checks PyPI and updates if a new version is available
```

Or from terminal:
```
pip install --upgrade wirez-py
```

---

## How It Works

Wires stores all registrations in `~/.wires/registry.json`. Every program on the machine shares this registry, so a path saved in one script is instantly accessible in another.

> **Note:** Wires stores paths, not files. If you move or delete a file, use `wires.verify()` to find broken wires and `wires.update_path()` to fix them. Use `wires.dump()` to make a physical backup copy of all your files.

---

## License

MIT
