Migrate from Poetry and pyenv to uv
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# `src/core/transforms.py`
|
||||
|
||||
Tag-schema value transforms for miniDLNA folder names.
|
||||
|
||||
Applied when building a folder name from a tag value — the tag keeps its exact
|
||||
value (e.g. rating 87 → tag "Hodnocení/87"), while the folder groups it
|
||||
(→ "…/80–89 %"). Config-driven and extensible via `TAG_TRANSFORMS`.
|
||||
|
||||
Source: [`src/core/transforms.py`](../../src/core/transforms.py)
|
||||
|
||||
## Functions
|
||||
|
||||
### `rating_band`
|
||||
|
||||
*function · line 11*
|
||||
|
||||
```python
|
||||
rating_band(rating: int) -> str
|
||||
```
|
||||
|
||||
Bucket a 0–100 rating into a ten-point band label (e.g. "80–89 %").
|
||||
|
||||
The top bucket spans 90–100 % so a perfect 100 still lands in a band.
|
||||
|
||||
### `_decade_band`
|
||||
|
||||
*function · line 21*
|
||||
|
||||
```python
|
||||
_decade_band(value) -> str
|
||||
```
|
||||
|
||||
`decade_band` transform: pull the leading integer and bucket it.
|
||||
|
||||
### `apply_transform`
|
||||
|
||||
*function · line 35*
|
||||
|
||||
```python
|
||||
apply_transform(value: str, transform: Optional[str]) -> str
|
||||
```
|
||||
|
||||
Apply a named tag-schema transform to a value, returning a string.
|
||||
Reference in New Issue
Block a user