Compare commits
72 Commits
pyright-al
...
translatio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7395679d17 | ||
|
|
c4c749650f | ||
|
|
d54d46e704 | ||
|
|
4c484bc4c6 | ||
|
|
4dc06835cb | ||
|
|
2a2d279725 | ||
|
|
32a9a04399 | ||
|
|
785959ec24 | ||
|
|
97c9d34186 | ||
|
|
57849bf4d5 | ||
|
|
dd01c7cdcd | ||
|
|
86274efeef | ||
|
|
84cf47038f | ||
|
|
44cf02db21 | ||
|
|
7ae3a6bec8 | ||
|
|
f3bcb7c5c6 | ||
|
|
04744b224c | ||
|
|
dcd48ebb12 | ||
|
|
49e9ede387 | ||
|
|
77274fb77f | ||
|
|
ccb16e970a | ||
|
|
71d9fc6f3c | ||
|
|
9778db681a | ||
|
|
88d0b47a86 | ||
|
|
c38cc9daaa | ||
|
|
6397b228eb | ||
|
|
4d882a7156 | ||
|
|
4c0cb1648f | ||
|
|
0529925cd1 | ||
|
|
5dcad418f7 | ||
|
|
615978e5a6 | ||
|
|
e833473c5b | ||
|
|
c9f5347182 | ||
|
|
db7b126725 | ||
|
|
26803b0d42 | ||
|
|
d86a9bfb7b | ||
|
|
137c750595 | ||
|
|
9f44834356 | ||
|
|
8d7ba0dd86 | ||
|
|
b7e0613ffb | ||
|
|
9a1f94bff0 | ||
|
|
1981b134c3 | ||
|
|
ec202891b2 | ||
|
|
278adc1004 | ||
|
|
23323431b8 | ||
|
|
ea4b01ec08 | ||
|
|
1e5334e76a | ||
|
|
e94ef20108 | ||
|
|
8a4d4def07 | ||
|
|
6e6a91aaf4 | ||
|
|
d7573b3f26 | ||
|
|
c6f66973a4 | ||
|
|
c1599c98f1 | ||
|
|
9319b6e6d6 | ||
|
|
00aeb043f0 | ||
|
|
e18cf24b43 | ||
|
|
377f3afb1d | ||
|
|
2d107ab00d | ||
|
|
2d652c83d4 | ||
|
|
bbfc27285e | ||
|
|
2df92f2115 | ||
|
|
2eb9aad12d | ||
|
|
d9c7d58e89 | ||
|
|
71d04254cf | ||
|
|
b216490311 | ||
|
|
1c5e0016cc | ||
|
|
f258578f7b | ||
|
|
19cdb80b57 | ||
|
|
47baa6f09e | ||
|
|
cee64a8c31 | ||
|
|
f49cb4fade | ||
|
|
fff967617b |
3
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -4,7 +4,8 @@
|
||||
^^^ Summarize the changes done and why they were done above.
|
||||
|
||||
By submitting this pull request, you certify that you have read the
|
||||
[CONTRIBUTING.md](https://github.com/TagStudioDev/TagStudio/blob/main/CONTRIBUTING.md).
|
||||
[Contributing](https://docs.tagstud.io/contributing) page on our documentation site,
|
||||
or in the project's [CONTRIBUTING.md](https://github.com/TagStudioDev/TagStudio/blob/main/docs/contributing.md) file.
|
||||
|
||||
IMPORTANT FOR FEATURES: Please verify that a feature request or some other form
|
||||
of communication with maintainers was already conducted in terms of approving.
|
||||
|
||||
33
.github/workflows/pytest.yaml
vendored
@@ -4,21 +4,24 @@ name: pytest
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
pytest:
|
||||
name: Run pytest
|
||||
pytest-linux:
|
||||
name: Run pytest (Linux)
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
- &checkout
|
||||
name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
- &setup-python
|
||||
name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: pip
|
||||
|
||||
- name: Install Python dependencies
|
||||
- &install-dependencies
|
||||
name: Install Python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade uv
|
||||
uv pip install --system .[pytest]
|
||||
@@ -40,6 +43,7 @@ jobs:
|
||||
libxcb-xinerama0 \
|
||||
libxkbcommon-x11-0 \
|
||||
libyaml-dev \
|
||||
ripgrep \
|
||||
x11-utils
|
||||
|
||||
- name: Execute pytest
|
||||
@@ -52,10 +56,27 @@ jobs:
|
||||
name: coverage
|
||||
path: coverage.xml
|
||||
|
||||
pytest-windows:
|
||||
name: Run pytest (Windows)
|
||||
runs-on: windows-2025
|
||||
|
||||
steps:
|
||||
- *checkout
|
||||
- *setup-python
|
||||
- *install-dependencies
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
choco install ripgrep
|
||||
|
||||
- name: Execute pytest
|
||||
run: |
|
||||
pytest
|
||||
|
||||
coverage:
|
||||
name: Check coverage
|
||||
runs-on: ubuntu-latest
|
||||
needs: pytest
|
||||
needs: pytest-linux
|
||||
|
||||
steps:
|
||||
- name: Fetch coverage
|
||||
|
||||
861
CHANGELOG.md
@@ -1,861 +0,0 @@
|
||||
# TagStudio Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [9.5.2] - 2025-03-31
|
||||
|
||||
### Added
|
||||
|
||||
#### Search
|
||||
|
||||
- feat(ui): add setting to not display full filepaths by [@HermanKassler](https://github.com/HermanKassler) in [#841](https://github.com/TagStudioDev/TagStudio/pull/841)
|
||||
- feat: add filename and path sorting by [@Computerdores](https://github.com/Computerdores) in [#842](https://github.com/TagStudioDev/TagStudio/pull/842)
|
||||
|
||||
#### Settings
|
||||
|
||||
- feat: new settings menu + settings backend by [@Computerdores](https://github.com/Computerdores) in [#859](https://github.com/TagStudioDev/TagStudio/pull/859)
|
||||
|
||||
#### UI
|
||||
|
||||
- feat(ui): merge media controls by [@csponge](https://github.com/csponge) in [#805](https://github.com/TagStudioDev/TagStudio/pull/805)
|
||||
- fix: Remove border from video preview top and left by [@zfbx](https://github.com/zfbx) in [#900](https://github.com/TagStudioDev/TagStudio/pull/900)
|
||||
- feat(ui): add more default icons and file type equivalencies by [@CyanVoxel](https://github.com/CyanVoxel) in [#882](https://github.com/TagStudioDev/TagStudio/pull/882)
|
||||
- ui: recent libraries list improvements by [@CyanVoxel](https://github.com/CyanVoxel) in [#881](https://github.com/TagStudioDev/TagStudio/pull/881)
|
||||
|
||||
#### Misc
|
||||
|
||||
- feat: provide a .desktop file by [@xarvex](https://github.com/xarvex) in [#870](https://github.com/TagStudioDev/TagStudio/pull/870)
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix: catch NotImplementedError for Float16 JPEG-XL files by [@CyanVoxel](https://github.com/CyanVoxel) in [#849](https://github.com/TagStudioDev/TagStudio/pull/849)
|
||||
- fix(nix/package): account for GTK platform by [@xarvex](https://github.com/xarvex) in [#868](https://github.com/TagStudioDev/TagStudio/pull/868)
|
||||
- fix: do not set palette for Linux-like systems that offer theming by [@xarvex](https://github.com/xarvex) in [#869](https://github.com/TagStudioDev/TagStudio/pull/869)
|
||||
- fix(flake): remove pinned input, only consume in Nix shell by [@xarvex](https://github.com/xarvex) in [#872](https://github.com/TagStudioDev/TagStudio/pull/872)
|
||||
- fix: stop ffmpeg cmd windows, refactor ffmpeg_checker by [@CyanVoxel](https://github.com/CyanVoxel) in [#855](https://github.com/TagStudioDev/TagStudio/pull/855)
|
||||
- fix: hide mnemonics on macOS by [@CyanVoxel](https://github.com/CyanVoxel) in [#856](https://github.com/TagStudioDev/TagStudio/pull/856)
|
||||
- fix: use UNION instead of UNION ALL by [@CyanVoxel](https://github.com/CyanVoxel) in [#877](https://github.com/TagStudioDev/TagStudio/pull/877)
|
||||
- fix: remove unescaped ampersand from "about.description" by [@CyanVoxel](https://github.com/CyanVoxel) in [#885](https://github.com/TagStudioDev/TagStudio/pull/885)
|
||||
- fix(ui): display 0 frame webp files in preview panel by [@CyanVoxel](https://github.com/CyanVoxel) in [64dc88a](https://github.com/TagStudioDev/TagStudio/commit/64dc88afa90bb11f3c9b74a2522f947370ce21db)
|
||||
- fix: close pdf file object in thumb renderer by [@Computerdores](https://github.com/Computerdores) in [#893](https://github.com/TagStudioDev/TagStudio/pull/893)
|
||||
- perf: improve responsiveness of GIF entries by [@Computerdores](https://github.com/Computerdores) in [#894](https://github.com/TagStudioDev/TagStudio/pull/894)
|
||||
- fix(ui): seamlessly loop videos by [@CyanVoxel](https://github.com/CyanVoxel) in [#902](https://github.com/TagStudioDev/TagStudio/pull/902)
|
||||
|
||||
### Internal Changes
|
||||
|
||||
- refactor!: change layout; import and build change by [@xarvex](https://github.com/xarvex) and [@CyanVoxel](https://github.com/CyanVoxel) in [#844](https://github.com/TagStudioDev/TagStudio/pull/844)
|
||||
- fix: log all problems in translation test by [@Computerdores](https://github.com/Computerdores) in [#839](https://github.com/TagStudioDev/TagStudio/pull/839)
|
||||
- refactor: split translation keys for about screen by [@CyanVoxel](https://github.com/CyanVoxel) in [#845](https://github.com/TagStudioDev/TagStudio/pull/845)
|
||||
- feat(ci): development tooling refresh and split documentation by [@xarvex](https://github.com/xarvex) in [#867](https://github.com/TagStudioDev/TagStudio/pull/867)
|
||||
- refactor: type hints and improvements in file_opener.py by [@VasigaranAndAngel](https://github.com/VasigaranAndAngel) in [#876](https://github.com/TagStudioDev/TagStudio/pull/876)
|
||||
- build: update spec file to use proper pathex and datas paths by [@Leonard2](https://github.com/Leonard2) in [#895](https://github.com/TagStudioDev/TagStudio/pull/895)
|
||||
- refactor: fix various missing and broken type hints@VasigaranAndAngel in [#901](https://github.com/TagStudioDev/TagStudio/pull/901)
|
||||
- refactor: fix type hints and overrides in flowlayout.py by [@VasigaranAndAngel](https://github.com/VasigaranAndAngel) in [#880](https://github.com/TagStudioDev/TagStudio/pull/880)
|
||||
|
||||
### Documentation
|
||||
|
||||
- docs: fix typos and grammar by [@Gawidev](https://github.com/Gawidev) in [#879](https://github.com/TagStudioDev/TagStudio/pull/879)
|
||||
- docs: update `ThumbRenderer` source by [@emmanuel-ferdman](https://github.com/emmanuel-ferdman) in [#896](https://github.com/TagStudioDev/TagStudio/pull/896)
|
||||
|
||||
### Translations
|
||||
|
||||
- Added Japanese (50%)
|
||||
- [@needledetector](https://github.com/needledetector)
|
||||
- Updated Turkish (93%)
|
||||
- [@Nyghl](https://github.com/Nyghl)
|
||||
- Updated Filipino (57%)
|
||||
- [@searinminecraft](https://github.com/searinminecraft)
|
||||
- Updated Tamil (92%)
|
||||
- [@TamilNeram](https://github.com/TamilNeram)
|
||||
- Updated Portuguese (Brazil) (83%)
|
||||
- [@viniciushelder](https://github.com/viniciushelder)
|
||||
- Updated German (95%)
|
||||
- [@DontBlameMe99](https://github.com/DontBlameMe99), [@Computerdores](https://github.com/Computerdores)
|
||||
- Updated Russian (85%)
|
||||
- werdi, [@Dott-rus](https://github.com/Dott-rus)
|
||||
- Updated Hungarian (100%)
|
||||
- Szíjártó Levente Pál
|
||||
- Updated Spanish (96%)
|
||||
- Joan, [@Nginearing](https://github.com/Nginearing)
|
||||
- Updated French (100%)
|
||||
- [@kitsumed](https://github.com/kitsumed)
|
||||
- Updated Toki Pona (80%)
|
||||
- [@Math-Bee](https://github.com/Math-Bee)
|
||||
|
||||
## [9.5.1] - 2025-03-06
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed translations crashing the program and preventing it from being reopened ([#827](https://github.com/TagStudioDev/TagStudio/issues/827))
|
||||
- fix: restore `translate_formatted()` method as `format()` by [@CyanVoxel](https://github.com/CyanVoxel) in [#830](https://github.com/TagStudioDev/TagStudio/pull/830)
|
||||
- tests: add tests for translations by [@Computerdores](https://github.com/Computerdores) in [#833](https://github.com/TagStudioDev/TagStudio/pull/833)
|
||||
- fix(translations): fix invalid placeholders by [@CyanVoxel](https://github.com/CyanVoxel) in [#835](https://github.com/TagStudioDev/TagStudio/pull/835)
|
||||
- Removed empty parentheses from the "About" screen title
|
||||
- fix: separate about screen title from translations by [@CyanVoxel](https://github.com/CyanVoxel) in [#836](https://github.com/TagStudioDev/TagStudio/pull/836)
|
||||
|
||||
### Translations
|
||||
|
||||
- Updated French (99%)
|
||||
- [@alessdangelo](https://github.com/alessdangelo), [@Bamowen](https://github.com/Bamowen), [@kitsumed](https://github.com/kitsumed)
|
||||
- Updated German (98%)
|
||||
- [@Thesacraft](https://github.com/Thesacraft)
|
||||
- Updated Portuguese (Brazil) (88%)
|
||||
- [@viniciushelder](https://github.com/viniciushelder)
|
||||
- Updated Russian (73%)
|
||||
- werdei
|
||||
- Updated Spanish (95%)
|
||||
- [@JCC1998](https://github.com/JCC1998)
|
||||
|
||||
### Documentation
|
||||
|
||||
- docs: fix category typo by [@salem404](https://github.com/salem404) in [#834](https://github.com/TagStudioDev/TagStudio/pull/834)
|
||||
|
||||
## [9.5.0] - 2025-03-03
|
||||
|
||||
### Added
|
||||
|
||||
#### Overhauled Search Engine
|
||||
|
||||
##### Boolean Operators
|
||||
|
||||
- feat: implement query language by [@Computerdores](https://github.com/Computerdores) in [#606](https://github.com/TagStudioDev/TagStudio/pull/606)
|
||||
- feat: optimize AND queries by [@Computerdores](https://github.com/Computerdores) in [#679](https://github.com/TagStudioDev/TagStudio/pull/679)
|
||||
|
||||
##### Filetype, Mediatype, and Glob Path + Smartcase Searches
|
||||
|
||||
- fix: remove wildcard requirement for tags by [@Tyrannicodin](https://github.com/Tyrannicodin) in [#481](https://github.com/TagStudioDev/TagStudio/pull/481)
|
||||
- feat: add filetype and mediatype searches by [@python357-1](https://github.com/python357-1) in [#575](https://github.com/TagStudioDev/TagStudio/pull/575)
|
||||
- feat: make path search use globs by [@python357-1](https://github.com/python357-1) in [#582](https://github.com/TagStudioDev/TagStudio/pull/582)
|
||||
- feat: implement search equivalence of "jpg" and "jpeg" filetypes by [@Computerdores](https://github.com/Computerdores) in [#649](https://github.com/TagStudioDev/TagStudio/pull/649)
|
||||
- feat: add smartcase and globless path searches by [@CyanVoxel](https://github.com/CyanVoxel) in [#743](https://github.com/TagStudioDev/TagStudio/pull/743)
|
||||
|
||||
##### Sortable Results
|
||||
|
||||
- feat: sort by "date added" in library by [@Computerdores](https://github.com/Computerdores) in [#674](https://github.com/TagStudioDev/TagStudio/pull/674)
|
||||
|
||||
##### Autocomplete
|
||||
|
||||
- feat: add autocomplete for search engine by [@python357-1](https://github.com/python357-1) in [#586](https://github.com/TagStudioDev/TagStudio/pull/586)
|
||||
|
||||
#### Replaced "Tag Fields" with Tag Categories
|
||||
|
||||
Instead of tags needing to be added to a tag field type such as "Meta Tags", "Content Tags", or just the "Tags" field, tags are now added directly to file entries with no intermediary step. While tag field types offered a way to further organize tags, it was cumbersome, inflexible, and simply not fully fleshed out. Tag Categories offer all of the previous (intentional) functionality while greatly increasing the ease of use and customization.
|
||||
|
||||
- feat!: tag categories by [@CyanVoxel](https://github.com/CyanVoxel) in [#655](https://github.com/TagStudioDev/TagStudio/pull/655)
|
||||
|
||||
[](https://private-user-images.githubusercontent.com/46939827/400138597-0b92eca5-db8f-4e3e-954b-1b4f3795f073.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDY2NTU5ODIsIm5iZiI6MTc0NjY1NTY4MiwicGF0aCI6Ii80NjkzOTgyNy80MDAxMzg1OTctMGI5MmVjYTUtZGI4Zi00ZTNlLTk1NGItMWI0ZjM3OTVmMDczLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA1MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTA3VDIyMDgwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY4ZWEzOWRkZjkwOGZmYjZmZDUzMjU1MjJhNDNkNzYzZmM4YjZkMTUyNWIzMjNhMGY1NWNhYmU4ODNiNzlhMzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.cE_WO9AHsigusAbtaQV0QtN4FjYJz0lyHLLwFFDBO-0)
|
||||
|
||||
#### Thumbnails and File Previews
|
||||
|
||||
##### New Thumbnail Support
|
||||
|
||||
- feat: add svg thumbnail support (port [#442](https://github.com/TagStudioDev/TagStudio/pull/442)) by [@Tyrannicodin](https://github.com/Tyrannicodin) and [@CyanVoxel](https://github.com/CyanVoxel) in [#540](https://github.com/TagStudioDev/TagStudio/pull/540)
|
||||
- feat: add pdf thumbnail support (port [#378](https://github.com/TagStudioDev/TagStudio/pull/378)) by [@Heiholf](https://github.com/Heiholf) and [@CyanVoxel](https://github.com/CyanVoxel) in [#543](https://github.com/TagStudioDev/TagStudio/pull/543)
|
||||
- feat: add ePub thumbnail support (port [#387](https://github.com/TagStudioDev/TagStudio/pull/387)) by [@Heiholf](https://github.com/Heiholf) and [@CyanVoxel](https://github.com/CyanVoxel) in [#539](https://github.com/TagStudioDev/TagStudio/pull/539)
|
||||
- feat: add OpenDocument thumbnail support (port [#366](https://github.com/TagStudioDev/TagStudio/pull/366)) by [@Joshua-Beatty](https://github.com/Joshua-Beatty) and [@CyanVoxel](https://github.com/CyanVoxel) in [#545](https://github.com/TagStudioDev/TagStudio/pull/545)
|
||||
- feat: add JXL thumbnail and animated APNG + WEBP support (port [#344](https://github.com/TagStudioDev/TagStudio/pull/344) and partially port [#357](https://github.com/TagStudioDev/TagStudio/pull/357)) by [@BPplays](https://github.com/BPplays) and [@CyanVoxel](https://github.com/CyanVoxel) in [#549](https://github.com/TagStudioDev/TagStudio/pull/549)
|
||||
- fix: catch ImportError for pillow_jxl module by [@CyanVoxel](https://github.com/CyanVoxel) in [a2f9685](https://github.com/TagStudioDev/TagStudio/commit/a2f9685bc0d744ea6f5334c6d2926aad3f6d375a)
|
||||
|
||||
##### Audio Playback
|
||||
|
||||
- feat: audio playback by [@csponge](https://github.com/csponge) in [#576](https://github.com/TagStudioDev/TagStudio/pull/576)
|
||||
- feat(ui): add audio volume slider by [@SkeleyM](https://github.com/SkeleyM) in [#691](https://github.com/TagStudioDev/TagStudio/pull/691)
|
||||
|
||||
##### Thumbnail Caching
|
||||
|
||||
- feat(ui): add thumbnail caching by [@CyanVoxel](https://github.com/CyanVoxel) in [#694](https://github.com/TagStudioDev/TagStudio/pull/694)
|
||||
|
||||
#### Tags
|
||||
|
||||
##### Delete Tags _(Finally!)_
|
||||
|
||||
- feat: remove and create tags from tag database panel by [@DandyDev01](https://github.com/DandyDev01) in [#569](https://github.com/TagStudioDev/TagStudio/pull/569)
|
||||
|
||||
##### Custom User-Created Tag Colors
|
||||
|
||||
Create your own custom tag colors via the new Tag Color Manager! Tag colors are assigned a namespace (group) and include a name, primary color, and optional secondary color. By default the secondary color is used for the tag text color, but this can also be toggled to apply to the border color as well!
|
||||
|
||||
- feat(ui)!: user-created tag colors@CyanVoxel in [#801](https://github.com/TagStudioDev/TagStudio/pull/801)
|
||||
|
||||
[](https://private-user-images.githubusercontent.com/46939827/413668576-b591f1fe-1c44-4d82-b6e5-d166590aeab1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDY2NTU5ODIsIm5iZiI6MTc0NjY1NTY4MiwicGF0aCI6Ii80NjkzOTgyNy80MTM2Njg1NzYtYjU5MWYxZmUtMWM0NC00ZDgyLWI2ZTUtZDE2NjU5MGFlYWIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA1MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTA3VDIyMDgwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiZjM4NzczYTFhYmFhNjgwMWJlYjgwNTkzYjA3ZWFlNTkwNzBiYTlhNTAzM2Y0MWM1MWQ0MzY1YmEyNmE4NjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EOEVWLDMx5CT-Gg5UhBmdMIYT49IZPKrrA9VL7N-pBQ) [](https://private-user-images.githubusercontent.com/46939827/413668612-96e81b08-6993-4a5e-96d0-3b05b50fbe44.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDY2NTU5ODIsIm5iZiI6MTc0NjY1NTY4MiwicGF0aCI6Ii80NjkzOTgyNy80MTM2Njg2MTItOTZlODFiMDgtNjk5My00YTVlLTk2ZDAtM2IwNWI1MGZiZTQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA1MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTA3VDIyMDgwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJkNTUxODJiMDZhN2I2MDAxYzZlNzIyOTAzYTgwZDg3ZDFlYWM3ODM1YWY0Mzg5MDJjNDY0NzJhYjU4ZTAzMmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.rqM3YOwrYdBCiwbBbEvalj7Tsfl-XWqgD1K9PeE46tI)
|
||||
|
||||
##### New Tag Colors + UI
|
||||
|
||||
- feat: expanded tag color system by [@CyanVoxel](https://github.com/CyanVoxel) in [#709](https://github.com/TagStudioDev/TagStudio/pull/709)
|
||||
- fix(ui): use correct pink tag color by [@CyanVoxel](https://github.com/CyanVoxel) in [431efe4](https://github.com/TagStudioDev/TagStudio/commit/431efe4fe93213141c763e59ca9887215766fd42)
|
||||
- fix(ui): use consistent tag outline colors by [@CyanVoxel](https://github.com/CyanVoxel) in [020a73d](https://github.com/TagStudioDev/TagStudio/commit/020a73d095c74283d6c80426d3c3db8874409952)
|
||||
|
||||
[](https://private-user-images.githubusercontent.com/46939827/408753168-c8f82d89-ad7e-4be6-830e-b91cdc58e4c6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDY2NTU5ODIsIm5iZiI6MTc0NjY1NTY4MiwicGF0aCI6Ii80NjkzOTgyNy80MDg3NTMxNjgtYzhmODJkODktYWQ3ZS00YmU2LTgzMGUtYjkxY2RjNThlNGM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA1MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTA3VDIyMDgwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk1OWNhZGNkOTRiZGJhNGQxNGU1MjJhYTViYTc0OTNiNTA4NDUxODA4OTYxZDUwNzYxZDhmYWZkNzM4NTE3N2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.HLnwHyp3BYg8vXo3BtvqBoOqtpQTI1eykqa-L3chLUk)
|
||||
|
||||
##### New Tag Alias UI
|
||||
|
||||
- fix: preview panel aliases not staying up to date with database by [@DandyDev01](https://github.com/DandyDev01) in [#641](https://github.com/TagStudioDev/TagStudio/pull/641)
|
||||
- fix: subtags/parent tags & aliases update the UI for building a tag by [@DandyDev01](https://github.com/DandyDev01) in [#534](https://github.com/TagStudioDev/TagStudio/pull/534)
|
||||
|
||||
#### Translations
|
||||
|
||||
TagStudio now has official translation support! Head to the new settings panel and select from one of the initial languages included. Note that many languages currently have incomplete translations.
|
||||
|
||||
Translation hosting generously provided by [Weblate](https://weblate.org/en/). Check out our [project page](https://hosted.weblate.org/projects/tagstudio/) to help translate TagStudio! Thank you to everyone who's helped contribute to the translations so far!
|
||||
|
||||
- translations: add string tokens for en.json by [@Bamowen](https://github.com/Bamowen) in [#507](https://github.com/TagStudioDev/TagStudio/pull/507)
|
||||
- feat: translations by [@Computerdores](https://github.com/Computerdores) in [#662](https://github.com/TagStudioDev/TagStudio/pull/662)
|
||||
- feat(ui): add language setting by [@CyanVoxel](https://github.com/CyanVoxel) in [#803](https://github.com/TagStudioDev/TagStudio/pull/803)
|
||||
|
||||
Initial Languages:
|
||||
|
||||
- Chinese (Traditional) (68%)
|
||||
- [@brisu](https://github.com/brisu)
|
||||
- Dutch (35%)
|
||||
- [@Pheubel](https://github.com/Pheubel)
|
||||
- Filipino (43%)
|
||||
- [@searinminecraft](https://github.com/searinminecraft)
|
||||
- French (100%)
|
||||
- [@Bamowen](https://github.com/Bamowen), [@alessdangelo](https://github.com/alessdangelo), [@kitsumed](https://github.com/kitsumed), Obscaeris
|
||||
- German (98%)
|
||||
- [@Ryussei](https://github.com/Ryussei), [@Computerdores](https://github.com/Computerdores), Aaron M, [@JoeJoeTV](https://github.com/JoeJoeTV), [@Kurty00](https://github.com/Kurty00)
|
||||
- Hungarian (100%)
|
||||
- [@smileyhead](https://github.com/smileyhead)
|
||||
- Norwegian Bokmål (16%)
|
||||
- [@comradekingu](https://github.com/comradekingu)
|
||||
- Polish (97%)
|
||||
- Anonymous
|
||||
- Portuguese (Brazil) (64%)
|
||||
- [@LoboMetalurgico](https://github.com/LoboMetalurgico), [@SpaceFox1](https://github.com/SpaceFox1), [@DaviMarquezeli](https://github.com/DaviMarquezeli), [@viniciushelder](https://github.com/viniciushelder), Alexander Lennart Formiga Johnsson
|
||||
- Russian (22%)
|
||||
- [@The-Stolas](https://github.com/The-Stolas)
|
||||
- Spanish (57%)
|
||||
- [@gallegonovato](https://github.com/gallegonovato), [@Nginearing](https://github.com/Nginearing), [@noceno](https://github.com/noceno)
|
||||
- Swedish (24%)
|
||||
- [@adampawelec](https://github.com/adampawelec), [@mashed5894](https://github.com/mashed5894)
|
||||
- Tamil (22%)
|
||||
- [@VasigaranAndAngel](https://github.com/VasigaranAndAngel)
|
||||
- Toki Pona (32%)
|
||||
- [@goldstargloww](https://github.com/goldstargloww)
|
||||
- Turkish (22%)
|
||||
- [@Nyghl](https://github.com/Nyghl)
|
||||
|
||||
#### Miscellaneous
|
||||
|
||||
- feat: about section by [@mashed5894](https://github.com/mashed5894) in [#712](https://github.com/TagStudioDev/TagStudio/pull/712)
|
||||
- feat(ui): add configurable splash screens by [@CyanVoxel](https://github.com/CyanVoxel) in [#703](https://github.com/TagStudioDev/TagStudio/pull/703)
|
||||
- feat(ui): show filenames in thumbnail grid by [@CyanVoxel](https://github.com/CyanVoxel) in [#633](https://github.com/TagStudioDev/TagStudio/pull/633)
|
||||
- feat(about): clickable links to docs/discord/etc in about modal by [@SkeleyM](https://github.com/SkeleyM) in [#799](https://github.com/TagStudioDev/TagStudio/pull/799)
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix(ui): display all tags in panel during empty search by [@samuellieberman](https://github.com/samuellieberman) in [#328](https://github.com/TagStudioDev/TagStudio/pull/328)
|
||||
- fix: avoid `KeyError` in `add_folders_to_tree()` (fix [#346](https://github.com/TagStudioDev/TagStudio/issues/346)) by [@CyanVoxel](https://github.com/CyanVoxel) in [#347](https://github.com/TagStudioDev/TagStudio/pull/347)
|
||||
- fix: error on closing library by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#484](https://github.com/TagStudioDev/TagStudio/pull/484)
|
||||
- fix: resolution info [#550](https://github.com/TagStudioDev/TagStudio/issues/550) by [@Roc25](https://github.com/Roc25) in [#551](https://github.com/TagStudioDev/TagStudio/pull/551)
|
||||
- fix: remove queued thumnail jobs when closing library by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#583](https://github.com/TagStudioDev/TagStudio/pull/583)
|
||||
- fix: use absolute ffprobe path on macos (Fix [#511](https://github.com/TagStudioDev/TagStudio/issues/511)) by [@CyanVoxel](https://github.com/CyanVoxel) in [#629](https://github.com/TagStudioDev/TagStudio/pull/629)
|
||||
- fix(ui): prevent duplicate parent tags in UI by [@SkeleyM](https://github.com/SkeleyM) in [#665](https://github.com/TagStudioDev/TagStudio/pull/665)
|
||||
- fix: fix -o flag not working if path has whitespace around it by [@python357-1](https://github.com/python357-1) in [#670](https://github.com/TagStudioDev/TagStudio/pull/670)
|
||||
- fix: better file opening compatibility with non-ascii filenames by [@SkeleyM](https://github.com/SkeleyM) in [#667](https://github.com/TagStudioDev/TagStudio/pull/667)
|
||||
- fix: restore environment before launching external programs by [@mashed5894](https://github.com/mashed5894) in [#707](https://github.com/TagStudioDev/TagStudio/pull/707)
|
||||
- fix: have pydub use known ffmpeg + ffprobe locations by [@CyanVoxel](https://github.com/CyanVoxel) in [#724](https://github.com/TagStudioDev/TagStudio/pull/724)
|
||||
- fix: add ".DS_Store" to `GLOBAL_IGNORE_SET` by [@CyanVoxel](https://github.com/CyanVoxel) in [b72a2f2](https://github.com/TagStudioDev/TagStudio/commit/b72a2f233141db4db6aa6be8796b626ebd3f0756)
|
||||
- fix: don't add "._" files to libraries by [@CyanVoxel](https://github.com/CyanVoxel) in [eb1f634](https://github.com/TagStudioDev/TagStudio/commit/eb1f634d386cd8a5ecee1e6ff6a0b7d8811550fa)
|
||||
|
||||
### Changed
|
||||
|
||||
#### SQLite Save File Format
|
||||
|
||||
This was the main focus of this update, and where the majority of development time and resources have been spent since v9.4. These changes include everything that was done to migrate from the JSON format to SQLite starting from the initial SQLite PR, while re-implementing every feature from v9.4 as the initial SQLite PR was based on v9.3.x at the time.
|
||||
|
||||
- refactor!: use SQLite and SQLAlchemy for database backend by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#332](https://github.com/TagStudioDev/TagStudio/pull/332)
|
||||
- feat: make search results more ergonomic by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#498](https://github.com/TagStudioDev/TagStudio/pull/498)
|
||||
- feat: store `Entry` suffix separately by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#503](https://github.com/TagStudioDev/TagStudio/pull/503)
|
||||
- feat: port thumbnail ([#390](https://github.com/TagStudioDev/TagStudio/pull/390)) and related features to v9.5 by [@CyanVoxel](https://github.com/CyanVoxel) in [#522](https://github.com/TagStudioDev/TagStudio/pull/522)
|
||||
- fix: don't check db version with new library by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#536](https://github.com/TagStudioDev/TagStudio/pull/536)
|
||||
- fix(ui): update ui when removing fields by [@DandyDev01](https://github.com/DandyDev01) in [#560](https://github.com/TagStudioDev/TagStudio/pull/560)
|
||||
- feat(parity): backend for aliases and parent tags by [@DandyDev01](https://github.com/DandyDev01) in [#596](https://github.com/TagStudioDev/TagStudio/pull/596)
|
||||
- fix: "open in explorer" opens correct folder by [@KirilBourakov](https://github.com/KirilBourakov) in [#603](https://github.com/TagStudioDev/TagStudio/pull/603)
|
||||
- fix: ui/ux parity fixes for thumbnails and files by [@CyanVoxel](https://github.com/CyanVoxel) in [#608](https://github.com/TagStudioDev/TagStudio/pull/608)
|
||||
- feat(parity): migrate json libraries to sqlite by [@CyanVoxel](https://github.com/CyanVoxel) in [#604](https://github.com/TagStudioDev/TagStudio/pull/604)
|
||||
- fix: clear all setting values when opening a library by [@VasigaranAndAngel](https://github.com/VasigaranAndAngel) in [#622](https://github.com/TagStudioDev/TagStudio/pull/622)
|
||||
- fix: remove/rework windows path tests by [@VasigaranAndAngel](https://github.com/VasigaranAndAngel) in [#625](https://github.com/TagStudioDev/TagStudio/pull/625)
|
||||
- fix: add check to see if library is loaded in filter_items by [@Roc25](https://github.com/Roc25) in [#547](https://github.com/TagStudioDev/TagStudio/pull/547)
|
||||
- fix: multiple macro errors by [@Computerdores](https://github.com/Computerdores) in [#612](https://github.com/TagStudioDev/TagStudio/pull/612)
|
||||
- fix: don't allow blank tag alias values in db by [@CyanVoxel](https://github.com/CyanVoxel) in [#628](https://github.com/TagStudioDev/TagStudio/pull/628)
|
||||
- feat: Reimplement drag drop files on sql migration by [@seakrueger](https://github.com/seakrueger) in [#528](https://github.com/TagStudioDev/TagStudio/pull/528)
|
||||
- fix: stop sqlite db from being updated while running tests by [@python357-1](https://github.com/python357-1) in [#648](https://github.com/TagStudioDev/TagStudio/pull/648)
|
||||
- fix: enter/return adds top result tag by [@SkeleyM](https://github.com/SkeleyM) in [#651](https://github.com/TagStudioDev/TagStudio/pull/651)
|
||||
- fix: show correct unlinked files count by [@SkeleyM](https://github.com/SkeleyM) in [#653](https://github.com/TagStudioDev/TagStudio/pull/653)
|
||||
- feat: implement parent tag search by [@Computerdores](https://github.com/Computerdores) in [#673](https://github.com/TagStudioDev/TagStudio/pull/673)
|
||||
- fix: only close add tag menu with no search by [@SkeleyM](https://github.com/SkeleyM) in [#685](https://github.com/TagStudioDev/TagStudio/pull/685)
|
||||
- fix: drag and drop no longer resets by [@SkeleyM](https://github.com/SkeleyM) in [#710](https://github.com/TagStudioDev/TagStudio/pull/710)
|
||||
- feat(ui): port "create and add tag" to main branch by [@SkeleyM](https://github.com/SkeleyM) in [#711](https://github.com/TagStudioDev/TagStudio/pull/711)
|
||||
- fix: don't add default title field, use proper phrasing for adding files by [@CyanVoxel](https://github.com/CyanVoxel) in [#701](https://github.com/TagStudioDev/TagStudio/pull/701)
|
||||
- fix: preview panel + main window fixes and optimizations by [@CyanVoxel](https://github.com/CyanVoxel) in [#700](https://github.com/TagStudioDev/TagStudio/pull/700)
|
||||
- fix: sort tag results by [@mashed5894](https://github.com/mashed5894) in [#721](https://github.com/TagStudioDev/TagStudio/pull/721)
|
||||
- fix: restore opening last library on startup by [@SkeleyM](https://github.com/SkeleyM) in [#729](https://github.com/TagStudioDev/TagStudio/pull/729)
|
||||
- fix(ui): don't always create tag on enter by [@SkeleyM](https://github.com/SkeleyM) in [#731](https://github.com/TagStudioDev/TagStudio/pull/731)
|
||||
- fix: use tag aliases in tag search by [@CyanVoxel](https://github.com/CyanVoxel) in [#726](https://github.com/TagStudioDev/TagStudio/pull/726)
|
||||
- fix: keep initial id order in `get_entries_full()` by [@CyanVoxel](https://github.com/CyanVoxel) in [#736](https://github.com/TagStudioDev/TagStudio/pull/736)
|
||||
- fix: always catch db mismatch by [@CyanVoxel](https://github.com/CyanVoxel) in [#738](https://github.com/TagStudioDev/TagStudio/pull/738)
|
||||
- fix: relink unlinked entry to existing entry without sql error by [@mashed5894](https://github.com/mashed5894) in [#730](https://github.com/TagStudioDev/TagStudio/issues/730)
|
||||
- fix: refactor and fix bugs with missing_files.py by [@CyanVoxel](https://github.com/CyanVoxel) in [#739](https://github.com/TagStudioDev/TagStudio/pull/739)
|
||||
- fix: dragging files references correct entry IDs [@CyanVoxel](https://github.com/CyanVoxel) in [44ff17c](https://github.com/TagStudioDev/TagStudio/commit/44ff17c0b3f05570e356c112f005dbc14c7cc05d)
|
||||
- ui: port splash screen from Alpha-v9.4 by [@CyanVoxel](https://github.com/CyanVoxel) in [af760ee](https://github.com/TagStudioDev/TagStudio/commit/af760ee61a523c84bab0fb03a68d7465866d0e05)
|
||||
- fix: tags created from tag database now add aliases by [@CyanVoxel](https://github.com/CyanVoxel) in [2903dd2](https://github.com/TagStudioDev/TagStudio/commit/2903dd22c45c02498687073d075bb88886de6b62)
|
||||
- fix: check for tag name parity during JSON migration by [@CyanVoxel](https://github.com/CyanVoxel) in [#748](https://github.com/TagStudioDev/TagStudio/pull/748)
|
||||
- feat(ui): re-implement tag display names on sql by [@CyanVoxel](https://github.com/CyanVoxel) in [#747](https://github.com/TagStudioDev/TagStudio/pull/747)
|
||||
- fix(ui): restore Windows accent color on PySide 6.8.0.1 by [@CyanVoxel](https://github.com/CyanVoxel) in [#755](https://github.com/TagStudioDev/TagStudio/pull/755)
|
||||
- fix(ui): (mostly) fix right-click search option on tags by [@CyanVoxel](https://github.com/CyanVoxel) in [#756](https://github.com/TagStudioDev/TagStudio/pull/756)
|
||||
- feat: copy/paste fields and tags by [@mashed5894](https://github.com/mashed5894) in [#722](https://github.com/TagStudioDev/TagStudio/pull/722)
|
||||
- perf: optimize query methods and reduce preview panel updates by [@CyanVoxel](https://github.com/CyanVoxel) in [#794](https://github.com/TagStudioDev/TagStudio/pull/794)
|
||||
- feat: port file trashing ([#409](https://github.com/TagStudioDev/TagStudio/pull/409)) to v9.5 by [@CyanVoxel](https://github.com/CyanVoxel) in [#792](https://github.com/TagStudioDev/TagStudio/pull/792)
|
||||
- fix: prevent future library versions from being opened by [@CyanVoxel](https://github.com/CyanVoxel) in [bcf3b2f](https://github.com/TagStudioDev/TagStudio/commit/bcf3b2f96bc8b876ca4b0c1d1882ce14a190f249)
|
||||
|
||||
#### UI/UX
|
||||
|
||||
- feat(ui): pre-select default tag name in `BuildTagPanel` by [@Cool-Game-Dev](https://github.com/Cool-Game-Dev) in [#592](https://github.com/TagStudioDev/TagStudio/pull/592)
|
||||
- feat(ui): keyboard navigation for editing tags by [@Computerdores](https://github.com/Computerdores) in [#407](https://github.com/TagStudioDev/TagStudio/pull/407)
|
||||
- feat(ui): use tag query as default new tag name by [@CyanVoxel](https://github.com/CyanVoxel) in [29c0dfd](https://github.com/TagStudioDev/TagStudio/commit/29c0dfdb2d88e8f473e27c7f1fe7ede6e5bd0feb)
|
||||
- feat(ui): shortcut to add tags to selected entries; change click behavior of tags to edit by [@CyanVoxel](https://github.com/CyanVoxel) in [#749](https://github.com/TagStudioDev/TagStudio/pull/749)
|
||||
- fix(ui): use consistent dark mode colors for all systems by [@CyanVoxel](https://github.com/CyanVoxel) in [#752](https://github.com/TagStudioDev/TagStudio/pull/752)
|
||||
- fix(ui): use camera white balance for raw images by [@CyanVoxel](https://github.com/CyanVoxel) in [6ee5304](https://github.com/TagStudioDev/TagStudio/commit/6ee5304b52f217af0f5df543fcb389649203d6b2)
|
||||
- Mixed field editing has been limited due to various bugs in both the JSON and SQL implementations. This will be re-implemented in a future release.
|
||||
- fix(ui): improve tagging ux by [@CyanVoxel](https://github.com/CyanVoxel) in [#633](https://github.com/TagStudioDev/TagStudio/pull/633)
|
||||
- fix(ui): hide library actions when no library is open by [@CyanVoxel](https://github.com/CyanVoxel) in [#787](https://github.com/TagStudioDev/TagStudio/pull/787)
|
||||
- refactor(ui): recycle tag list in TagSearchPanel by [@CyanVoxel](https://github.com/CyanVoxel) in [#788](https://github.com/TagStudioDev/TagStudio/pull/788)
|
||||
- feat(ui): add tag view limit dropdown
|
||||
- fix(ui): expand usage of esc and enter for modals by [@CyanVoxel](https://github.com/CyanVoxel) in [#793](https://github.com/TagStudioDev/TagStudio/pull/793)
|
||||
|
||||
#### Performance
|
||||
|
||||
- feat: improve performance of "Delete Missing Entries" by [@Toby222](https://github.com/Toby222) and [@Computerdores](https://github.com/Computerdores) in [#696](https://github.com/TagStudioDev/TagStudio/pull/696)
|
||||
|
||||
#### Internal Changes
|
||||
|
||||
- refactor: combine open launch args by [@UnusualEgg](https://github.com/UnusualEgg) in [#364](https://github.com/TagStudioDev/TagStudio/pull/364)
|
||||
- feat: add date_created, date_modified, and date_added columns to entries table by [@CyanVoxel](https://github.com/CyanVoxel) in [#740](https://github.com/TagStudioDev/TagStudio/pull/740)
|
||||
|
||||
## [9.5.0 Pre-Release 4] - 2025-02-17
|
||||
|
||||
### Added
|
||||
|
||||
#### Custom User-Created Tag Colors ([@CyanVoxel](https://github.com/CyanVoxel) in [#801](https://github.com/TagStudioDev/TagStudio/pull/801))
|
||||
|
||||
Create your own custom tag colors via the new Tag Color Manager! Tag colors are assigned a namespace (group) and include a name, primary color, and optional secondary color. By default the secondary color is used for the tag text color, but this can also be toggled to apply to the border color as well!
|
||||
|
||||
[](https://private-user-images.githubusercontent.com/46939827/413668576-b591f1fe-1c44-4d82-b6e5-d166590aeab1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDY2NTQ3MTYsIm5iZiI6MTc0NjY1NDQxNiwicGF0aCI6Ii80NjkzOTgyNy80MTM2Njg1NzYtYjU5MWYxZmUtMWM0NC00ZDgyLWI2ZTUtZDE2NjU5MGFlYWIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA1MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTA3VDIxNDY1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBhYzUwZmExZjRlMWI4YzJjZTZmNDRiMjFiN2ZlZjg4ZjE3MWM4NzBkNmJlZWNjMzg2OWU5YTE2OWVmZTA2YTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.nEs6bk1euKTEkIqDipNJBrXHbHegb3PHWoW3tKI02_8)
|
||||
|
||||
[](https://private-user-images.githubusercontent.com/46939827/413668612-96e81b08-6993-4a5e-96d0-3b05b50fbe44.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDY2NTQ3MTYsIm5iZiI6MTc0NjY1NDQxNiwicGF0aCI6Ii80NjkzOTgyNy80MTM2Njg2MTItOTZlODFiMDgtNjk5My00YTVlLTk2ZDAtM2IwNWI1MGZiZTQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA1MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTA3VDIxNDY1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlhOGU2NjA2ZjRhMjNjZGYxZDE1ZWYzZmVjN2RjM2Q0YzA1NTcwZGE5OGFkMjc2MDIzMTk1YTFlYjY2NTQxNmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.VD2trGcVKQVKUpzVog1UhZUM0JRcEHUhwGCiHpZ8zF0)
|
||||
|
||||
#### Translations
|
||||
|
||||
TagStudio now has official translation support! Head to the new settings panel and select from one of the initial languages included. Note that many languages currently have incomplete translations.
|
||||
|
||||
Translation hosting generously provided by [Weblate](https://weblate.org/en/). Check out our [project page](https://hosted.weblate.org/projects/tagstudio/) to help translate TagStudio! Thank you to everyone who's helped contribute to the translations so far!
|
||||
|
||||
- translations: add string tokens for en.json by [@Bamowen](https://github.com/Bamowen) in [#507](https://github.com/TagStudioDev/TagStudio/pull/507)
|
||||
- feat: translations by [@Computerdores](https://github.com/Computerdores) in [#662](https://github.com/TagStudioDev/TagStudio/pull/662)
|
||||
- feat(ui): add language setting by [@CyanVoxel](https://github.com/CyanVoxel) in [#803](https://github.com/TagStudioDev/TagStudio/pull/803)
|
||||
|
||||
Initial Languages:
|
||||
|
||||
- Chinese (Traditional) (68%)
|
||||
- [@brisu](https://github.com/brisu)
|
||||
- Dutch (35%)
|
||||
- [@Pheubel](https://github.com/Pheubel)
|
||||
- Filipino (15%)
|
||||
- [@searinminecraft](https://github.com/searinminecraft)
|
||||
- French (89%)
|
||||
- [@Bamowen](https://github.com/Bamowen), [@alessdangelo](https://github.com/alessdangelo), [@kitsumed](https://github.com/kitsumed), Obscaeris
|
||||
- German (73%)
|
||||
- [@Ryussei](https://github.com/Ryussei), [@Computerdores](https://github.com/Computerdores), Aaron M
|
||||
- Hungarian (89%)
|
||||
- [@smileyhead](https://github.com/smileyhead)
|
||||
- Norwegian Bokmål (16%)
|
||||
- [@comradekingu](https://github.com/comradekingu)
|
||||
- Polish (76%)
|
||||
- Anonymous
|
||||
- Portuguese (Brazil) (22%)
|
||||
- [@LoboMetalurgico](https://github.com/LoboMetalurgico), [@SpaceFox1](https://github.com/SpaceFox1)
|
||||
- Russian (22%)
|
||||
- [@The-Stolas](https://github.com/The-Stolas)
|
||||
- Spanish (46%)
|
||||
- [@gallegonovato](https://github.com/gallegonovato), [@Nginearing](https://github.com/Nginearing), [@noceno](https://github.com/noceno)
|
||||
- Swedish (24%)
|
||||
- [@adampawelec](https://github.com/adampawelec), [@mashed5894](https://github.com/mashed5894)
|
||||
- Tamil (22%)
|
||||
- [@VasigaranAndAngel](https://github.com/VasigaranAndAngel)
|
||||
- Toki Pona (32%)
|
||||
- [@goldstargloww](https://github.com/goldstargloww)
|
||||
- Turkish (22%)
|
||||
- [@Nyghl](https://github.com/Nyghl)
|
||||
|
||||
### Fixed
|
||||
|
||||
- feat(about): clickable links to docs/discord/etc in about modal by [@SkeleyM](https://github.com/SkeleyM) in [#799](https://github.com/TagStudioDev/TagStudio/pull/799)
|
||||
|
||||
### Internal Changes
|
||||
|
||||
This release increases the internal `DB_VERSION` to 8. Libraries created with this version of TagStudio can still be opened in earlier v9.5.0 pre-release versions, however the behavior of custom color borders will not be identical to the behavior in this PR. Otherwise it should still be possible to use any custom colors created in this version in these earlier pre-releases (but not really recommended).
|
||||
|
||||
## [9.5.0 Pre-Release 3] - 2025-02-10
|
||||
|
||||
### Added
|
||||
|
||||
##### [#743](https://github.com/TagStudioDev/TagStudio/pull/743) by [@CyanVoxel](https://github.com/CyanVoxel)
|
||||
|
||||
Added "Smartcase" and Globless Path Search
|
||||
|
||||
- `path: temp`: Returns all paths that have "temp" **(Case insensitive)** somewhere in the name.
|
||||
|
||||
- `path: Temp`: Returns all paths that have "Temp" **(Case sensitive)** somewhere in the name.
|
||||
|
||||
|
||||
Glob Patterns w/ Smartcase
|
||||
|
||||
- `path: *temp*`: Returns all paths that have "temp" **(Case insensitive)** somewhere in the name.
|
||||
|
||||
- `path: *Temp*`: Returns all paths that have "Temp" **(Case sensitive)** somewhere in the name.
|
||||
|
||||
- `path: temp*`: Returns all paths that start with "temp" **(Case insensitive)** somewhere in the name.
|
||||
|
||||
- `path: Temp*`: Returns all paths that start with "Temp" **(Case sensitive)** somewhere in the name.
|
||||
|
||||
- `path: *temp`: Returns all paths that end with "temp" **(Case insensitive)** somewhere in the name.
|
||||
|
||||
- `path: *TEmP`: Returns all paths that end with "TEmP" **(Case sensitive)** somewhere in the name.
|
||||
|
||||
|
||||
##### [#788](https://github.com/TagStudioDev/TagStudio/pull/788) by [@CyanVoxel](https://github.com/CyanVoxel)
|
||||
|
||||
- Added a "View Limit" dropdown to tag search boxes to limit the number of on-screen tags. Previously this limit was hardcoded to 100, but now options range from 25 to unlimited.
|
||||
[](https://private-user-images.githubusercontent.com/46939827/411701461-7f7da065-888d-4fe5-a4e7-f99447bcce98.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDY2NTQ3MTYsIm5iZiI6MTc0NjY1NDQxNiwicGF0aCI6Ii80NjkzOTgyNy80MTE3MDE0NjEtN2Y3ZGEwNjUtODg4ZC00ZmU1LWE0ZTctZjk5NDQ3YmNjZTk4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA1MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTA3VDIxNDY1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVlZjVhZjYyNWQwY2FmMjhmMWI1MzI5ZDdjYWMxMmM0N2M0Nzc4MmY1YjE0NWY4MjVhZmIyMDI1NzQzY2M0YmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.a3xUaH5r3HsDgOb6-lo3T-xSRRSy7dDOrln5i62KFP8)
|
||||
|
||||
### Changed
|
||||
|
||||
- fix(ui): expand usage of esc and enter for modals by [@CyanVoxel](https://github.com/CyanVoxel) in [#793](https://github.com/TagStudioDev/TagStudio/pull/793)
|
||||
- perf: optimize query methods and reduce preview panel updates by [@CyanVoxel](https://github.com/CyanVoxel) in [#794](https://github.com/TagStudioDev/TagStudio/pull/794)
|
||||
|
||||
##### [#788](https://github.com/TagStudioDev/TagStudio/pull/788) by [@CyanVoxel](https://github.com/CyanVoxel)
|
||||
|
||||
- Improved performance of tag search boxes, including the tag manager
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix(ui): hide library actions when no library is open by [@CyanVoxel](https://github.com/CyanVoxel) in [#787](https://github.com/TagStudioDev/TagStudio/pull/787)
|
||||
- feat: port file trashing ([#409](https://github.com/TagStudioDev/TagStudio/pull/409)) to v9.5 by [@CyanVoxel](https://github.com/CyanVoxel) in [#792](https://github.com/TagStudioDev/TagStudio/pull/792)
|
||||
|
||||
### Docs
|
||||
|
||||
- Added references to alternative POSIX shells, as well as pyenv to CONTRIBUTING.md by [@ChloeZamorano](https://github.com/ChloeZamorano) in [#791](https://github.com/TagStudioDev/TagStudio/pull/791)
|
||||
## [9.5.0 Pre-Release 2] - 2025-02-03
|
||||
|
||||
### Added
|
||||
|
||||
##### [#784](https://github.com/TagStudioDev/TagStudio/pull/784) by [@CyanVoxel](https://github.com/CyanVoxel)
|
||||
|
||||
- Add Ctrl+M shortcut to open the "Tag Manager"
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix: don't wrap field names too early by [@CyanVoxel](https://github.com/CyanVoxel) in [2215403](https://github.com/TagStudioDev/TagStudio/commit/2215403201e3b416a43ead0a322688180af6d71b) and [90a826d](https://github.com/TagStudioDev/TagStudio/commit/90a826d12804b3386a0b9003abb20f23f88ab3be)
|
||||
- fix: save all tag attributes from "Create & Add" modal by [@SkeleyM](https://github.com/SkeleyM) in [#762](https://github.com/TagStudioDev/TagStudio/pull/762)
|
||||
- fix: allow tag names with colons in search by [@SkeleyM](https://github.com/SkeleyM) in [#765](https://github.com/TagStudioDev/TagStudio/pull/765)
|
||||
- fix: catch `ParsingError` by [@CyanVoxel](https://github.com/CyanVoxel) in [#779](https://github.com/TagStudioDev/TagStudio/pull/779)
|
||||
- fix: patch incorrect description type & invalid disambiguation_id refs by [@CyanVoxel](https://github.com/CyanVoxel) in [#782](https://github.com/TagStudioDev/TagStudio/pull/782)
|
||||
|
||||
##### [#784](https://github.com/TagStudioDev/TagStudio/pull/784) by [@CyanVoxel](https://github.com/CyanVoxel)
|
||||
|
||||
- Reset tag search box and focus each time a tag search panel is opened
|
||||
- Include tag parents in tag search results (v9.4 parity)
|
||||
- Lowercase tag names now get properly sorted with uppercase ones
|
||||
- Don't include tag display names in "closeness" factor when searching
|
||||
- Escape "&" characters inside tag names so Qt doesn't treat them as mnemonics
|
||||
- Set minimum tag width
|
||||
- Fix "Add Tags" panel missing its window title when accessing from the keyboard shortcut
|
||||
|
||||
### Changed
|
||||
|
||||
##### [#784](https://github.com/TagStudioDev/TagStudio/pull/784) by [@CyanVoxel](https://github.com/CyanVoxel)
|
||||
|
||||
- The "use for disambiguation" button has been moved to the right-hand side of parent tags in order to prevent accidental clicks involving the left-hand "remove tag" button
|
||||
- Add "Create & Add" button to the bottom of all non-whitespace searches, even if they return some tags
|
||||
- The awkward "+" button next to tags in the "Add Tags" panel has been removed in favor of clicking on tags themselves
|
||||
- Improved visual feedback for highlighting, keyboard focusing, and clicking tags
|
||||
- The clickable area of the "-" button on tags has been increased and has visual feedback when you hover and click it
|
||||
- You can now tab into the tag search list and add tags with a spacebar press (previously possible but very janky)
|
||||
- In tag search panels, pressing the Esc key will return your focus to the search bar and highlight your previous query. If the search box is already highlighted, pressing Esc will close the modal
|
||||
- In modals such as the "Add Tag" and "Edit Tag" panels, pressing Esc will cancel the operation and close the modal
|
||||
|
||||
### Internal Changes
|
||||
|
||||
- refactor: wrap migration_iterator lambda in a try/except block by [@CyanVoxel](https://github.com/CyanVoxel) in [#773](https://github.com/TagStudioDev/TagStudio/pull/773)
|
||||
|
||||
### Docs
|
||||
|
||||
- docs: update field and library pages by [@CyanVoxel](https://github.com/CyanVoxel) in [f5ff4d7](https://github.com/TagStudioDev/TagStudio/commit/f5ff4d78c1ad53134e9c64698886aee68c0f1dc1)
|
||||
- docs: add information about "tag manager" by [@CyanVoxel](https://github.com/CyanVoxel) in [9bdbafa](https://github.com/TagStudioDev/TagStudio/commit/9bdbafa40c4274922f6533b5b5fcee9a4fe43030)
|
||||
- docs: add note about glob searching in the readme by [@CyanVoxel](https://github.com/CyanVoxel) in [6e402ac](https://github.com/TagStudioDev/TagStudio/commit/6e402ac34d2d60e71fbd36ad234fe3914d5eb8e0)
|
||||
- docs: add library_search page by [@CyanVoxel](https://github.com/CyanVoxel) in [5be7dfc](https://github.com/TagStudioDev/TagStudio/commit/5be7dfc314b21042c18b2f08893f2b452d12394a)
|
||||
- docs: docs: add more links to index.md by [@CyanVoxel](https://github.com/CyanVoxel) in [d795889](https://github.com/TagStudioDev/TagStudio/commit/d7958892b7762586837204d686a6a2a993e3c26e)
|
||||
- docs: fix typo for "category" in usage.md by [@pinheadtf2](https://github.com/pinheadtf2) in [#760](https://github.com/TagStudioDev/TagStudio/pull/760)
|
||||
- fix(docs): fix screenshot sometimes not rendering by [@SkeleyM](https://github.com/SkeleyM) in [#775](https://github.com/TagStudioDev/TagStudio/pull/775)
|
||||
## [9.5.0 Pre-Release 1] - 2025-01-31
|
||||
|
||||
### Added
|
||||
|
||||
#### Overhauled Search Engine
|
||||
|
||||
##### Boolean Operators
|
||||
|
||||
- feat: implement query language by [@Computerdores](https://github.com/Computerdores) in [#606](https://github.com/TagStudioDev/TagStudio/pull/606)
|
||||
- feat: optimize AND queries by [@Computerdores](https://github.com/Computerdores) in [#679](https://github.com/TagStudioDev/TagStudio/pull/679)
|
||||
|
||||
##### Filetype, Mediatype, and Glob Path Searches
|
||||
|
||||
- fix: remove wildcard requirement for tags by [@Tyrannicodin](https://github.com/Tyrannicodin) in [#481](https://github.com/TagStudioDev/TagStudio/pull/481)
|
||||
- feat: add filetype and mediatype searches by [@python357-1](https://github.com/python357-1) in [#575](https://github.com/TagStudioDev/TagStudio/pull/575)
|
||||
- feat: make path search use globs by [@python357-1](https://github.com/python357-1) in [#582](https://github.com/TagStudioDev/TagStudio/pull/582)
|
||||
- feat: implement search equivalence of "jpg" and "jpeg" filetypes by [@Computerdores](https://github.com/Computerdores) in [#649](https://github.com/TagStudioDev/TagStudio/pull/649)
|
||||
|
||||
##### Sortable Results
|
||||
|
||||
- feat: sort by "date added" in library by [@Computerdores](https://github.com/Computerdores) in [#674](https://github.com/TagStudioDev/TagStudio/pull/674)
|
||||
|
||||
##### Autocomplete
|
||||
|
||||
- feat: add autocomplete for search engine by [@python357-1](https://github.com/python357-1) in [#586](https://github.com/TagStudioDev/TagStudio/pull/586)
|
||||
|
||||
#### Replaced "Tag Fields" with Tag Categories
|
||||
|
||||
Instead of tags needing to be added to a tag field type such as "Meta Tags", "Content Tags", or just the "Tags" field, tags are now added directly to file entries with no intermediary step. While tag field types offered a way to further organize tags, it was cumbersome, inflexible, and simply not fully fleshed out. Tag Categories offer all of the previous (intentional) functionality while greatly increasing the ease of use and customization.
|
||||
|
||||
- feat!: tag categories by [@CyanVoxel](https://github.com/CyanVoxel) in [#655](https://github.com/TagStudioDev/TagStudio/pull/655)
|
||||
|
||||
[](https://private-user-images.githubusercontent.com/46939827/400138597-0b92eca5-db8f-4e3e-954b-1b4f3795f073.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDY2NTUwODcsIm5iZiI6MTc0NjY1NDc4NywicGF0aCI6Ii80NjkzOTgyNy80MDAxMzg1OTctMGI5MmVjYTUtZGI4Zi00ZTNlLTk1NGItMWI0ZjM3OTVmMDczLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA1MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTA3VDIxNTMwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM1M2EwNGFjYmJiM2QwZjg2YzNmNTVjMGYwZDJkZGJkZTg5NjZjNDFhNTYyNDE0OGNlOWFhNzRkMzE3MjBkNzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.B5NRZmHygdHlMy2ZnZtHjfOs83jjEliwfxoe3eMBnEQ)
|
||||
|
||||
#### Thumbnails and File Previews
|
||||
|
||||
##### New Thumbnail Support
|
||||
|
||||
- feat: add svg thumbnail support (port [#442](https://github.com/TagStudioDev/TagStudio/pull/442)) by [@Tyrannicodin](https://github.com/Tyrannicodin) and [@CyanVoxel](https://github.com/CyanVoxel) in [#540](https://github.com/TagStudioDev/TagStudio/pull/540)
|
||||
- feat: add pdf thumbnail support (port [#378](https://github.com/TagStudioDev/TagStudio/pull/378)) by [@Heiholf](https://github.com/Heiholf) and [@CyanVoxel](https://github.com/CyanVoxel) in [#543](https://github.com/TagStudioDev/TagStudio/pull/543)
|
||||
- feat: add ePub thumbnail support (port [#387](https://github.com/TagStudioDev/TagStudio/pull/387)) by [@Heiholf](https://github.com/Heiholf) and [@CyanVoxel](https://github.com/CyanVoxel) in [#539](https://github.com/TagStudioDev/TagStudio/pull/539)
|
||||
- feat: add OpenDocument thumbnail support (port [#366](https://github.com/TagStudioDev/TagStudio/pull/366)) by [@Joshua-Beatty](https://github.com/Joshua-Beatty) and [@CyanVoxel](https://github.com/CyanVoxel) in [#545](https://github.com/TagStudioDev/TagStudio/pull/545)
|
||||
- feat: add JXL thumbnail and animated APNG + WEBP support (port [#344](https://github.com/TagStudioDev/TagStudio/pull/344) and partially port [#357](https://github.com/TagStudioDev/TagStudio/pull/357)) by [@BPplays](https://github.com/BPplays) and [@CyanVoxel](https://github.com/CyanVoxel) in [#549](https://github.com/TagStudioDev/TagStudio/pull/549)
|
||||
- fix: catch ImportError for pillow_jxl module by [@CyanVoxel](https://github.com/CyanVoxel) in [a2f9685](https://github.com/TagStudioDev/TagStudio/commit/a2f9685bc0d744ea6f5334c6d2926aad3f6d375a)
|
||||
|
||||
##### Audio Playback
|
||||
|
||||
- feat: audio playback by [@csponge](https://github.com/csponge) in [#576](https://github.com/TagStudioDev/TagStudio/pull/576)
|
||||
- feat(ui): add audio volume slider by [@SkeleyM](https://github.com/SkeleyM) in [#691](https://github.com/TagStudioDev/TagStudio/pull/691)
|
||||
|
||||
##### Thumbnail Caching
|
||||
|
||||
- feat(ui): add thumbnail caching by [@CyanVoxel](https://github.com/CyanVoxel) in [#694](https://github.com/TagStudioDev/TagStudio/pull/694)
|
||||
|
||||
#### Tags
|
||||
|
||||
##### Delete Tags _(Finally!)_
|
||||
|
||||
- feat: remove and create tags from tag database panel by [@DandyDev01](https://github.com/DandyDev01) in [#569](https://github.com/TagStudioDev/TagStudio/pull/569)
|
||||
|
||||
##### New Tag Colors + UI
|
||||
|
||||
- feat: expanded tag color system by [@CyanVoxel](https://github.com/CyanVoxel) in [#709](https://github.com/TagStudioDev/TagStudio/pull/709)
|
||||
- fix(ui): use correct pink tag color by [@CyanVoxel](https://github.com/CyanVoxel) in [431efe4](https://github.com/TagStudioDev/TagStudio/commit/431efe4fe93213141c763e59ca9887215766fd42)
|
||||
- fix(ui): use consistent tag outline colors by [@CyanVoxel](https://github.com/CyanVoxel) in [020a73d](https://github.com/TagStudioDev/TagStudio/commit/020a73d095c74283d6c80426d3c3db8874409952)
|
||||
|
||||
[](https://private-user-images.githubusercontent.com/46939827/408753168-c8f82d89-ad7e-4be6-830e-b91cdc58e4c6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDY2NTUwODcsIm5iZiI6MTc0NjY1NDc4NywicGF0aCI6Ii80NjkzOTgyNy80MDg3NTMxNjgtYzhmODJkODktYWQ3ZS00YmU2LTgzMGUtYjkxY2RjNThlNGM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA1MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTA3VDIxNTMwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI3ZDk2MDg5ODVjYzA2ZGU2Njc1ODE5M2U4OWU4ZGMwY2MxNzUzM2M2YmM2ZmRiMTdlOTkyNGM3MjlhMWNiOWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.0RYUWgVW8VFvu2unzdWHtDCE4USYM77OcMvWeZkd8Hs)
|
||||
|
||||
##### New Tag Alias UI
|
||||
|
||||
- fix: preview panel aliases not staying up to date with database by [@DandyDev01](https://github.com/DandyDev01) in [#641](https://github.com/TagStudioDev/TagStudio/pull/641)
|
||||
- fix: subtags/parent tags & aliases update the UI for building a tag by [@DandyDev01](https://github.com/DandyDev01) in [#534](https://github.com/TagStudioDev/TagStudio/pull/534)
|
||||
|
||||
#### Miscellaneous
|
||||
|
||||
- feat: about section by [@mashed5894](https://github.com/mashed5894) in [#712](https://github.com/TagStudioDev/TagStudio/pull/712)
|
||||
- feat(ui): add configurable splash screens by [@CyanVoxel](https://github.com/CyanVoxel) in [#703](https://github.com/TagStudioDev/TagStudio/pull/703)
|
||||
- feat(ui): show filenames in thumbnail grid by [@CyanVoxel](https://github.com/CyanVoxel) in [#633](https://github.com/TagStudioDev/TagStudio/pull/633)
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix(ui): display all tags in panel during empty search by [@samuellieberman](https://github.com/samuellieberman) in [#328](https://github.com/TagStudioDev/TagStudio/pull/328)
|
||||
- fix: avoid `KeyError` in `add_folders_to_tree()` (fix [#346](https://github.com/TagStudioDev/TagStudio/issues/346)) by [@CyanVoxel](https://github.com/CyanVoxel) in [#347](https://github.com/TagStudioDev/TagStudio/pull/347)
|
||||
- fix: error on closing library by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#484](https://github.com/TagStudioDev/TagStudio/pull/484)
|
||||
- fix: resolution info [#550](https://github.com/TagStudioDev/TagStudio/issues/550) by [@Roc25](https://github.com/Roc25) in [#551](https://github.com/TagStudioDev/TagStudio/pull/551)
|
||||
- fix: remove queued thumnail jobs when closing library by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#583](https://github.com/TagStudioDev/TagStudio/pull/583)
|
||||
- fix: use absolute ffprobe path on macos (Fix [#511](https://github.com/TagStudioDev/TagStudio/issues/511)) by [@CyanVoxel](https://github.com/CyanVoxel) in [#629](https://github.com/TagStudioDev/TagStudio/pull/629)
|
||||
- fix(ui): prevent duplicate parent tags in UI by [@SkeleyM](https://github.com/SkeleyM) in [#665](https://github.com/TagStudioDev/TagStudio/pull/665)
|
||||
- fix: fix -o flag not working if path has whitespace around it by [@python357-1](https://github.com/python357-1) in [#670](https://github.com/TagStudioDev/TagStudio/pull/670)
|
||||
- fix: better file opening compatibility with non-ascii filenames by [@SkeleyM](https://github.com/SkeleyM) in [#667](https://github.com/TagStudioDev/TagStudio/pull/667)
|
||||
- fix: restore environment before launching external programs by [@mashed5894](https://github.com/mashed5894) in [#707](https://github.com/TagStudioDev/TagStudio/pull/707)
|
||||
- fix: have pydub use known ffmpeg + ffprobe locations by [@CyanVoxel](https://github.com/CyanVoxel) in [#724](https://github.com/TagStudioDev/TagStudio/pull/724)
|
||||
- fix: add ".DS_Store" to `GLOBAL_IGNORE_SET` by [@CyanVoxel](https://github.com/CyanVoxel) in [b72a2f2](https://github.com/TagStudioDev/TagStudio/commit/b72a2f233141db4db6aa6be8796b626ebd3f0756)
|
||||
- fix: don't add "._" files to libraries by [@CyanVoxel](https://github.com/CyanVoxel) in [eb1f634](https://github.com/TagStudioDev/TagStudio/commit/eb1f634d386cd8a5ecee1e6ff6a0b7d8811550fa)
|
||||
|
||||
### Changed
|
||||
|
||||
#### SQLite Save File Format
|
||||
|
||||
This was the main focus of this update, and where the majority of development time and resources have been spent since v9.4. These changes include everything that was done to migrate from the JSON format to SQLite starting from the initial SQLite PR, while re-implementing every feature from v9.4 as the initial SQLite PR was based on v9.3.x at the time.
|
||||
|
||||
- refactor!: use SQLite and SQLAlchemy for database backend by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#332](https://github.com/TagStudioDev/TagStudio/pull/332)
|
||||
- feat: make search results more ergonomic by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#498](https://github.com/TagStudioDev/TagStudio/pull/498)
|
||||
- feat: store `Entry` suffix separately by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#503](https://github.com/TagStudioDev/TagStudio/pull/503)
|
||||
- feat: port thumbnail ([#390](https://github.com/TagStudioDev/TagStudio/pull/390)) and related features to v9.5 by [@CyanVoxel](https://github.com/CyanVoxel) in [#522](https://github.com/TagStudioDev/TagStudio/pull/522)
|
||||
- fix: don't check db version with new library by [@yedpodtrzitko](https://github.com/yedpodtrzitko) in [#536](https://github.com/TagStudioDev/TagStudio/pull/536)
|
||||
- fix(ui): update ui when removing fields by [@DandyDev01](https://github.com/DandyDev01) in [#560](https://github.com/TagStudioDev/TagStudio/pull/560)
|
||||
- feat(parity): backend for aliases and parent tags by [@DandyDev01](https://github.com/DandyDev01) in [#596](https://github.com/TagStudioDev/TagStudio/pull/596)
|
||||
- fix: "open in explorer" opens correct folder by [@KirilBourakov](https://github.com/KirilBourakov) in [#603](https://github.com/TagStudioDev/TagStudio/pull/603)
|
||||
- fix: ui/ux parity fixes for thumbnails and files by [@CyanVoxel](https://github.com/CyanVoxel) in [#608](https://github.com/TagStudioDev/TagStudio/pull/608)
|
||||
- feat(parity): migrate json libraries to sqlite by [@CyanVoxel](https://github.com/CyanVoxel) in [#604](https://github.com/TagStudioDev/TagStudio/pull/604)
|
||||
- fix: clear all setting values when opening a library by [@VasigaranAndAngel](https://github.com/VasigaranAndAngel) in [#622](https://github.com/TagStudioDev/TagStudio/pull/622)
|
||||
- fix: remove/rework windows path tests by [@VasigaranAndAngel](https://github.com/VasigaranAndAngel) in [#625](https://github.com/TagStudioDev/TagStudio/pull/625)
|
||||
- fix: add check to see if library is loaded in filter_items by [@Roc25](https://github.com/Roc25) in [#547](https://github.com/TagStudioDev/TagStudio/pull/547)
|
||||
- fix: multiple macro errors by [@Computerdores](https://github.com/Computerdores) in [#612](https://github.com/TagStudioDev/TagStudio/pull/612)
|
||||
- fix: don't allow blank tag alias values in db by [@CyanVoxel](https://github.com/CyanVoxel) in [#628](https://github.com/TagStudioDev/TagStudio/pull/628)
|
||||
- feat: Reimplement drag drop files on sql migration by [@seakrueger](https://github.com/seakrueger) in [#528](https://github.com/TagStudioDev/TagStudio/pull/528)
|
||||
- fix: stop sqlite db from being updated while running tests by [@python357-1](https://github.com/python357-1) in [#648](https://github.com/TagStudioDev/TagStudio/pull/648)
|
||||
- fix: enter/return adds top result tag by [@SkeleyM](https://github.com/SkeleyM) in [#651](https://github.com/TagStudioDev/TagStudio/pull/651)
|
||||
- fix: show correct unlinked files count by [@SkeleyM](https://github.com/SkeleyM) in [#653](https://github.com/TagStudioDev/TagStudio/pull/653)
|
||||
- feat: implement parent tag search by [@Computerdores](https://github.com/Computerdores) in [#673](https://github.com/TagStudioDev/TagStudio/pull/673)
|
||||
- fix: only close add tag menu with no search by [@SkeleyM](https://github.com/SkeleyM) in [#685](https://github.com/TagStudioDev/TagStudio/pull/685)
|
||||
- fix: drag and drop no longer resets by [@SkeleyM](https://github.com/SkeleyM) in [#710](https://github.com/TagStudioDev/TagStudio/pull/710)
|
||||
- feat(ui): port "create and add tag" to main branch by [@SkeleyM](https://github.com/SkeleyM) in [#711](https://github.com/TagStudioDev/TagStudio/pull/711)
|
||||
- fix: don't add default title field, use proper phrasing for adding files by [@CyanVoxel](https://github.com/CyanVoxel) in [#701](https://github.com/TagStudioDev/TagStudio/pull/701)
|
||||
- fix: preview panel + main window fixes and optimizations by [@CyanVoxel](https://github.com/CyanVoxel) in [#700](https://github.com/TagStudioDev/TagStudio/pull/700)
|
||||
- fix: sort tag results by [@mashed5894](https://github.com/mashed5894) in [#721](https://github.com/TagStudioDev/TagStudio/pull/721)
|
||||
- fix: restore opening last library on startup by [@SkeleyM](https://github.com/SkeleyM) in [#729](https://github.com/TagStudioDev/TagStudio/pull/729)
|
||||
- fix(ui): don't always create tag on enter by [@SkeleyM](https://github.com/SkeleyM) in [#731](https://github.com/TagStudioDev/TagStudio/pull/731)
|
||||
- fix: use tag aliases in tag search by [@CyanVoxel](https://github.com/CyanVoxel) in [#726](https://github.com/TagStudioDev/TagStudio/pull/726)
|
||||
- fix: keep initial id order in `get_entries_full()` by [@CyanVoxel](https://github.com/CyanVoxel) in [#736](https://github.com/TagStudioDev/TagStudio/pull/736)
|
||||
- fix: always catch db mismatch by [@CyanVoxel](https://github.com/CyanVoxel) in [#738](https://github.com/TagStudioDev/TagStudio/pull/738)
|
||||
- fix: relink unlinked entry to existing entry without sql error by [@mashed5894](https://github.com/mashed5894) in [#730](https://github.com/TagStudioDev/TagStudio/issues/730)
|
||||
- fix: refactor and fix bugs with missing_files.py by [@CyanVoxel](https://github.com/CyanVoxel) in [#739](https://github.com/TagStudioDev/TagStudio/pull/739)
|
||||
- fix: dragging files references correct entry IDs [@CyanVoxel](https://github.com/CyanVoxel) in [44ff17c](https://github.com/TagStudioDev/TagStudio/commit/44ff17c0b3f05570e356c112f005dbc14c7cc05d)
|
||||
- ui: port splash screen from Alpha-v9.4 by [@CyanVoxel](https://github.com/CyanVoxel) in [af760ee](https://github.com/TagStudioDev/TagStudio/commit/af760ee61a523c84bab0fb03a68d7465866d0e05)
|
||||
- fix: tags created from tag database now add aliases by [@CyanVoxel](https://github.com/CyanVoxel) in [2903dd2](https://github.com/TagStudioDev/TagStudio/commit/2903dd22c45c02498687073d075bb88886de6b62)
|
||||
- fix: check for tag name parity during JSON migration by [@CyanVoxel](https://github.com/CyanVoxel) in [#748](https://github.com/TagStudioDev/TagStudio/pull/748)
|
||||
- feat(ui): re-implement tag display names on sql by [@CyanVoxel](https://github.com/CyanVoxel) in [#747](https://github.com/TagStudioDev/TagStudio/pull/747)
|
||||
- fix(ui): restore Windows accent color on PySide 6.8.0.1 by [@CyanVoxel](https://github.com/CyanVoxel) in [#755](https://github.com/TagStudioDev/TagStudio/pull/755)
|
||||
- fix(ui): (mostly) fix right-click search option on tags by [@CyanVoxel](https://github.com/CyanVoxel) in [#756](https://github.com/TagStudioDev/TagStudio/pull/756)
|
||||
- feat: copy/paste fields and tags by [@mashed5894](https://github.com/mashed5894) in [#722](https://github.com/TagStudioDev/TagStudio/pull/722)
|
||||
|
||||
#### UI/UX
|
||||
|
||||
- feat(ui): pre-select default tag name in `BuildTagPanel` by [@Cool-Game-Dev](https://github.com/Cool-Game-Dev) in [#592](https://github.com/TagStudioDev/TagStudio/pull/592)
|
||||
- feat(ui): keyboard navigation for editing tags by [@Computerdores](https://github.com/Computerdores) in [#407](https://github.com/TagStudioDev/TagStudio/pull/407)
|
||||
- feat(ui): use tag query as default new tag name by [@CyanVoxel](https://github.com/CyanVoxel) in [29c0dfd](https://github.com/TagStudioDev/TagStudio/commit/29c0dfdb2d88e8f473e27c7f1fe7ede6e5bd0feb)
|
||||
- feat(ui): shortcut to add tags to selected entries; change click behavior of tags to edit by [@CyanVoxel](https://github.com/CyanVoxel) in [#749](https://github.com/TagStudioDev/TagStudio/pull/749)
|
||||
- fix(ui): use consistent dark mode colors for all systems by [@CyanVoxel](https://github.com/CyanVoxel) in [#752](https://github.com/TagStudioDev/TagStudio/pull/752)
|
||||
- fix(ui): use camera white balance for raw images by [@CyanVoxel](https://github.com/CyanVoxel) in [6ee5304](https://github.com/TagStudioDev/TagStudio/commit/6ee5304b52f217af0f5df543fcb389649203d6b2)
|
||||
- Mixed field editing has been limited due to various bugs in both the JSON and SQL implementations. This will be re-implemented in a future release.
|
||||
|
||||
#### Performance
|
||||
|
||||
- feat: improve performance of "Delete Missing Entries" by [@Toby222](https://github.com/Toby222) and [@Computerdores](https://github.com/Computerdores) in [#696](https://github.com/TagStudioDev/TagStudio/pull/696)
|
||||
|
||||
#### Internal Changes
|
||||
|
||||
- refactor: combine open launch args by [@UnusualEgg](https://github.com/UnusualEgg) in [#364](https://github.com/TagStudioDev/TagStudio/pull/364)
|
||||
- feat: add date_created, date_modified, and date_added columns to entries table by [@CyanVoxel](https://github.com/CyanVoxel) in [#740](https://github.com/TagStudioDev/TagStudio/pull/740)
|
||||
|
||||
## [9.4.2] - 2024-12-01
|
||||
|
||||
### Added/Fixed
|
||||
|
||||
- Create auto-backup of library for use in save failures (Fix [#343](https://github.com/TagStudioDev/TagStudio/issues/343)) by [@CyanVoxel](https://github.com/CyanVoxel) in [#554](https://github.com/TagStudioDev/TagStudio/pull/554)
|
||||
|
||||
## [9.4.1] - 2024-09-13
|
||||
|
||||
### Added
|
||||
|
||||
- Warn user if FFmpeg is not installed
|
||||
- Support for `.raf` and `.orf` raw image thumbnails and previews
|
||||
|
||||
### Fixed
|
||||
|
||||
- Use `birthtime` for file creation time on Mac & Windows
|
||||
- Use audio icon fallback when FFmpeg is not detected
|
||||
- Retain search query upon directory refresh
|
||||
|
||||
### Changed
|
||||
|
||||
- Significantly improve file re-scanning performance
|
||||
|
||||
## [9.4.0] - 2024-09-03
|
||||
|
||||
### Added
|
||||
|
||||
- Copy and paste fields
|
||||
- Add multiple fields at once
|
||||
- Drag and drop files in/out of the program
|
||||
- Files can be shared by dragging them from the thumbnail grid to other programs
|
||||
- Files can be added to library folder by dragging them into the program
|
||||
- Manage Python virtual environment in Nix flake
|
||||
- Ability to create tag when adding tags
|
||||
- Blender preview thumbnail support
|
||||
- File deletion/trashing
|
||||
- Added right-click option on thumbnails and preview panel to delete files
|
||||
- Added Edit Menu option for deleting files
|
||||
- Added <kbd>Delete</kbd> key shortcut for deleting files
|
||||
- Font preview thumbnail support
|
||||
- Short "Aa" previews for thumbnails
|
||||
- Full alphabet preview for the preview pane
|
||||
- Sort tags by alphabetical/color
|
||||
- File explorer action follows OS naming
|
||||
- Preview Source Engine files
|
||||
- Expanded thumbnail and preview features
|
||||
- Add album cover art thumbnails
|
||||
- Add audio waveform thumbnails for audio files without embedded cover art
|
||||
- Add new default file thumbnails, both for generic and specific file types
|
||||
- Change the unlinked file icon to better convey its meaning
|
||||
- Add dropdown for different thumbnail sizes
|
||||
- Show File Creation and Modified dates; Restyle file path label
|
||||
|
||||
### Fixed
|
||||
|
||||
- Backslashes in f-string on file dupe widget
|
||||
- Tags not shown when none searched
|
||||
- Avoid error from eagerly grabbing data values
|
||||
- Correct behavior for tag search options
|
||||
- Load Gallery-DL sidecar files correctly
|
||||
- Correct duplicate file matching
|
||||
- GPU hardware acceleration in Nix flake
|
||||
- Suppress command prompt windows for FFmpeg in builds
|
||||
|
||||
### Internal Changes
|
||||
|
||||
- Move type constants to media classes
|
||||
- Combine open launch arguments
|
||||
- Revamp Nix flake with devenv/direnv in cb4798b
|
||||
- Remove impurity of Nix flake when used with direnv in bc38e56
|
||||
|
||||
## [9.3.2] - 2024-07-18
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix signal log warning
|
||||
- Fix "Folders to Tags" feature
|
||||
- Fix search ignoring case of extension list
|
||||
|
||||
### Internal Changes
|
||||
|
||||
- Add tests into CI by
|
||||
- Create testing library files ad-hoc
|
||||
- Refactoring: centralize field IDs
|
||||
- Update to pyside6 version 6.7.1
|
||||
|
||||
## [9.3.1] - 2024-06-13
|
||||
|
||||
### Fixed
|
||||
|
||||
- Separately pin QT nixpkg version
|
||||
- Bugfix for #252, don't attempt to read video file if invalid or 0 frames long
|
||||
- Toggle Mouse Event Transparency on ItemThumbs
|
||||
- Refactor `video_player.py`
|
||||
|
||||
## [9.3.0] - 2024-06-08
|
||||
|
||||
### Added
|
||||
|
||||
- Added playback previews for video files
|
||||
- Added Boolean "and/or" search mode selection
|
||||
- Added ability to scan and fix duplicate entries (not to be confused with duplicate files) from the "Fix Unlinked Entries" menu
|
||||
- Added “Select All” (<kbd>Ctrl</kbd>+<kbd>A</kbd> / <kbd>⌘ Command</kbd>+<kbd>A</kbd>) hotkey for the library grid view
|
||||
- Added "Clear Selection" hotkey (<kbd>Esc</kbd>) for the library grid view
|
||||
- Added the ability to invert the file extension inclusion list into an exclusion list
|
||||
- Added default landing page when no library is open
|
||||
|
||||
### Fixed
|
||||
|
||||
- TagStudio will no longer attempt to or allow you to reopen a library from a missing location
|
||||
- Fixed `PermissionError` when attempting to access files with a higher permission level upon scanning the library directory
|
||||
- Fixed RAW image previews sometimes not loadingand
|
||||
- Fixed most non-UTF-8 encoded text files from not being able to be previewed
|
||||
- Fixed "Refresh Directories"/"Fix Unlinked Entries" creating duplicate entries
|
||||
- Other miscellaneous fixes
|
||||
|
||||
### Changed
|
||||
|
||||
- Renamed "Subtags" to "Parent Tags" to help better describe their function
|
||||
- Increased number of tags shown by default in the "Add Tag" modal from 29 to 100
|
||||
- Documentation is now split into individual linked files and updated to include future features
|
||||
- Replaced use of `os.path` with `pathlib`
|
||||
- `.cr2` files are now included in the list of RAW image file types
|
||||
- Minimum supported macOS version raised to 12.0
|
||||
|
||||
## [9.2.1] - 2024-05-23
|
||||
|
||||
### Added
|
||||
|
||||
- Basic thumbnail/preview support for RAW images (currently `.raw`, `.dng`, `.rw2`, `.nef`, `.arw`, `.crw`, `.cr3`)
|
||||
- NOTE: These previews are currently slow to load given the nature of rendering them. In the future once thumbnail caching is added, this process should only happen once.
|
||||
- Thumbnail/preview support for HEIF images
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed sidebar not expanding horizontally
|
||||
- Fixed "Recent Library" list not updating when creating a new library
|
||||
- Fixed palletized images not loading with alpha channels
|
||||
- Low resolution images (such as pixel art) now render with crisp edges in thumbnails and previews
|
||||
- Fixed visual bug where the edit icon would show for incorrect fields
|
||||
|
||||
## [9.2.0] - 2024-05-14
|
||||
|
||||
### Added
|
||||
|
||||
- Full macOS and Linux support
|
||||
- Ability to apply tags to multiple selections at once
|
||||
- Right-click context menu for opening files or their locations
|
||||
- Support for all filetypes inside of the library
|
||||
- Configurable filetype blacklist
|
||||
- Option to automatically open last used library on startup
|
||||
- Tool to convert folder structure to tag tree
|
||||
- SIGTERM handling in console window
|
||||
- Keyboard shortcuts for basic functions
|
||||
- Basic support for plaintext thumbnails
|
||||
- Default icon for files with no thumbnail support
|
||||
- Menu action to close library
|
||||
- All tags now show in the "Add Tag" panel by default
|
||||
- Modal view to view and manage all library tags
|
||||
- Build scripts for Windows and macOS
|
||||
- Help menu option to visit the GitHub repository
|
||||
- Toggleable "Recent Libraries" list in the entry side panel
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed errors when performing actions with no library open
|
||||
- Fixed bug where built-in tags were duplicated upon saving
|
||||
- QThreads are now properly terminated on application exit
|
||||
- Images with rotational EXIF data are now properly displayed
|
||||
- Fixed "truncated" images causing errors
|
||||
- Fixed images with large resolutions causing errors
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated minimum Python version to 3.12
|
||||
- Various UI improvements
|
||||
- Improved legibility of the Light Theme (still a WIP)
|
||||
- Updated Dark Theme
|
||||
- Added hand cursor to several clickable elements
|
||||
- Fixed network paths not being able to load
|
||||
- Various code cleanup and refactoring
|
||||
- New application icons
|
||||
|
||||
### Known Issues
|
||||
|
||||
- Using and editing multiple entry fields of the same type may result in incorrect field(s) being updated
|
||||
- Adding Favorite or Archived tags via the thumbnail badges may apply the tag(s) to incorrect fields
|
||||
- Searching for tag names with spaces does not currently function as intended
|
||||
- A temporary workaround it to omit spaces in tag names when searching
|
||||
- Sorting fields using the "Sort Fields" macro may result in edit icons being shown for incorrect fields
|
||||
|
||||
## [9.1.0] - 2024-04-22
|
||||
|
||||
### Added
|
||||
|
||||
- Initial public release
|
||||
1
CHANGELOG.md
Symbolic link
@@ -0,0 +1 @@
|
||||
docs/changelog.md
|
||||
150
CONTRIBUTING.md
@@ -1,150 +0,0 @@
|
||||
# Contributing to TagStudio
|
||||
|
||||
_Last Updated: March 8th, 2025_
|
||||
|
||||
Thank you so much for showing interest in contributing to TagStudio! Here are a set of instructions and guidelines for contributing code or documentation to the project. This document will change over time, so make sure that your contributions still line up with the requirements here before submitting a pull request.
|
||||
|
||||
## Getting Started
|
||||
|
||||
- Check the [Feature Roadmap](/docs/updates/roadmap.md) page to see what priority features there are, the [FAQ](/README.md/#faq), as well as the project's [Issues](https://github.com/TagStudioDev/TagStudio/issues) and [Pull Requests](https://github.com/TagStudioDev/TagStudio/pulls).
|
||||
- If you'd like to add a feature that isn't on the feature roadmap or doesn't have an open issue, **PLEASE create a feature request** issue for it discussing your intentions so any feedback or important information can be given by the team first.
|
||||
- We don't want you wasting time developing a feature or making a change that can't/won't be added for any reason ranging from pre-existing refactors to design philosophy differences.
|
||||
- **Please don't** create pull requests that consist of large refactors, _especially_ without discussing them with us first. These end up doing more harm than good for the project by continuously delaying progress and disrupting everyone else's work.
|
||||
- If you wish to discuss TagStudio further, feel free to join the [Discord Server](https://discord.com/invite/hRNnVKhF2G)!
|
||||
|
||||
### Contribution Checklist
|
||||
|
||||
- I've read the [Feature Roadmap](/docs/updates/roadmap.md) page
|
||||
- I've read the [FAQ](/README.md/#faq), including the "[Features I Likely Won't Add/Pull](/README.md/#features-i-likely-wont-addpull)" section
|
||||
- I've checked the project's [Issues](https://github.com/TagStudioDev/TagStudio/issues) and [Pull Requests](https://github.com/TagStudioDev/TagStudio/pulls)
|
||||
- **I've created a new issue for my feature/fix _before_ starting work on it**, or have at least notified others in the relevant existing issue(s) of my intention to work on it
|
||||
- I've set up my development environment including Ruff, Mypy, and PyTest
|
||||
- I've read the [Code Guidelines](#code-guidelines) and/or [Documentation Guidelines](#documentation-guidelines)
|
||||
- **_I mean it, I've found or created an issue for my feature/fix!_**
|
||||
|
||||
> [!NOTE]
|
||||
> If the fix is small and self-explanatory (i.e. a typo), then it doesn't require an issue to be opened first. Issue tracking is supposed to make our lives easier, not harder. Please use your best judgement to minimize the amount of work for everyone involved.
|
||||
|
||||
## Creating a Development Environment
|
||||
|
||||
If you wish to develop for TagStudio, you'll need to create a development environment by installing the required dependencies. You have a number of options depending on your level of experience and familiarly with existing Python toolchains.
|
||||
|
||||
If you know what you're doing and have developed for Python projects in the past, you can get started quickly with the "Brief Instructions" below. Otherwise, please see the full instructions on the documentation website for "[Creating a Development Environment](https://docs.tagstud.io/install/#creating-a-development-environment)".
|
||||
|
||||
### Brief Instructions
|
||||
|
||||
1. Have [Python 3.12](https://www.python.org/downloads/) and PIP installed. Also have [FFmpeg](https://ffmpeg.org/download.html) installed if you wish to have audio/video playback and thumbnails.
|
||||
2. Clone the repository to the folder of your choosing:
|
||||
```
|
||||
git clone https://github.com/TagStudioDev/TagStudio.git
|
||||
```
|
||||
3. Use a dependency manager such as [uv](https://docs.astral.sh/uv/) or [Poetry 2.0](https://python-poetry.org/blog/category/releases/) to install the required dependencies, or alternatively create and activate a [virtual environment](https://docs.tagstud.io/install/#manual-installation) with `venv`.
|
||||
|
||||
4. If using a virtual environment instead of a dependency manager, install an editable version of the program and development dependencies with the following PIP command:
|
||||
|
||||
```
|
||||
pip install -e ".[dev]"
|
||||
```
|
||||
|
||||
Otherwise, modify the command above for use with your dependency manager of choice. For example if using uv, you may use this:
|
||||
|
||||
```
|
||||
uv pip install -e ".[dev]"
|
||||
```
|
||||
|
||||
## Workflow Checks
|
||||
|
||||
When pushing your code, several automated workflows will check it against predefined tests and style checks. It's _highly recommended_ that you run these checks locally beforehand to avoid having to fight back-and-forth with the workflow checks inside your pull requests.
|
||||
|
||||
> [!TIP]
|
||||
> To format the code automatically before each commit, there's a configured action available for the `pre-commit` hook. Install it by running `pre-commit install`. The hook will be executed each time on running `git commit`.
|
||||
|
||||
### [Ruff](https://github.com/astral-sh/ruff)
|
||||
|
||||
A Python linter and code formatter. Ruff uses the `pyproject.toml` as its config file and runs whenever code is pushed or pulled into the project.
|
||||
|
||||
#### Running Locally
|
||||
|
||||
Inside the root repository directory:
|
||||
|
||||
- Lint code with `ruff check`
|
||||
- Some linting suggestions can be automatically formatted with `ruff check --fix`
|
||||
- Format code with `ruff format`
|
||||
|
||||
Ruff should automatically discover the configuration options inside the [pyproject.toml](https://github.com/TagStudioDev/TagStudio/blob/main/pyproject.toml) file. For more information, see the [ruff configuration discovery docs](https://docs.astral.sh/ruff/configuration/#config-file-discovery).
|
||||
|
||||
Ruff is also available as a VS Code [extension](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff), PyCharm [plugin](https://plugins.jetbrains.com/plugin/20574-ruff), and [more](https://docs.astral.sh/ruff/integrations/).
|
||||
|
||||
### [Mypy](https://github.com/python/mypy)
|
||||
|
||||
Mypy is a static type checker for Python. It sure has a lot to say sometimes, but we recommend you take its advice when possible. Mypy also uses the `pyproject.toml` as its config file and runs whenever code is pushed or pulled into the project.
|
||||
|
||||
#### Running Locally
|
||||
|
||||
- **(First time only)** Run the following:
|
||||
- `mkdir -p .mypy_cache`
|
||||
- `mypy --install-types --non-interactive`
|
||||
- You can now check code by running `mypy --config-file pyproject.toml .` in the repository root. _(Don't forget the "." at the end!)_
|
||||
|
||||
Mypy is also available as a VS Code [extension](https://marketplace.visualstudio.com/items?itemName=matangover.mypy), PyCharm [plugin](https://plugins.jetbrains.com/plugin/11086-mypy), and [more](https://plugins.jetbrains.com/plugin/11086-mypy).
|
||||
|
||||
### PyTest
|
||||
|
||||
- Run all tests by running `pytest tests/` in the repository root.
|
||||
|
||||
## Code Style
|
||||
See the [Style Guide](/STYLE.md)
|
||||
|
||||
### Modules & Implementations
|
||||
|
||||
- **Do not** modify legacy library code in the `src/core/library/json/` directory
|
||||
- Avoid direct calls to `os`
|
||||
- Use `Pathlib` library instead of `os.path`
|
||||
- Use `platform.system()` instead of `os.name` and `sys.platform`
|
||||
- Don't prepend local imports with `tagstudio`, stick to `src`
|
||||
- Use the `logger` system instead of `print` statements
|
||||
- Avoid nested f-strings
|
||||
- Use HTML-like tags inside Qt widgets over stylesheets where possible
|
||||
|
||||
### Commit and Pull Request Style
|
||||
|
||||
- Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0) as a guideline for commit messages. This allows us to easily generate changelogs for releases.
|
||||
- See some [examples](https://www.conventionalcommits.org/en/v1.0.0/#examples) of what this looks like in practice.
|
||||
- Use clear and concise commit messages. If your commit does too much, either consider breaking it up into smaller commits or providing extra detail in the commit description.
|
||||
- Pull requests should have an adequate title and description which clearly outline your intentions and changes/additions. Feel free to provide screenshots, GIFs, or videos, especially for UI changes.
|
||||
- Pull requests should ideally be limited to **a single** feature or fix.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Please do not force push if your PR is open for review!
|
||||
>
|
||||
> Force pushing makes it impossible to discern which changes have already been reviewed and which haven't. This means a reviewer will then have to re-review all the already reviewed code, which is a lot of unnecessary work for reviewers.
|
||||
|
||||
> [!TIP]
|
||||
> If you're unsure where to stop the scope of your PR, ask yourself: _"If I broke this up, could any parts of it still be used by the project in the meantime?"_
|
||||
|
||||
### Runtime Requirements
|
||||
|
||||
- Final code must function on supported versions of Windows, macOS, and Linux:
|
||||
- Windows: 10, 11
|
||||
- macOS: 13.0+
|
||||
- Linux: _Varies_
|
||||
- Final code must **_NOT:_**
|
||||
- Contain superfluous or unnecessary logging statements
|
||||
- Cause unreasonable slowdowns to the program outside of a progress-indicated task
|
||||
- Cause undesirable visual glitches or artifacts on screen
|
||||
|
||||
## Documentation Guidelines
|
||||
|
||||
Documentation contributions include anything inside of the `docs/` folder, as well as the `README.md` and `CONTRIBUTING.md` files. Documentation inside the `docs/` folder is built and hosted on our static documentation site, [docs.tagstud.io](https://docs.tagstud.io/).
|
||||
|
||||
- Use "[snake_case](https://developer.mozilla.org/en-US/docs/Glossary/Snake_case)" for file and folder names
|
||||
- Follow the folder structure pattern
|
||||
- Don't add images or other media with excessively large file sizes
|
||||
- Provide alt text for all embedded media
|
||||
- Use "[Title Case](https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case)" for title capitalization
|
||||
|
||||
## Translation Guidelines
|
||||
|
||||
Translations are performed on the TagStudio [Weblate project](https://hosted.weblate.org/projects/tagstudio/).
|
||||
|
||||
_Translation guidelines coming soon._
|
||||
1
CONTRIBUTING.md
Symbolic link
@@ -0,0 +1 @@
|
||||
docs/contributing.md
|
||||
286
README.md
@@ -1,120 +1,92 @@
|
||||
# TagStudio: A User-Focused Document Management System
|
||||
# TagStudio: A User-Focused Photo & File Management System
|
||||
|
||||
[](https://hosted.weblate.org/projects/tagstudio/strings/)
|
||||
[](https://github.com/TagStudioDev/TagStudio/releases)
|
||||
[](https://hosted.weblate.org/projects/tagstudio/strings/)
|
||||
[](https://github.com/TagStudioDev/TagStudio/actions/workflows/pytest.yaml)
|
||||
[](https://github.com/TagStudioDev/TagStudio/actions/workflows/mypy.yaml)
|
||||
[](https://github.com/TagStudioDev/TagStudio/actions/workflows/ruff.yaml)
|
||||
[](https://github.com/TagStudioDev/TagStudio/releases)
|
||||
|
||||
<p align="center">
|
||||
<img width="60%" src="docs/assets/github_header.png">
|
||||
<img width="60%" src="docs/assets/ts-9-3_logo_text.png">
|
||||
</p>
|
||||
|
||||
TagStudio is a photo & file organization application with an underlying tag-based system that focuses on giving freedom and flexibility to the user. No proprietary programs or formats, no sea of sidecar files, and no complete upheaval of your filesystem structure. **Read the documentation and more at [docs.tagstud.io](https://docs.tagstud.io)!**
|
||||
|
||||
> [!NOTE]
|
||||
> Thank you for being patient as we've migrated our database backend from JSON to SQL! The previous warnings about the main branch being experimental and unsupported have now been removed, and any pre-existing library save files created with official TagStudio releases are able to be opened and migrated with the new v9.5+ releases!
|
||||
|
||||
> [!IMPORTANT]
|
||||
> This project is still in an early state. There are many missing optimizations and QoL features, as well as the presence of general quirks and occasional jankiness. Making frequent backups of your library save data is **always** important, regardless of what state the program is in.
|
||||
>
|
||||
> With this in mind, TagStudio will _NOT:_
|
||||
>
|
||||
> - Touch, move, or mess with your files in any way _(unless explicitly using the "Delete File(s)" feature, which is locked behind a confirmation dialog)_.
|
||||
> - Ask you to recreate your tags or libraries after new releases. It's our highest priority to ensure that your data safely and smoothly transfers over to newer versions.
|
||||
> - Cause you to suddenly be able to recall your 10 trillion downloaded images that you probably haven't even seen firsthand before. You're in control here, and even tools out there that use machine learning still needed to be verified by human eyes before being deemed accurate.
|
||||
|
||||
<p align="center">
|
||||
<img width="80%" src="docs/assets/screenshot.png" alt="TagStudio Screenshot">
|
||||
</p>
|
||||
<p align="center">
|
||||
<i>TagStudio Alpha v9.5.0 running on macOS Sequoia.</i>
|
||||
<i>TagStudio Alpha v9.5.5 running on macOS Sequoia.</i>
|
||||
</p>
|
||||
|
||||
## Contents
|
||||
|
||||
- [Goals](#goals)
|
||||
- [Priorities](#priorities)
|
||||
- [Current Features](#current-features)
|
||||
- [Contributing](#contributing)
|
||||
- [Feature Highlights](#feature-highlights)
|
||||
- [Basic Usage](#basic-usage)
|
||||
- [Installation](#installation)
|
||||
- [Usage](#usage)
|
||||
- [Goals & Priorities](#goals--priorities)
|
||||
- [FAQ](#faq)
|
||||
|
||||
## Goals
|
||||
|
||||
- To achieve a portable, private, extensible, open-format, and feature-rich system of organizing and rediscovering files.
|
||||
- To provide powerful methods for organization, notably the concept of tag inheritance, or "taggable tags" _(and in the near future, the combination of composition-based tags)._
|
||||
- To create an implementation of such a system that is resilient against a user’s actions outside the program (modifying, moving, or renaming files) while also not burdening the user with mandatory sidecar files or requiring them to change their existing file structures and workflows.
|
||||
- To support a wide range of users spanning across different platforms, multi-user setups, and those with large (several terabyte) libraries.
|
||||
- To make the dang thing look nice, too. It’s 2025, not 1995.
|
||||
|
||||
## Priorities
|
||||
|
||||
1. **The concept.** Even if TagStudio as an application fails, I’d hope that the idea lives on in a superior project. The [goals](#goals) outlined above don’t reference TagStudio once - _TagStudio_ is what references the _goals._
|
||||
2. **The system.** Frontends and implementations can vary, as they should. The core underlying metadata management system is what should be interoperable between different frontends, programs, and operating systems. A standard implementation for this should settle as development continues. This opens up the doors for improved and varied clients, integration with third-party applications, and more.
|
||||
3. **The application.** If nothing else, TagStudio the application serves as the first (and so far only) implementation for this system of metadata management. This has the responsibility of doing the idea justice and showing just what’s possible when it comes to user file management.
|
||||
4. (The name.) I think it’s fine for an app or client, but it doesn’t really make sense for a system or standard. I suppose this will evolve with time...
|
||||
|
||||
## Contributing
|
||||
|
||||
If you're interested in contributing to TagStudio, please take a look at the [contribution guidelines](/CONTRIBUTING.md) for how to get started!
|
||||
|
||||
Translation hosting generously provided by [Weblate](https://weblate.org/en/). Check out our [project page](https://hosted.weblate.org/projects/tagstudio/) to help translate TagStudio!
|
||||
|
||||
## Current Features
|
||||
## Feature Highlights
|
||||
|
||||
### Libraries
|
||||
|
||||
- Create libraries/vaults centered around a system directory. Libraries contain a series of entries: the representations of your files combined with metadata fields. Each entry represents a file in your library’s directory, and is linked to its location.
|
||||
- Address moved, deleted, or otherwise "unlinked" files by using the "Fix Unlinked Entries" option in the Tools menu.
|
||||
A TagStudio library contains all of your tags, fields for a set of files based on one of your system directories. Similar to how Obsidian [vaults](https://help.obsidian.md/vault) function, TagStudio libraries act as a layer on top of your existing folders and file structure, and don't require your to move or duplicate files.
|
||||
|
||||
### Tagging + Custom Metadata
|
||||
TagStudio places a `.TagStudio` folder in the folder you open as a library. Files included in your library are referred to as "entries", and are kept track of inside of a SQLite database inside the `.TagStudio` folder along with tags and other library data.
|
||||
|
||||
- Add custom powerful tags to your library entries
|
||||
- Add metadata to your library entries, including:
|
||||
- Name, Author, Artist (Single-Line Text Fields)
|
||||
- Description, Notes (Multiline Text Fields)
|
||||
- Create rich tags composed of a name, color, a list of aliases, and a list of "parent tags" - these being tags in which these tags inherit values from.
|
||||
- Copy and paste tags and fields across file entries
|
||||
- Automatically organize tags into groups based on parent tags marked as "categories"
|
||||
- Generate tags from your existing folder structure with the "Folders to Tags" macro (NOTE: these tags do NOT sync with folders after they are created)
|
||||
### File Entries
|
||||
|
||||
### Search
|
||||
All file types are supported in TagStudio libraries, just not all have dedicated preview support. For a full list of filetypes with supported previews, see the "[Supported Previews](https://docs.tagstud.io/preview-support)" page on the documentation site. There's also playback support for videos, audio files, and supported animated image formats.
|
||||
|
||||
For a generalized list of what's currently supported:
|
||||
|
||||
- **Images**
|
||||
- Raster Images (JPEG, PNG, etc.)
|
||||
- Vector (SVG)
|
||||
- Animated (GIF, WEBP, APNG)
|
||||
- RAW Formats
|
||||
- **Videos**
|
||||
- **Plaintext Files**
|
||||
- **Documents** _(If supported)_
|
||||
- **eBooks** _(If supported)_
|
||||
- **Photoshop PSDs**, **Blender Projects**, **Krita Projects**, and more!
|
||||
|
||||
### [Tags](https://docs.tagstud.io/tags) and [Fields](https://docs.tagstud.io/fields)
|
||||
|
||||
Tags represent an object or attribute - this could be a person, place, object, concept, and more. Unlike most tagging systems, TagStudio tags are not solely represented by a line of text or a hashtag. Tags in TagStudio consist of several properties and relationships that give extra customization, searching power, and ease of tagging that cannot be achieved by string-based tags alone. TagStudio tags are designed to be as simple or as complex as you'd like, giving options to users of all skill levels and use cases.
|
||||
|
||||
Tags currently consist of the following attributes:
|
||||
|
||||
- **Name**: The full name for your tag. **_This does NOT have to be unique!_**
|
||||
- **Shorthand Name**: The shortest alternate name for your tag, used for abbreviations.
|
||||
- **Aliases**: Alternate names your tag goes by.
|
||||
- **Color**: The display color of your tag.
|
||||
- **Parent Tags**: Other tags in which this tag inherits from. In practice, this means that this tag can be substituted in searches for any listed parent tags.
|
||||
- Parent tags checked with the "disambiguation" checkbox next to them will be used to help disambiguate tag names that may not be unique.
|
||||
- For example: If you had a tag for "Freddy Fazbear", you might add "Five Nights at Freddy's" as one of the parent tags. If the disambiguation box is checked next to "Five Nights at Freddy's" parent tag, then the tag "Freddy Fazbear" will display as "Freddy Fazbear (Five Nights at Freddy's)". Furthermore, if the "Five Nights at Freddy's" tag has a shorthand like "FNAF", then the "Freddy Fazbear" tag will display as "Freddy Fazbear (FNAF)".
|
||||
- **Is Category**: A property that when checked, treats this tag as a category in the preview panel.
|
||||
|
||||
Fields, like tags, are additional pieces of custom metadata that you can add to your file entries. Fields currently have several hardcoded names (e.g. "Title", "Author", "Series") but custom field names are planned for an upcoming update.
|
||||
|
||||
Field types currently include:
|
||||
|
||||
- **Text Lines**: Single lines of text.
|
||||
- **Text Boxes**: Multi-line pieces of text.
|
||||
- **Datetimes**: Dates and times.
|
||||
|
||||
### [Search](https://docs.tagstud.io/search)
|
||||
|
||||
- Search for file entries based on tags, file path (`path:`), file types (`filetype:`), and even media types! (`mediatype:`). Path searches currently use [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) syntax, so you may need to wrap your filename or filepath in asterisks while searching. This will not be strictly necessary in future versions of the program.
|
||||
- Use and combine boolean operators (`AND`, `OR`, `NOT`) along with parentheses groups, quotation escaping, and underscore substitution to create detailed search queries
|
||||
- Use special search conditions (`special:untagged` and `special:empty`) to find file entries without tags or fields, respectively
|
||||
|
||||
### File Entries
|
||||
## Basic Usage
|
||||
|
||||
- Nearly all file types are supported in TagStudio libraries - just not all have dedicated thumbnail support.
|
||||
- Preview most image file types, animated GIFs, videos, plain text documents, audio files, Blender projects, and more!
|
||||
- Open files or file locations by right-clicking on thumbnails and previews and selecting the respective context menu options. You can also click on the preview panel image to open the file, and click the file path label to open its location.
|
||||
- Delete files from both your library and drive by right-clicking the thumbnail(s) and selecting the "Move to Trash"/"Move to Recycle Bin" option.
|
||||
|
||||
> [!NOTE]
|
||||
> For more information on the project itself, please see the [FAQ](#faq) section as well as the [documentation](https://docs.tagstud.io/)!
|
||||
|
||||
## Installation
|
||||
|
||||
To download executable builds of TagStudio, visit the [Releases](https://github.com/TagStudioDev/TagStudio/releases) page of the GitHub repository and download the latest release for your system under the "Assets" section at the bottom of the release.
|
||||
|
||||
TagStudio has builds for **Windows**, **macOS** _(Apple Silicon & Intel)_, and **Linux**. We also offer portable releases for Windows and Linux which are self-contained and easier to move around.
|
||||
|
||||
For detailed instructions, installation help, and instructions for developing for TagStudio, please see the "[Installation](https://docs.tagstud.io/install/)" page on our documentation website.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
> [!CAUTION]
|
||||
> **We do not currently publish TagStudio to any package managers. Any TagStudio distributions outside of the GitHub [Releases](https://github.com/TagStudioDev/TagStudio/releases) page are _unofficial_ and not maintained by us.**
|
||||
>
|
||||
> Installation support will not be given to users installing from unofficial sources. Use these versions at your own risk!
|
||||
|
||||
### Third-Party Dependencies
|
||||
|
||||
For video thumbnails and playback, you'll also need [FFmpeg](https://ffmpeg.org/download.html) installed on your system. If you encounter any issues with this, please reference our [FFmpeg Help](/docs/help/ffmpeg.md) guide.
|
||||
|
||||
## Usage
|
||||
> [!TIP]
|
||||
> For more usage instructions, see the [documentation site](https://docs.tagstud.io/libraries)!
|
||||
|
||||
### Creating/Opening a Library
|
||||
|
||||
@@ -122,50 +94,36 @@ With TagStudio opened, start by creating a new library or opening an existing on
|
||||
|
||||
### Refreshing the Library
|
||||
|
||||
Libraries under 10,000 files automatically scan for new or modified files when opened. In order to refresh the library manually, select "Refresh Directories" under the File menu.
|
||||
|
||||
### Adding Tags to File Entries
|
||||
|
||||
Access the "Add Tag" search box by either clicking on the "Add Tag" button at the bottom of the right sidebar, accessing the "Add Tags to Selected" option from the File menu, or by pressing <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd>.
|
||||
|
||||
From here you can search for existing tags or create a new one if the one you're looking for doesn't exist. Click the "+" button next to any tags you want to to the currently selected file entries. To quickly add the top result, press the <kbd>Enter</kbd>/<kbd>Return</kbd> key to add the the topmost tag and reset the tag search. Press <kbd>Enter</kbd>/<kbd>Return</kbd> once more to close the dialog box. By using this method, you can quickly add various tags in quick succession just by using the keyboard!
|
||||
|
||||
To remove a tag from a file entry, hover over the tag in the preview panel and click on the "-" icon that appears.
|
||||
|
||||
### Adding Metadata to File Entries
|
||||
|
||||
To add a metadata field to a file entry, start by clicking the "Add Field" button at the bottom of the preview panel. From the dropdown menu, select the type of metadata field you’d like to add to the entry
|
||||
|
||||
### Editing Metadata Fields
|
||||
|
||||
#### Text Line / Text Box
|
||||
|
||||
Hover over the field and click the pencil icon. From there, add or edit text in the dialog box popup.
|
||||
|
||||
> [!WARNING]
|
||||
> Keyboard control and navigation is currently _very_ buggy, but will be improved in future versions.
|
||||
Libraries under 10,000 files automatically scan for new or modified files when opened. In order to refresh the library manually, select "Refresh Directories" under the File menu or by pressing <kbd>Ctrl</kbd></kbd>+<kbd>R</kbd> (macOS: <kbd>⌘ Command</kbd>+<kbd>R</kbd>).
|
||||
|
||||
### Creating Tags
|
||||
|
||||
Create a new tag by accessing the "New Tag" option from the Edit menu or by pressing <kbd>Ctrl</kbd>+<kbd>T</kbd>. In the tag creation panel, enter a tag name, optional shorthand name, optional tag aliases, optional parent tags, and an optional color.
|
||||
|
||||
- The tag **name** is the base name of the tag. **_This does NOT have to be unique!_**
|
||||
- The tag **shorthand** is a special type of alias that displays in situations where screen space is more valuable, notably with name disambiguation.
|
||||
- **Aliases** are alternate names for a tag. These let you search for terms other than the exact tag name in order to find the tag again.
|
||||
- **Parent Tags** are tags in which this this tag can substitute for in searches. In other words, tags under this section are parents of this tag.
|
||||
- Parent tags with the disambiguation check next to them will be used to help disambiguate tag names that may not be unique.
|
||||
- For example: If you had a tag for "Freddy Fazbear", you might add "Five Nights at Freddy's" as one of the parent tags. If the disambiguation box is checked next to "Five Nights at Freddy's" parent tag, then the tag "Freddy Fazbear" will display as "Freddy Fazbear (Five Nights at Freddy's)". Furthermore, if the "Five Nights at Freddy's" tag has a shorthand like "FNAF", then the "Freddy Fazbear" tag will display as "Freddy Fazbear (FNAF)".
|
||||
- The **color** option lets you select an optional color palette to use for your tag.
|
||||
- The **"Is Category"** property lets you treat this tag as a category under which itself and any child tags inheriting from it will be sorted by inside the preview panel.
|
||||
Create a new tag by accessing the "New Tag" option from the Edit menu or by pressing <kbd>Ctrl</kbd>+<kbd>T</kbd> (macOS: <kbd>⌘ Command</kbd>+<kbd>T</kbd>). In the tag creation panel, enter a tag name, optional shorthand name, optional tag aliases, optional parent tags, and an optional color.
|
||||
|
||||
#### Tag Manager
|
||||
|
||||
You can manage your library of tags from opening the "Tag Manager" panel from Edit -> "Tag Manager". From here you can create, search for, edit, and permanently delete any tags you've created in your library.
|
||||
You can manage your library of tags from opening the "Tag Manager" panel from Edit -> "Tag Manager" or by pressing <kbd>Ctrl</kbd>+<kbd>M</kbd> (macOS: <kbd>⌘ Command</kbd>+<kbd>M</kbd>). From here you can create, search for, edit, and permanently delete any tags you've created in your library.
|
||||
|
||||
### Editing Tags
|
||||
|
||||
To edit a tag, click on it inside the preview panel or right-click the tag and select "Edit Tag" from the context menu.
|
||||
|
||||
### Adding Tags to File Entries
|
||||
|
||||
Access the "Add Tag" search box by either clicking on the "Add Tag" button at the bottom of the right sidebar, accessing the "Add Tags to Selected" option from the File menu, or by pressing <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> (macOS: <kbd>⌘ Command</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd>).
|
||||
|
||||
From here you can search for existing tags or create a new one if the one you're looking for doesn't exist. Click the "+" button next to any tags you want to the currently selected file entries. To quickly add the top result, press the <kbd>Enter</kbd>/<kbd>Return</kbd> key to add the top-most tag and reset the tag search. Press <kbd>Enter</kbd>/<kbd>Return</kbd> once more to close the dialog box. By using this method, you can quickly add various tags in quick succession just by using the keyboard!
|
||||
|
||||
To remove a tag from a file entry, hover over the tag in the preview panel and click on the "-" icon that appears.
|
||||
|
||||
### Adding Fields to File Entries
|
||||
|
||||
To add a metadata field to a file entry, start by clicking the "Add Field" button at the bottom of the preview panel. From the dropdown menu, select the type of metadata field you’d like to add to the entry
|
||||
|
||||
### Editing Fields
|
||||
|
||||
Hover over the field and click the pencil icon. From there, add or edit text in the dialog box popup.
|
||||
|
||||
### Relinking Moved Files
|
||||
|
||||
Inevitably some of the files inside your library will be renamed, moved, or deleted. If a file has been renamed or moved, TagStudio will display the thumbnail as a red broken chain link. To relink moved files or delete these entries, select the "Manage Unlinked Entries" option under the Tools menu. Click the "Refresh" button to scan your library for unlinked entries. Once complete, you can attempt to "Search & Relink" any unlinked file entries to their respective files, or "Delete Unlinked Entries" in the event the original files have been deleted and you no longer wish to keep their entries inside your library.
|
||||
@@ -176,57 +134,101 @@ Inevitably some of the files inside your library will be renamed, moved, or dele
|
||||
> [!WARNING]
|
||||
> If multiple matches for a moved file are found (matches are currently defined as files with a matching filename as the original), TagStudio will currently ignore the match groups. Adding a GUI for manual selection, as well as smarter automated relinking, are high priorities for future versions.
|
||||
|
||||
### Saving the Library
|
||||
See instructions in the "[Creating Development Environment](/CONTRIBUTING.md/#creating-a-development-environment)" section from the [contributing](https://docs.tagstud.io/contributing) page.
|
||||
|
||||
As of version 9.5, libraries are saved automatically as you go. To save a backup of your library, select File -> Save Library Backup from the menu bar.
|
||||
## Installation
|
||||
|
||||
### Half-Implemented Features
|
||||
To download executable builds of TagStudio, visit the [Releases](https://github.com/TagStudioDev/TagStudio/releases) page of the GitHub repository and download the latest release for your system under the "Assets" section at the bottom of the release.
|
||||
|
||||
These features were present in pre-public versions of TagStudio (9.0 and below) and have yet to be fully implemented.
|
||||
TagStudio has builds for **Windows**, **macOS** _(Apple Silicon & Intel)_, and **Linux**. We also offer portable releases for Windows and Linux which are self-contained and easier to move around.
|
||||
|
||||
#### Fix Duplicate Files
|
||||
For detailed instructions, installation help, and instructions for developing for TagStudio, please see the "[Installation](https://docs.tagstud.io/install)" page on our documentation website.
|
||||
|
||||
Load in a .dupeguru file generated by [dupeGuru](https://github.com/arsenetar/dupeguru/) and mirror metadata across entries marked as duplicates. After mirroring, return to dupeGuru to manage deletion of the duplicate files. After deletion, use the "Fix Unlinked Entries" feature in TagStudio to delete the duplicate set of entries for the now-deleted files
|
||||
> [!IMPORTANT]
|
||||
> If you're interested in contributing to TagStudio, please take a look at the [contribution guidelines](https://docs.tagstud.io/contributing) for how to get started!
|
||||
|
||||
### Third-Party Dependencies
|
||||
|
||||
For video thumbnails and playback, you'll also need [FFmpeg](https://ffmpeg.org/download.html) installed on your system. If you encounter any issues with this, please reference our [FFmpeg Help](/docs/help/ffmpeg.md) guide. For faster library scanning and refreshing, it's also recommended you install [ripgrep](https://github.com/BurntSushi/ripgrep).
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
> [!CAUTION]
|
||||
> While this feature is functional, it’s a pretty roundabout process and can be streamlined in the future.
|
||||
> **We do not currently publish TagStudio to any package managers. Any TagStudio distributions outside of the GitHub [Releases](https://github.com/TagStudioDev/TagStudio/releases) page are _unofficial_ and not maintained by us.**
|
||||
>
|
||||
> Installation support will not be given to users installing from unofficial sources. Use these versions at your own risk!
|
||||
|
||||
#### Macros
|
||||
## Goals & Priorities
|
||||
|
||||
Apply tags and other metadata automatically depending on certain criteria. Set specific macros to run when the files are added to the library. Part of this includes applying tags automatically based on parent folders.
|
||||
TagStudio aims to create an **open** and **robust** format for file tagging that isn't burdened by the limitations of traditional tagging and file metadata systems. **TagStudio** is the first proof-of-concept implementation of this system.
|
||||
|
||||
> [!CAUTION]
|
||||
> Macro options are hardcoded, and there’s currently no way for the user to interface with this (still incomplete) system at all.
|
||||
See the [**Roadmap**](docs/roadmap.md) on the documentation site for a complete list of planned features and estimated timeline.
|
||||
|
||||
#### Gallery-dl Sidecar Importing
|
||||
### Overall Goals
|
||||
|
||||
Import JSON sidecar data generated by [gallery-dl](https://github.com/mikf/gallery-dl).
|
||||
- To achieve a portable, private, extensible, open-format, and feature-rich system of organizing and rediscovering files.
|
||||
- To provide powerful methods for organization, notably the concept of tag inheritance, or "taggable tags" _(and in the near future, the combination of composition-based tags)._
|
||||
- To create an implementation of such a system that is resilient against a user’s actions outside the program (modifying, moving, or renaming files) while also not burdening the user with mandatory sidecar files or requiring them to change their existing file structures and workflows.
|
||||
- To support a wide range of users spanning across different platforms, multi-user setups, and those with large (several terabyte) libraries.
|
||||
- To make the dang thing look nice, too. It’s 2025, not 1995.
|
||||
|
||||
> [!CAUTION]
|
||||
> This feature is not supported or documented in any official capacity whatsoever. It will likely be rolled-in to a larger and more generalized sidecar importing feature in the future.
|
||||
### Project Priorities
|
||||
|
||||
## Launching/Building From Source
|
||||
|
||||
See instructions in the "[Creating Development Environment](/CONTRIBUTING.md/#creating-a-development-environment)" section from the [contribution documentation](/CONTRIBUTING.md).
|
||||
1. **The concept.** Even if TagStudio as an application fails, I’d hope that the idea lives on in a superior project. The goals outlined above don’t reference TagStudio once - _TagStudio_ is what references the _goals._
|
||||
2. **The system.** Frontends and implementations can vary, as they should. The core underlying metadata management system is what should be interoperable between different frontends, programs, and operating systems. A standard implementation for this should settle as development continues. This opens up the doors for improved and varied clients, integration with third-party applications, and more.
|
||||
3. **The application.** If nothing else, TagStudio the application serves as the first (and so far only) implementation for this system of metadata management. This has the responsibility of doing the idea justice and showing just what’s possible when it comes to user file management.
|
||||
|
||||
## FAQ
|
||||
|
||||
### What State Is the Project Currently In?
|
||||
### Will TagStudio move, modify, or mess with my files?
|
||||
|
||||
As of writing (Alpha v9.5.0) the project is very usable, however there's some plenty of quirks and missing QoL features. Several additional features and changes are still planned (see: [Feature Roadmap](https://docs.tagstud.io/updates/roadmap/)) that add even more power and flexibility to the tagging and field systems while making it easier to tag in bulk and perform automated operations. Bugfixes and polish are constantly trickling in along with the larger feature releases.
|
||||
**No**, outside of _explicit_ functionality such as "Move File(s) to Trash".
|
||||
|
||||
### What Features Are You Planning on Adding?
|
||||
### Will TagStudio require me to recreate my tags or library in future updates?
|
||||
|
||||
See the [Feature Roadmap](https://docs.tagstud.io/updates/roadmap/) page for the core features being planned and implemented for TagStudio. For a more up to date look on what's currently being added for upcoming releases, see our GitHub [milestones](https://github.com/TagStudioDev/TagStudio/milestones) for versioned releases.
|
||||
**No.** It's our highest priority to ensure that your data safely and smoothly transfers over to newer versions.
|
||||
|
||||
### Features That Will NOT Be Added
|
||||
### What state is the project currently in?
|
||||
|
||||
As of writing (Alpha v9.5.5) the project is very usable, however there's still some quirks and missing QoL features. Several additional features and changes are still planned (see: [roadmap](https://docs.tagstud.io/roadmap)) that add even more power and flexibility to the tagging and field systems while making it easier to tag in bulk and perform automated operations. Bugfixes and polishes are constantly trickling in along with the larger feature releases.
|
||||
|
||||
### What features are you planning on adding?
|
||||
|
||||
See the [roadmap](https://docs.tagstud.io/roadmap) page for the core features being planned and implemented for TagStudio. For a more up to date look on what's currently being added for upcoming releases, see our GitHub [milestones](https://github.com/TagStudioDev/TagStudio/milestones) for versioned releases.
|
||||
|
||||
The most important remaining features before I consider the program to be "feature complete" are:
|
||||
|
||||
- Custom names for Fields
|
||||
- List views for files
|
||||
- Multiple root directory support for libraries
|
||||
- Improved file entry relinking
|
||||
- File entry groups
|
||||
- Sorting by file date modified and created
|
||||
- Macros
|
||||
- Improved search bar with visualized tags and improved autocomplete
|
||||
- Side panel for easier tagging (pinned tags, recent tags, tag search, tag palette)
|
||||
- Improved tag management interface
|
||||
- Improved and finalized Tag Categories
|
||||
- Fixed and improved mixed entry data displays (see: [#337](https://github.com/TagStudioDev/TagStudio/issues/337))
|
||||
- Sharable tag data
|
||||
- Separate core library + API
|
||||
|
||||
### What features will NOT be added?
|
||||
|
||||
- Native Cloud Integration
|
||||
- There are plenty of services already (native or third-party) that allow you to mount your cloud drives as virtual drives on your system. Hosting a TagStudio library on one of these mounts should function similarly to what native integration would look like.
|
||||
- Supporting native cloud integrations such as these would be an unnecessary "reinventing the wheel" burden for us that is outside the scope of this project.
|
||||
- Native ChatGPT/Non-Local LLM Integration
|
||||
- This could mean different things depending on your intentions. Whether it's trying to use an LLM to replace the native search, or to trying to use a model for image recognition, I'm not interested in hooking people's TagStudio libraries into non-local LLMs such as ChatGPT and/or turn the program into a "chatbot" interface (see: [Goals/Privacy](#goals)). I wouldn't, however, mind using **locally** hosted models to provide the _optional_ ability for additional searching and tagging methods (especially when it comes to facial recognition) - but this would likely take the form of plugins external to the core program anyway.
|
||||
- Native ChatGPT/Claude/Gemini/_Non-Local_ LLM Integration
|
||||
- This could mean different things depending on your intentions. Whether it's trying to use an LLM to replace the native search, or to trying to use a model for image recognition, I'm not interested in hooking people's TagStudio libraries into non-local LLMs such as ChatGPT and/or turn the program into a "chatbot" interface (see: [Overall Goals/Privacy](#overall-goals)).
|
||||
- With that being said, the future TagStudio API should be well-suited to connect to any sort of service you'd like, including machine learning models if so you choose. I just won't _personally_ add any native integrations with online services.
|
||||
|
||||
### Why Is this Already Version 9?
|
||||
### Is a Rust port coming?
|
||||
|
||||
Over the first few years of private development the project went through several major iterations and rewrites. These major version bumps came quickly, and by the time TagStudio was opened-sourced the version number had already reached v9.0. Instead of resetting to "v0.0" or "v1.0" for this public release I decided to keep my v9.x numbering scheme and reserve v10.0 for when all the core features on the [Feature Roadmap](https://docs.tagstud.io/updates/roadmap/) are implemented. I’ve also labeled this version as an "Alpha" and will drop this once either all of the core features are implemented or the project feels stable and feature-rich enough to be considered "Beta" and beyond.
|
||||
Not from us, or at least _not quite_. There are plans to break off the core TagStudio library into its own MIT-licensed module that can be used in other applications and plugins, and ideally this would be written in Rust. While I understand there's a lot of vocal support and volunteers willing to help with this, it's something that's better off coming at my/our own pace in order to ensure it's done correctly to align with the project's intentions and to remain maintainable in the future.
|
||||
|
||||
### Windows Defender thinks TagStudio is a virus or a trojan, why?
|
||||
|
||||
Unfortunately, executable Python applications "compiled" with something like PyInstaller are notorious for raising false positives in anti-virus software, most commonly Windows Defender (see: [#276](https://github.com/TagStudioDev/TagStudio/issues/276) and related issues). There's really not much we can do about this on our end, as the malware matches frequently change and sample submissions to Microsoft are slow and often ineffective. If you're effected by this, you may need to allow TagStudio to bypass your anti-virus software.
|
||||
|
||||
### Why is TagStudio already on version 9.x?
|
||||
|
||||
Over the first few years of private development the project went through several major iterations and rewrites. These major version bumps came quickly, and by the time TagStudio was opened-sourced the version number had already reached v9.0. Instead of resetting to "v0.0" or "v1.0" for this public release I decided to keep my v9.x numbering scheme and reserve v10.0 for when all the core features on the [roadmap](https://docs.tagstud.io/roadmap/) are implemented. I’ve also labeled this version as an "Alpha" and will drop this once either all of the core features are implemented or the project feels stable and feature-rich enough to be considered "Beta" and beyond.
|
||||
|
||||
84
STYLE.md
@@ -1,84 +0,0 @@
|
||||
# Code Style
|
||||
|
||||
Most of the style guidelines can be checked, fixed, and enforced via Ruff. Older code may not be adhering to all of these guidelines, in which case _"do as I say, not as I do"..._
|
||||
|
||||
- Do your best to write clear, concise, and modular code.
|
||||
- This should include making methods private by default (e.g. `__method()`)
|
||||
- Methods should only be protected (e.g. `_method()`) or public (e.g. `method()`) when needed and warranted
|
||||
- Keep a maximum column width of no more than **100** characters.
|
||||
- Code comments should be used to help describe sections of code that can't speak for themselves.
|
||||
- Use [Google style](https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings) docstrings for any classes and functions you add.
|
||||
- If you're modifying an existing function that does _not_ have docstrings, you don't _have_ to add docstrings to it... but it would be pretty cool if you did ;)
|
||||
- Imports should be ordered alphabetically.
|
||||
- Lists of values should be ordered using their [natural sort order](https://en.wikipedia.org/wiki/Natural_sort_order).
|
||||
- Some files have their methods ordered alphabetically as well (i.e. [`thumb_renderer`](https://github.com/TagStudioDev/TagStudio/blob/main/src/tagstudio/qt/widgets/thumb_renderer.py)). If you're working in a file and notice this, please try and keep to the pattern.
|
||||
- When writing text for window titles or form titles, use "[Title Case](https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case)" capitalization. Your IDE may have a command to format this for you automatically, although some may incorrectly capitalize short prepositions. In a pinch you can use a website such as [capitalizemytitle.com](https://capitalizemytitle.com/) to check.
|
||||
- If it wasn't mentioned above, then stick to [**PEP-8**](https://peps.python.org/pep-0008/)!
|
||||
|
||||
## QT
|
||||
As of writing this section, the QT part of the code base is quite unstructured and the View and Controller parts are completely intermixed[^1]. This makes maintenance, fixes and general understanding of the code base quite challenging, because the interesting parts you are looking for are entangled in a bunch of repetitive UI setup code. To address this we are aiming to more strictly separate the view and controller aspects of the QT frontend.
|
||||
|
||||
The general structure of the QT code base should look like this:
|
||||
```
|
||||
qt
|
||||
├── controller
|
||||
│ ├── widgets
|
||||
│ │ └── preview_panel_controller.py
|
||||
│ └── main_window_controller.py
|
||||
├── view
|
||||
│ ├── widgets
|
||||
│ │ └── preview_panel_view.py
|
||||
│ └── main_window_view.py
|
||||
├── ts_qt.py
|
||||
└── mixed.py
|
||||
```
|
||||
|
||||
In this structure there are the `view` and `controller` sub-directories. They have the exact same structure and for every `<component>_view.py` there is a `<component>_controller.py` at the same location in the other subdirectory and vice versa.
|
||||
|
||||
Typically the classes should look like this:
|
||||
```py
|
||||
# my_cool_widget_view.py
|
||||
class MyCoolWidgetView(QWidget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.__button = QPushButton()
|
||||
self.__color_dropdown = QComboBox()
|
||||
# ...
|
||||
self.__connect_callbacks()
|
||||
|
||||
def __connect_callbacks(self):
|
||||
self.__button.clicked.connect(self._button_click_callback)
|
||||
self.__color_dropdown.currentIndexChanged.connect(
|
||||
lambda idx: self._color_dropdown_callback(self.__color_dropdown.itemData(idx))
|
||||
)
|
||||
|
||||
def _button_click_callback(self):
|
||||
raise NotImplementedError()
|
||||
```
|
||||
```py
|
||||
# my_cool_widget_controller.py
|
||||
class MyCoolWidget(MyCoolWidgetView):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def _button_click_callback(self):
|
||||
print("Button was clicked!")
|
||||
|
||||
def _color_dropdown_callback(self, color: Color):
|
||||
print(f"The selected color is now: {color}")
|
||||
```
|
||||
|
||||
Observe the following key aspects of this example:
|
||||
- The Controller is just called `MyCoolWidget` instead of `MyCoolWidgetController` as it will be directly used by other code
|
||||
- The UI elements are in private variables
|
||||
- This enforces that the controller shouldn't directly access UI elements
|
||||
- Instead the view should provide a protected API (e.g. `_get_color()`) for things like setting/getting the value of a dropdown, etc.
|
||||
- Instead of `_get_color()` there could also be a `_color` method marked with `@property`
|
||||
- The callback methods are already defined as protected methods with NotImplementedErrors
|
||||
- Defines the interface the callbacks
|
||||
- Enforces that UI events be handled
|
||||
|
||||
> [!TIP]
|
||||
> A good (non-exhaustive) rule of thumb is: If it requires a non-UI import, then it doesn't belong in the `*_view.py` file.
|
||||
|
||||
[^1]: For an explanation of the Model-View-Controller (MVC) Model, checkout this article: [MVC Framework Introduction](https://www.geeksforgeeks.org/mvc-framework-introduction/).
|
||||
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 212 KiB After Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 41 KiB |
1062
docs/changelog.md
Normal file
@@ -2,7 +2,7 @@
|
||||
icon: material/palette
|
||||
---
|
||||
|
||||
# :material-palette: Tag Colors
|
||||
# :material-palette: Colors
|
||||
|
||||
TagStudio features a variety of built-in tag colors, alongside the ability for users to create their own custom tag color palettes.
|
||||
|
||||
@@ -10,7 +10,7 @@ TagStudio features a variety of built-in tag colors, alongside the ability for u
|
||||
|
||||
The Tag Color Manager is where you can create and manage your custom tag colors and associated namespaces. You can access the Tag Color Manager from the "File -> Manage Tag Colors" option in the menu bar.
|
||||
|
||||

|
||||

|
||||
|
||||
## Creating a Namespace
|
||||
|
||||
@@ -20,7 +20,7 @@ _\* Color pack sharing coming in a future update_
|
||||
|
||||
To create your first namespace, either click the "New Namespace" button or the large button prompt underneath the built-in colors.
|
||||
|
||||

|
||||

|
||||
|
||||
### Name
|
||||
|
||||
@@ -40,7 +40,7 @@ Namespaces beginning with "tagstudio" are reserved by TagStudio and will automat
|
||||
|
||||
Once you've created your first namespace, click the "+" button inside the namespace section to create a color. To edit a color that you've previously created, either click on the color name or right click and select "Edit Color" from the context menu.
|
||||
|
||||

|
||||

|
||||
|
||||
### Name
|
||||
|
||||
@@ -62,14 +62,14 @@ The primary color is used as the main tag color and by default is used as the ba
|
||||
|
||||
By default, the secondary color is only used as an optional override for the tag text color. This color can be cleared by clicking the adjacent "Reset" button.
|
||||
|
||||

|
||||

|
||||
|
||||
The secondary color can also be used as the tag border color by checking the "Use Secondary Color for Border" box.
|
||||
|
||||

|
||||

|
||||
|
||||
## Using Colors
|
||||
|
||||
When editing a tag, click the tag color button to bring up the tag color selection panel. From here you can choose any built-in TagStudio color as well as any of your custom colors.
|
||||
|
||||

|
||||

|
||||
162
docs/contributing.md
Normal file
@@ -0,0 +1,162 @@
|
||||
---
|
||||
icon: material/file-plus
|
||||
---
|
||||
|
||||
# :material-file-plus: Contributing
|
||||
|
||||
Thank you so much for showing interest in contributing to TagStudio! Here are a set of instructions and guidelines for contributing code or documentation to the project. This document will change over time, so make sure that your contributions still line up with the requirements here before submitting a pull request.
|
||||
|
||||
## Getting Started
|
||||
|
||||
- Check the [Feature Roadmap](roadmap.md) page to see what priority features there are, the [FAQ](https://github.com/TagStudioDev/TagStudio/blob/main/README.md#faq), as well as the project's [Issues](https://github.com/TagStudioDev/TagStudio/issues) and [Pull Requests](https://github.com/TagStudioDev/TagStudio/pulls).
|
||||
- If you'd like to add a feature that isn't on the feature roadmap or doesn't have an open issue, **PLEASE create a feature request** issue for it discussing your intentions so any feedback or important information can be given by the team first.
|
||||
- We don't want you wasting time developing a feature or making a change that can't/won't be added for any reason ranging from pre-existing refactors to design philosophy differences.
|
||||
- **Please don't** create pull requests that consist of large refactors, _especially_ without discussing them with us first. These end up doing more harm than good for the project by continuously delaying progress and disrupting everyone else's work.
|
||||
- If you wish to discuss TagStudio further, feel free to join the [Discord Server](https://discord.com/invite/hRNnVKhF2G)!
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! note
|
||||
If the fix is small and self-explanatory (i.e. a typo), then it doesn't require an issue to be opened first. Issue tracking is supposed to make our lives easier, not harder. Please use your best judgement to minimize the amount of work for everyone involved.
|
||||
|
||||
### Contribution Checklist
|
||||
|
||||
- I've read the [Feature Roadmap](roadmap.md) page
|
||||
- I've read the [FAQ](https://github.com/TagStudioDev/TagStudio/blob/main/README.md#faq)
|
||||
- I've checked the project's [Issues](https://github.com/TagStudioDev/TagStudio/issues) and [Pull Requests](https://github.com/TagStudioDev/TagStudio/pulls)
|
||||
- **I've created a new issue for my feature/fix _before_ starting work on it**, or have at least notified others in the relevant existing issue(s) of my intention to work on it
|
||||
- I've set up my development environment including Ruff, Mypy, and PyTest
|
||||
- I've read the CONTRIBUTING.md/Contributing page on the documentation site as well as the and/or [Style Guide](style.md)
|
||||
- **_I mean it, I've found or created an issue for my feature/fix!_**
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! failure "Unacceptable Code"
|
||||
The following types of code will NOT be accepted to the project:
|
||||
|
||||
- Code that is not yours or does not have a compatible license with TagStudio's [own one](../LICENSE)
|
||||
- Code that you do not understand and/or cannot explain
|
||||
|
||||
## Creating a Development Environment
|
||||
|
||||
If you wish to develop for TagStudio, you'll need to create a development environment by installing the required dependencies. You have a number of options depending on your level of experience and familiarly with existing Python toolchains.
|
||||
|
||||
If you know what you're doing and have developed for Python projects in the past, you can get started quickly with the "Brief Instructions" below. Otherwise, please see the full instructions on the documentation website for "[Creating a Development Environment](https://docs.tagstud.io/install/#creating-a-development-environment)".
|
||||
|
||||
### Brief Instructions
|
||||
|
||||
1. Have [Python 3.12](https://www.python.org/downloads/) and PIP installed. Also have [FFmpeg](https://ffmpeg.org/download.html) installed if you wish to have audio/video playback and thumbnails.
|
||||
2. Clone the repository to the folder of your choosing:
|
||||
```
|
||||
git clone https://github.com/TagStudioDev/TagStudio.git
|
||||
```
|
||||
3. Use a dependency manager such as [uv](https://docs.astral.sh/uv/) or [Poetry 2.0](https://python-poetry.org/blog/category/releases/) to install the required dependencies, or alternatively create and activate a [virtual environment](https://docs.tagstud.io/install/#manual-installation) with `venv`.
|
||||
|
||||
4. If using a virtual environment instead of a dependency manager, install an editable version of the program and development dependencies with the following PIP command:
|
||||
|
||||
```
|
||||
pip install -e ".[dev]"
|
||||
```
|
||||
|
||||
Otherwise, modify the command above for use with your dependency manager of choice. For example if using uv, you may use this:
|
||||
|
||||
```
|
||||
uv pip install -e ".[dev]"
|
||||
```
|
||||
|
||||
## Workflow Checks
|
||||
|
||||
When pushing your code, several automated workflows will check it against predefined tests and style checks. It's _highly recommended_ that you run these checks locally beforehand to avoid having to fight back-and-forth with the workflow checks inside your pull requests.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! tip
|
||||
To format the code automatically before each commit, there's a configured action available for the `pre-commit` hook. Install it by running `pre-commit install`. The hook will be executed each time on running `git commit`.
|
||||
|
||||
### [Ruff](https://github.com/astral-sh/ruff)
|
||||
|
||||
A Python linter and code formatter. Ruff uses the `pyproject.toml` as its config file and runs whenever code is pushed or pulled into the project.
|
||||
|
||||
#### Running Locally
|
||||
|
||||
Inside the root repository directory:
|
||||
|
||||
- Lint code with `ruff check`
|
||||
- Some linting suggestions can be automatically formatted with `ruff check --fix`
|
||||
- Format code with `ruff format`
|
||||
|
||||
Ruff should automatically discover the configuration options inside the [pyproject.toml](https://github.com/TagStudioDev/TagStudio/blob/main/pyproject.toml) file. For more information, see the [ruff configuration discovery docs](https://docs.astral.sh/ruff/configuration/#config-file-discovery).
|
||||
|
||||
Ruff is also available as a VS Code [extension](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff), PyCharm [plugin](https://plugins.jetbrains.com/plugin/20574-ruff), and [more](https://docs.astral.sh/ruff/integrations/).
|
||||
|
||||
### [Mypy](https://github.com/python/mypy)
|
||||
|
||||
Mypy is a static type checker for Python. It sure has a lot to say sometimes, but we recommend you take its advice when possible. Mypy also uses the `pyproject.toml` as its config file and runs whenever code is pushed or pulled into the project.
|
||||
|
||||
#### Running Locally
|
||||
|
||||
- **(First time only)** Run the following:
|
||||
- `mkdir -p .mypy_cache`
|
||||
- `mypy --install-types --non-interactive`
|
||||
- You can now check code by running `mypy --config-file pyproject.toml .` in the repository root. _(Don't forget the "." at the end!)_
|
||||
|
||||
Mypy is also available as a VS Code [extension](https://marketplace.visualstudio.com/items?itemName=matangover.mypy), PyCharm [plugin](https://plugins.jetbrains.com/plugin/11086-mypy), and [more](https://plugins.jetbrains.com/plugin/11086-mypy).
|
||||
|
||||
### PyTest
|
||||
|
||||
- Run all tests by running `pytest tests/` in the repository root.
|
||||
|
||||
## Code Style
|
||||
|
||||
See the [Style Guide](style.md)
|
||||
|
||||
### Modules & Implementations
|
||||
|
||||
- **Do not** modify legacy library code in the `src/core/library/json/` directory
|
||||
- Avoid direct calls to `os`
|
||||
- Use `Pathlib` library instead of `os.path`
|
||||
- Use `platform.system()` instead of `os.name` and `sys.platform`
|
||||
- Don't prepend local imports with `tagstudio`, stick to `src`
|
||||
- Use the `logger` system instead of `print` statements
|
||||
- Avoid nested f-strings
|
||||
- Use HTML-like tags inside Qt widgets over stylesheets where possible
|
||||
|
||||
### Commit and Pull Request Style
|
||||
|
||||
- Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0) as a guideline for commit messages. This allows us to easily generate changelogs for releases.
|
||||
- See some [examples](https://www.conventionalcommits.org/en/v1.0.0/#examples) of what this looks like in practice.
|
||||
- Use clear and concise commit messages. If your commit does too much, either consider breaking it up into smaller commits or providing extra detail in the commit description.
|
||||
- Pull requests should have an adequate title and description which clearly outline your intentions and changes/additions. Feel free to provide screenshots, GIFs, or videos, especially for UI changes.
|
||||
- Pull requests should ideally be limited to **a single** feature or fix.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! important
|
||||
**Please do not force push if your PR is open for review!** Force pushing makes it impossible to discern which changes have already been reviewed and which haven't. This means a reviewer will then have to re-review all the already reviewed code, which is a lot of unnecessary work for reviewers.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! tip
|
||||
If you're unsure where to stop the scope of your PR, ask yourself: _"If I broke this up, could any parts of it still be used by the project in the meantime?"_
|
||||
|
||||
### Runtime Requirements
|
||||
|
||||
- Final code must function on supported versions of Windows, macOS, and Linux:
|
||||
- Windows: 10, 11
|
||||
- macOS: 13.0+
|
||||
- Linux: _Varies_
|
||||
- Final code must **_NOT:_**
|
||||
- Contain superfluous or unnecessary logging statements
|
||||
- Cause unreasonable slowdowns to the program outside of a progress-indicated task
|
||||
- Cause undesirable visual glitches or artifacts on screen
|
||||
|
||||
## Documentation Guidelines
|
||||
|
||||
Documentation contributions include anything inside of the `docs/` folder, as well as the `README.md` and `CONTRIBUTING.md` files. Documentation inside the `docs/` folder is built and hosted on our static documentation site, [docs.tagstud.io](https://docs.tagstud.io/).
|
||||
|
||||
- Use "[dash-case / kebab-case](https://developer.mozilla.org/en-US/docs/Glossary/Kebab_case)" for file and folder names
|
||||
- Follow the folder structure pattern
|
||||
- Don't add images or other media with excessively large file sizes
|
||||
- Provide alt text for all embedded media
|
||||
- Use "[Title Case](https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case)" for title capitalization
|
||||
|
||||
## Translation Guidelines
|
||||
|
||||
Translations are performed on the TagStudio [Weblate project](https://hosted.weblate.org/projects/tagstudio/).
|
||||
|
||||
_Translation guidelines coming soon._
|
||||
@@ -121,7 +121,7 @@ A reference `.envrc` is provided for use with [direnv](#direnv), see [`contrib/.
|
||||
|
||||
### Editor Integration
|
||||
|
||||
The entry point for TagStudio is `src/tagstudio/main.py`. You can target this file from your IDE to run or connect a debug session. The example(s) below show off example launch scripts for different IDEs. Here you can also take advantage of [launch arguments](./usage.md/#launch-arguments) to pass your own test [libraries](./library/index.md) to use while developing. You can find more editor configurations in [`contrib`](https://github.com/TagStudioDev/TagStudio/tree/main/contrib).
|
||||
The entry point for TagStudio is `src/tagstudio/main.py`. You can target this file from your IDE to run or connect a debug session. The example(s) below show off example launch scripts for different IDEs. Here you can also take advantage of [launch arguments](./usage.md/#launch-arguments) to pass your own test [libraries](libraries.md) to use while developing. You can find more editor configurations in [`contrib`](https://github.com/TagStudioDev/TagStudio/tree/main/contrib).
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
=== "VS Code"
|
||||
@@ -4,7 +4,7 @@ icon: material/file
|
||||
|
||||
# :material-file: Entries
|
||||
|
||||
Entries are the individual representations of your files inside a TagStudio [library](./index.md). Each one corresponds one-to-one to a file on disk, and tracks all of the additional [tags](tag.md) and metadata that you attach to it inside TagStudio.
|
||||
Entries are the individual representations of your files inside a TagStudio [library](./index.md). Each one corresponds one-to-one to a file on disk, and tracks all of the additional [tags](tags.md) and metadata that you attach to it inside TagStudio.
|
||||
|
||||
## Storage
|
||||
|
||||
@@ -4,7 +4,7 @@ icon: material/text-box
|
||||
|
||||
# :material-text-box: Fields
|
||||
|
||||
Fields are additional types of metadata that you can attach to [file entries](./entry.md). Like [tags](./tag.md), fields are not stored inside files themselves nor in sidecar files, but rather inside the respective TagStudio [library](./index.md) save file.
|
||||
Fields are additional types of metadata that you can attach to [file entries](./entries.md). Like [tags](tags.md), fields are not stored inside files themselves nor in sidecar files, but rather inside the respective TagStudio [library](./index.md) save file.
|
||||
|
||||
## Field Types
|
||||
|
||||
@@ -20,7 +20,7 @@ A long string of text displayed as a box of text.
|
||||
|
||||
- e.g: Description, Notes, etc.
|
||||
|
||||
### Datetime [WIP]
|
||||
### Datetime
|
||||
|
||||
A date and time value.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
icon: material/movie-open-cog
|
||||
---
|
||||
|
||||
# :material-movie-open-cog: FFmpeg
|
||||
# :material-movie-open-cog: Installing FFmpeg
|
||||
|
||||
FFmpeg is required for thumbnail previews and playback features on audio and video files. FFmpeg is a free Open Source project dedicated to the handling of multimedia (video, audio, etc) files. For more information, see their official website at [ffmpeg.org](https://www.ffmpeg.org/).
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Ignore Files
|
||||
title: Ignoring Files
|
||||
icon: material/file-document-remove
|
||||
---
|
||||
|
||||
# :material-file-document-remove: Ignore Files & Directories
|
||||
# :material-file-document-remove: Ignoring Files & Directories
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! warning "Legacy File Extension Ignoring"
|
||||
@@ -11,7 +11,7 @@ icon: material/file-document-remove
|
||||
|
||||
If you're still running an older version of TagStudio in the meantime, you can access the legacy system by going to "Edit -> Manage File Extensions" in the menubar.
|
||||
|
||||
TagStudio offers the ability to ignore specific files and directories via a `.ts_ignore` file located inside your [library's](../library/index.md) `.TagStudio` folder. This file is designed to use very similar [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>)-style pattern matching as the [`.gitignore`](https://git-scm.com/docs/gitignore) file used by Git™[^1]. It can be edited within TagStudio or opened to edit with an external program by going to the "Edit -> Ignore Files" option in the menubar.
|
||||
TagStudio offers the ability to ignore specific files and directories via a `.ts_ignore` file located inside your [library's](libraries.md) `.TagStudio` folder. This file is designed to use very similar [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>)-style pattern matching as the [`.gitignore`](https://git-scm.com/docs/gitignore) file used by Git™[^1]. It can be edited within TagStudio or opened to edit with an external program by going to the "Edit -> Ignore Files" option in the menubar.
|
||||
|
||||
This file is only referenced when scanning directories for new files to add to your library, and does not apply to files that have already been added to your library.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
title: Home
|
||||
hide:
|
||||
- toc
|
||||
- navigation
|
||||
---
|
||||
|
||||
#
|
||||
@@ -16,7 +17,7 @@ hide:
|
||||
|
||||
<figure markdown="span">
|
||||
{ width=80% }
|
||||
<figcaption>TagStudio Alpha v9.5.0 running on macOS Sequoia.</figcaption>
|
||||
<figcaption>TagStudio Alpha v9.5.5 running on macOS Sequoia.</figcaption>
|
||||
</figure>
|
||||
|
||||
<div class="grid" markdown>
|
||||
@@ -35,15 +36,15 @@ hide:
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :material-file-multiple:{ .lg .middle } **[All Files](./library/entry.md) Welcome**
|
||||
- :material-file-multiple:{ .lg .middle } **[All Files](entries.md) Welcome**
|
||||
|
||||
***
|
||||
|
||||
TagStudio works with photos, videos, music, documents, and more! **All file types** are recognized by TagStudio, with most common ones having built-in preview support.
|
||||
|
||||
[:material-arrow-right: See Full Preview Support](./library/index.md#preview-support)
|
||||
[:material-arrow-right: See Full Preview Support](preview-support.md)
|
||||
|
||||
- :material-tag-text:{ .lg .middle } **Create [Tags](./library/tag.md) Your Way**
|
||||
- :material-tag-text:{ .lg .middle } **Create [Tags](tags.md) Your Way**
|
||||
|
||||
***
|
||||
|
||||
@@ -53,17 +54,17 @@ hide:
|
||||
- :material-tag-multiple: Tags can be tagged with other tags!
|
||||
- :material-star-four-points: And more!
|
||||
|
||||
- :material-magnify:{ .lg .middle } **Powerful [Search](./library/library_search.md)**
|
||||
- :material-magnify:{ .lg .middle } **Powerful [Search](search.md)**
|
||||
|
||||
***
|
||||
|
||||
- Full [Boolean operator](./library/library_search.md) support
|
||||
- Full [Boolean operator](search.md) support
|
||||
- Filenames, paths, and extensions with [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) syntax
|
||||
- General media types (e.g. "Photo", "Video", "Document")
|
||||
- Special searches (e.g. "Untagged")
|
||||
- "[Smartcase](./library/library_search.md#case-sensitivity)" case sensitivity
|
||||
- "[Smartcase](search.md#case-sensitivity)" case sensitivity
|
||||
|
||||
- :material-text-box:{ .lg .middle } **Text and Date [Fields](./library/field.md)**
|
||||
- :material-text-box:{ .lg .middle } **Text and Date [Fields](fields.md)**
|
||||
|
||||
***
|
||||
|
||||
@@ -85,15 +86,15 @@ hide:
|
||||
|
||||
[:material-arrow-right: View License](https://github.com/TagStudioDev/TagStudio/blob/main/LICENSE)
|
||||
|
||||
[:material-arrow-right: Roadmap to MIT Core Library License](./updates/roadmap.md#core-library-api)
|
||||
[:material-arrow-right: Roadmap to MIT Core Library License](roadmap.md#core-library-api)
|
||||
|
||||
- :material-database:{ .lg .middle } **Central Save File**
|
||||
|
||||
***
|
||||
|
||||
Apposed to filling your drives with [sidecar files](https://en.wikipedia.org/wiki/Sidecar_file), TagStudio uses a project-like [library](./library/index.md) system that stores your tags and metadata inside a single save file per-library.
|
||||
Opposed to filling your drives with [sidecar files](https://en.wikipedia.org/wiki/Sidecar_file), TagStudio uses a project-like [library](libraries.md) system that stores your tags and metadata inside a single save file per-library.
|
||||
|
||||
[:material-arrow-right: Learn About the Format](./library/index.md)
|
||||
[:material-arrow-right: Learn About the Format](libraries.md)
|
||||
|
||||
</div>
|
||||
|
||||
@@ -105,6 +106,6 @@ TagStudio aims to create an **open** and **robust** format for file tagging that
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :material-map-check:{ .lg .middle } See the [**Roadmap**](./updates/roadmap.md) for future features and updates
|
||||
- :material-map-check:{ .lg .middle } See the [**Roadmap**](roadmap.md) for future features and updates
|
||||
|
||||
</div>
|
||||
|
||||
@@ -4,20 +4,20 @@ icon: material/download
|
||||
|
||||
# :material-download: Installation
|
||||
|
||||
TagStudio provides [releases](https://github.com/TagStudioDev/TagStudio/releases) as well as full access to its [source code](https://github.com/TagStudioDev/TagStudio) under the [GPLv3](https://github.com/TagStudioDev/TagStudio/blob/main/LICENSE) license.
|
||||
TagStudio provides executable [releases](https://github.com/TagStudioDev/TagStudio/releases) as well as full access to its [source code](https://github.com/TagStudioDev/TagStudio) under the [GPLv3](https://github.com/TagStudioDev/TagStudio/blob/main/LICENSE) license.
|
||||
|
||||
## Executables
|
||||
|
||||
To download executable builds of TagStudio, visit the [Releases](https://github.com/TagStudioDev/TagStudio/releases) page of the GitHub repository and download the latest release for your system under the "Assets" section at the bottom of the release.
|
||||
|
||||
TagStudio has builds for **Windows**, **macOS** _(Apple Silicon & Intel)_, and **Linux**. We also offer portable releases for Windows and Linux which are self-contained and easier to move around.
|
||||
TagStudio has builds for :fontawesome-brands-windows: **Windows**, :fontawesome-brands-apple: **macOS** _(Apple Silicon & Intel)_, and :material-penguin: **Linux**. We also offer portable releases for Windows and Linux which are self-contained and easier to move around.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! info "Third-Party Dependencies"
|
||||
You may need to install [third-party dependencies](#third-party-dependencies) such as [FFmpeg](https://ffmpeg.org/download.html) to use the full feature set of TagStudio.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! warning "For macOS Users"
|
||||
!!! warning ":fontawesome-brands-apple: macOS "Privacy & Security" Popup"
|
||||
On macOS, you may be met with a message saying "**"TagStudio" can't be opened because Apple cannot check it for malicious software.**" If you encounter this, then you'll need to go to the "Settings" app, navigate to "Privacy & Security", and scroll down to a section that says "**"TagStudio" was blocked from use because it is not from an identified developer.**" Click the "Open Anyway" button to allow TagStudio to run. You should only have to do this once after downloading the application.
|
||||
|
||||
---
|
||||
@@ -30,7 +30,7 @@ TagStudio has builds for **Windows**, **macOS** _(Apple Silicon & Intel)_, and *
|
||||
|
||||
Installation support will not be given to users installing from unofficial sources. Use these versions at your own risk!
|
||||
|
||||
### Installing with PIP
|
||||
### :fontawesome-brands-python: Installing with PIP
|
||||
|
||||
TagStudio is installable via [PIP](https://pip.pypa.io/). Note that since we don't currently distribute on PyPI, the repository needs to be cloned and installed locally. Make sure you have Python 3.12 and PIP installed if you choose to install using this method.
|
||||
|
||||
@@ -52,13 +52,13 @@ pip install .
|
||||
```sh
|
||||
pip install -e ".[dev]"
|
||||
```
|
||||
_See more under "[Developing](./develop.md)"_
|
||||
_See more under "[Developing](developing.md)"_
|
||||
|
||||
TagStudio can now be launched via the `tagstudio` command in your terminal.
|
||||
|
||||
---
|
||||
|
||||
### Linux
|
||||
### :material-penguin: Linux
|
||||
|
||||
Some external dependencies are required for TagStudio to execute. Below is a table of known packages that will be necessary.
|
||||
|
||||
@@ -79,7 +79,7 @@ Some external dependencies are required for TagStudio to execute. Below is a tab
|
||||
| [qt-multimedia](https://repology.org/project/qt) | required |
|
||||
| [qt-wayland](https://repology.org/project/qt) | Wayland support |
|
||||
|
||||
### Nix(OS)
|
||||
### :material-nix: Nix(OS)
|
||||
|
||||
For [Nix(OS)](https://nixos.org/), the TagStudio repository includes a [flake](https://wiki.nixos.org/wiki/Flakes) that provides some outputs such as a development shell and package.
|
||||
|
||||
@@ -213,12 +213,30 @@ Don't forget to rebuild!
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! tip
|
||||
You can check to see if any of these dependencies are correctly located by launching TagStudio and going to "About TagStudio" in the menu bar.
|
||||
You can check to see if these dependencies are correctly located by launching TagStudio and going to "About TagStudio" in the menu bar.
|
||||
|
||||
### FFmpeg/FFprobe
|
||||
|
||||
For audio/video thumbnails and playback you'll need [FFmpeg](https://ffmpeg.org/download.html) installed on your system. If you encounter any issues with this, please reference our [FFmpeg Help](./help/ffmpeg.md) guide.
|
||||
|
||||
### RAR Extractor
|
||||
|
||||
To generate thumbnails for RAR-based files (like `.cbr`) you'll need an extractor capable of handling them.
|
||||
|
||||
- :material-penguin: On Linux you'll need to install either `unrar` (likely in you distro's non-free repository) or `unrar-free` from your package manager.
|
||||
|
||||
- :fontawesome-brands-apple: On macOS `unrar` can be installed through Homebrew's [`rar`](https://formulae.brew.sh/cask/rar) formula.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! warning ":fontawesome-brands-apple: macOS "Privacy & Security" Popup"
|
||||
On macOS, you may be met with a message similar to "**"unrar" Not Opened. Apple could not verify "unrar" is free of malware that may harm your Mac or compromise your privacy**" If you encounter this, then you'll need to go to the "Settings" app, navigate to "Privacy & Security", and scroll down to a section that says "**"unrar" was blocked from use because it is not from an identified developer.**" Click the "Open Anyway" button to allow unrar to be used.
|
||||
|
||||
- :fontawesome-brands-windows: On Windows you'll need to install either [`WinRAR`](https://www.rarlab.com/download.htm) or [`7-zip`](https://www.7-zip.org/) and add their folder to you `PATH`.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! tip "WinRAR License"
|
||||
Both `unrar` and `WinRAR` require a license, but since the evaluation copy has no time limit you can simply dismiss the prompt.
|
||||
|
||||
### ripgrep
|
||||
|
||||
A recommended tool to improve the performance of directory scanning is [`ripgrep`](https://github.com/BurntSushi/ripgrep), a Rust-based directory walker that natively integrates with our [`.ts_ignore`](./utilities/ignore.md) (`.gitignore`-style) pattern matching system for excluding files and directories. Ripgrep is already pre-installed on some Linux distributions and also available from several package managers.
|
||||
A recommended tool to improve the performance of directory scanning is [`ripgrep`](https://github.com/BurntSushi/ripgrep), a Rust-based directory walker that natively integrates with our [`.ts_ignore`](ignore.md) (`.gitignore`-style) pattern matching system for excluding files and directories. Ripgrep is already pre-installed on some Linux distributions and also available from several package managers.
|
||||
|
||||
13
docs/libraries.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
icon: material/database
|
||||
---
|
||||
|
||||
# :material-database: Libraries
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! info
|
||||
This page is a work in progress and needs to be updated with additional information.
|
||||
|
||||
The library is how TagStudio represents your chosen directory, with every file inside being represented by a [file entry](entries.md). You can have as many or few libraries as you wish, since each libraries' data is stored within a `.TagStudio` folder at its root. From there the library save file itself is stored as `ts_library.sqlite`, with TagStudio versions 9.4 and below using a the legacy `ts_library.json` format.
|
||||
|
||||
Note that this means [tags](tags.md) you create only exist _per-library_. Global tags along with other library structure updates are planned for future releases on the [roadmap](roadmap.md#library).
|
||||
@@ -2,7 +2,7 @@
|
||||
icon: material/database-edit
|
||||
---
|
||||
|
||||
# :material-database-edit: Save Format Changes
|
||||
# :material-database-edit: Library Format
|
||||
|
||||
This page outlines the various changes made to the TagStudio library save file format over time, sometimes referred to as the "database" or "database file".
|
||||
|
||||
@@ -14,9 +14,9 @@ Legacy (JSON) library save format versions were tied to the release version of t
|
||||
|
||||
### Versions 1.0.0 - 9.4.2
|
||||
|
||||
| Used From | Used Until | Format | Location |
|
||||
| --------- | ----------------------------------------------------------------------- | ------ | --------------------------------------------- |
|
||||
| v1.0.0 | [v9.4.2](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.4.2) | JSON | `<Library Folder>`/.TagStudio/ts_library.json |
|
||||
| Used From | Format | Location |
|
||||
| --------- | ------ | --------------------------------------------- |
|
||||
| v1.0.0 | JSON | `<Library Folder>`/.TagStudio/ts_library.json |
|
||||
|
||||
The legacy database format for public TagStudio releases [v9.1](https://github.com/TagStudioDev/TagStudio/tree/Alpha-v9.1) through [v9.4.2](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.4.2). Variations of this format had been used privately since v1.0.0.
|
||||
|
||||
@@ -48,9 +48,9 @@ These versions were used while developing the new SQLite file format, outside an
|
||||
|
||||
### Version 6
|
||||
|
||||
| Used From | Used Until | Format | Location |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [v9.5.0-pr1](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.0-pr1) | [v9.5.0-pr1](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.0-pr1) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
| Used From | Format | Location |
|
||||
| ------------------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [v9.5.0-pr1](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.0-pr1) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
|
||||
The first public version of the SQLite save file format.
|
||||
|
||||
@@ -60,9 +60,9 @@ Migration from the legacy JSON format is provided via a walkthrough when opening
|
||||
|
||||
### Version 7
|
||||
|
||||
| Used From | Used Until | Format | Location |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [v9.5.0-pr2](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.0-pr2) | [v9.5.0-pr3](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.0-pr3) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
| Used From | Format | Location |
|
||||
| ------------------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [v9.5.0-pr2](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.0-pr2) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
|
||||
- Repairs "Description" fields to use a TEXT_LINE key instead of a TEXT_BOX key.
|
||||
- Repairs tags that may have a disambiguation_id pointing towards a deleted tag.
|
||||
@@ -71,11 +71,11 @@ Migration from the legacy JSON format is provided via a walkthrough when opening
|
||||
|
||||
### Version 8
|
||||
|
||||
| Used From | Used Until | Format | Location |
|
||||
| ------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [v9.5.0-pr4](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.0-pr4) | [v9.5.1](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.1) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
| Used From | Format | Location |
|
||||
| ------------------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [v9.5.0-pr4](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.0-pr4) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
|
||||
- Adds the `color_border` column to the `tag_colors` table. Used for instructing the [secondary color](../library/tag_color.md#secondary-color) to apply to a tag's border as a new optional behavior.
|
||||
- Adds the `color_border` column to the `tag_colors` table. Used for instructing the [secondary color](colors.md#secondary-color) to apply to a tag's border as a new optional behavior.
|
||||
- Adds three new default colors: "Burgundy (TagStudio Shades)", "Dark Teal (TagStudio Shades)", and "Dark Lavender (TagStudio Shades)".
|
||||
- Updates Neon colors to use the new `color_border` property.
|
||||
|
||||
@@ -83,9 +83,9 @@ Migration from the legacy JSON format is provided via a walkthrough when opening
|
||||
|
||||
### Version 9
|
||||
|
||||
| Used From | Used Until | Format | Location |
|
||||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [v9.5.2](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.2) | [v9.5.3](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.3) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
| Used From | Format | Location |
|
||||
| ----------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [v9.5.2](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.2) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
|
||||
- Adds the `filename` column to the `entries` table. Used for sorting entries by filename in search results.
|
||||
|
||||
@@ -93,20 +93,20 @@ Migration from the legacy JSON format is provided via a walkthrough when opening
|
||||
|
||||
### Version 100
|
||||
|
||||
| Used From | Used Until | Format | Location |
|
||||
| ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [74383e3](https://github.com/TagStudioDev/TagStudio/commit/74383e3c3c12f72be1481ab0b86c7360b95c2d85) | [v9.5.4](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.4) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
| Used From | Format | Location |
|
||||
| ---------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [74383e3](https://github.com/TagStudioDev/TagStudio/commit/74383e3c3c12f72be1481ab0b86c7360b95c2d85) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
|
||||
- Introduces built-in minor versioning
|
||||
- The version number divided by 100 (and floored) constitutes the **major** version. Major version indicate breaking changes that prevent libraries from being opened in TagStudio versions older than the ones they were created in.
|
||||
- Values more precise than this ("ones" through "tens" columns) constitute the **minor** version. These indicate minor changes that don't prevent a newer library from being opened in an older version of TagStudio, as long as the major version is not also increased.
|
||||
- Swaps `parent_id` and `child_id` values in the `tag_parents` table, which have erroneously been flipped since the first SQLite DB version.
|
||||
- Swaps `parent_id` and `child_id` values in the `tag_parents` table
|
||||
|
||||
#### Version 101
|
||||
|
||||
| Used From | Used Until | Format | Location |
|
||||
| ----------------------------------------------------------------------- | ---------- | ------ | ----------------------------------------------- |
|
||||
| [v9.5.4](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.4) | _Current_ | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
| Used From | Format | Location |
|
||||
| ----------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [v9.5.4](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.4) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
|
||||
- Deprecates the `preferences` table, set to be removed in a future TagStudio version.
|
||||
- Introduces the `versions` table
|
||||
@@ -115,3 +115,20 @@ Migration from the legacy JSON format is provided via a walkthrough when opening
|
||||
- `'INITIAL'` stores the database version number in which in was created
|
||||
- Pre-existing databases set this number to `100`
|
||||
- `'CURRENT'` stores the current database version number
|
||||
|
||||
#### Version 102
|
||||
|
||||
| Used From | Format | Location |
|
||||
| ----------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [v9.5.4](https://github.com/TagStudioDev/TagStudio/releases/tag/v9.5.4) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
|
||||
- Applies repairs to the `tag_parents` table created in [version 100](#version-100), removing rows that reference tags that have been deleted.
|
||||
|
||||
#### Version 103
|
||||
|
||||
| Used From | Format | Location |
|
||||
| ----------------------------------------------------------------------- | ------ | ----------------------------------------------- |
|
||||
| [#1139](https://github.com/TagStudioDev/TagStudio/pull/1139) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
|
||||
|
||||
- Adds the `is_hidden` column to the `tags` table (default `0`). Used for excluding entries tagged with hidden tags from library searches.
|
||||
- Sets the `is_hidden` field on the built-in Archived tag to `1`, to match the Archived tag now being hidden by default.
|
||||
@@ -1,17 +0,0 @@
|
||||
---
|
||||
icon: material/shape-plus
|
||||
---
|
||||
|
||||
# :material-shape-plus: Tag Categories
|
||||
|
||||
The "Is Category" property of tags determines if a tag should be treated as a category itself when being organized inside the preview panel. Tags marked as categories will show themselves and all tags inheriting from it (including recursively) underneath a field-like section with the tag's name. This means that duplicates of tags can appear on entries if the tag inherits from multiple parent categories, however this is by design and reflects the nature of multiple inheritance. Any tags not inheriting from a category tag will simply show under a default "Tag" section.
|
||||
|
||||

|
||||
|
||||
### Built-In Tags and Categories
|
||||
|
||||
The built-in tags "Favorite" and "Archived" inherit from the built-in "Meta Tags" category which is marked as a category by default. This behavior of default tags can be fully customized by disabling the category option and/or by adding/removing the tags' Parent Tags.
|
||||
|
||||
### Migrating from v9.4 Libraries
|
||||
|
||||
Due to the nature of how tags and Tag Felids operated prior to v9.5, the organization style of Tag Categories vs Tag Fields is not 1:1. Instead of tags being organized into fields on a per-entry basis, tags themselves determine their organizational layout via the "Is Property" flag. Any tags _(not currently inheriting from either the "Favorite" or "Archived" tags)_ will be shown under the default "Tags" header upon migrating to the v9.5+ library format. Similar organization to Tag Fields can be achieved by using the built-in "Meta Tags" tag or any other marked with "Is Category" and then setting those tags as parents for other tags to inherit from.
|
||||
@@ -4,13 +4,13 @@ icon: material/script-text
|
||||
|
||||
# :material-script-text: Tools & Macros
|
||||
|
||||
Tools and macros are features that serve to create a more fluid [library](../library/index.md)-managing process, or provide some extra functionality. Please note that some are still in active development and will be fleshed out in future updates.
|
||||
Tools and macros are features that serve to create a more fluid [library](libraries.md)-managing process, or provide some extra functionality. Please note that some are still in active development and will be fleshed out in future updates.
|
||||
|
||||
## Tools
|
||||
|
||||
### Fix Unlinked Entries
|
||||
|
||||
This tool displays the number of unlinked [entries](../library/entry.md), and some options for their resolution.
|
||||
This tool displays the number of unlinked [entries](entries.md), and some options for their resolution.
|
||||
|
||||
Refresh
|
||||
: Scans through the library and updates the unlinked entry count.
|
||||
@@ -29,7 +29,7 @@ Load DupeGuru File
|
||||
: load the "results" file created from a DupeGuru scan
|
||||
|
||||
Mirror Entries
|
||||
: Duplicate entries will have their contents mirrored across all instances. This allows for duplicate files to then be deleted with DupeGuru as desired, without losing the [field](../library/field.md) data that has been assigned to either. (Once deleted, the "Fix Unlinked Entries" tool can be used to clean up the duplicates)
|
||||
: Duplicate entries will have their contents mirrored across all instances. This allows for duplicate files to then be deleted with DupeGuru as desired, without losing the [field](fields.md) data that has been assigned to either. (Once deleted, the "Fix Unlinked Entries" tool can be used to clean up the duplicates)
|
||||
|
||||
### Create Collage
|
||||
|
||||
@@ -43,8 +43,8 @@ Tool is in development and will be documented in a future update.
|
||||
|
||||
### Sort fields
|
||||
|
||||
Tool is in development. Will allow for user-defined sorting of [fields](../library/field.md).
|
||||
Tool is in development. Will allow for user-defined sorting of [fields](fields.md).
|
||||
|
||||
### Folders to Tags
|
||||
|
||||
Creates tags from the existing folder structure in the library, which are previewed in a hierarchy view for the user to confirm. A tag will be created for each folder and applied to all entries, with each subfolder being linked to the parent folder as a [parent tag](../library/tag.md#parent-tags). Tags will initially be named after the folders, but can be fully edited and customized afterwards.
|
||||
Creates tags from the existing folder structure in the library, which are previewed in a hierarchy view for the user to confirm. A tag will be created for each folder and applied to all entries, with each subfolder being linked to the parent folder as a [parent tag](tags.md#parent-tags). Tags will initially be named after the folders, but can be fully edited and customized afterwards.
|
||||
@@ -1,16 +1,8 @@
|
||||
# :material-database: Library
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! info
|
||||
This page is a work in progress and needs to be updated with additional information.
|
||||
|
||||
The library is how TagStudio represents your chosen directory, with every file inside being represented by a [file entry](./entry.md). You can have as many or few libraries as you wish, since each libraries' data is stored within a `.TagStudio` folder at its root. From there the library save file itself is stored as `ts_library.sqlite`, with TagStudio versions 9.4 and below using a the legacy `ts_library.json` format.
|
||||
|
||||
Note that this means [tags](./tag.md) you create only exist _per-library_. Global tags along with other library structure updates are planned for future releases on the [roadmap](../updates/roadmap.md#library).
|
||||
|
||||
---
|
||||
icon: material/image-check
|
||||
---
|
||||
|
||||
## Preview Support
|
||||
# :material-image-check: Supported Previews
|
||||
|
||||
TagStudio offers built-in preview and thumbnail support for a wide variety of file types. Files that don't have explicit support can still be added to your library like normal, they will just show a default icon for thumbnails and previews. TagStudio also references the file's [MIME](https://en.wikipedia.org/wiki/Media_type) type in an attempt to render previews for file types that haven't gained explicit support yet.
|
||||
|
||||
@@ -31,7 +23,7 @@ Images will generate thumbnails the first time they are viewed or since the last
|
||||
| OpenEXR | `.exr` | :material-minus-circle:{.lg .gray} |
|
||||
| OpenRaster | `.ora` | :material-minus-circle:{.lg .gray} |
|
||||
| PNG | `.png` | :material-minus-circle:{.lg .gray} |
|
||||
| SVG | `.svg` | :material-minus-circle:{.lg .gray} |
|
||||
| SVG | `.svg` | :material-close-circle:{.lg .red} |
|
||||
| TIFF | `.tiff`, `.tif` | :material-minus-circle:{.lg .gray} |
|
||||
| Valve Texture Format | `.vtf` | :material-close-circle:{.lg .red} |
|
||||
| WebP | `.webp` | :material-check-circle:{.lg .green} |
|
||||
@@ -51,7 +43,7 @@ Images will generate thumbnails the first time they are viewed or since the last
|
||||
|
||||
### :material-movie-open: Videos
|
||||
|
||||
Video thumbnails will default to the closest viable frame from the middle of the video. Both thumbnail generation and video playback in the Preview Panel requires [FFmpeg](../install.md#third-party-dependencies) installed on your system.
|
||||
Video thumbnails will default to the closest viable frame from the middle of the video. Both thumbnail generation and video playback in the Preview Panel requires [FFmpeg](install.md#third-party-dependencies) installed on your system.
|
||||
|
||||
| Filetype | Extensions | Dependencies |
|
||||
| --------------------- | ----------------------- | :----------: |
|
||||
@@ -69,7 +61,7 @@ Video thumbnails will default to the closest viable frame from the middle of the
|
||||
|
||||
### :material-sine-wave: Audio
|
||||
|
||||
Audio thumbnails will default to embedded cover art (if any) andfallback to generated waveform thumbnails. Audio file playback is supported in the Preview Panel if you have [FFmpeg](../install.md#third-party-dependencies) installed on your system. Audio waveforms are currently not cached.
|
||||
Audio thumbnails will default to embedded cover art (if any) and fallback to generated waveform thumbnails. Audio file playback is supported in the Preview Panel if you have [FFmpeg](install.md#third-party-dependencies) installed on your system. Audio waveforms are currently not cached.
|
||||
|
||||
| Filetype | Extensions | Dependencies |
|
||||
| ------------------- | ------------------------ | :----------: |
|
||||
@@ -77,7 +69,7 @@ Audio thumbnails will default to embedded cover art (if any) andfallback to gene
|
||||
| AIFF | `.aiff`, `.aif`, `.aifc` | FFmpeg |
|
||||
| Apple Lossless[^2] | `.alac`, `.aac` | FFmpeg |
|
||||
| FLAC | `.flac` | FFmpeg |
|
||||
| MP3 | `.mp3`, | FFmpeg |
|
||||
| MP3 | `.mp3` | FFmpeg |
|
||||
| Ogg | `.ogg` | FFmpeg |
|
||||
| WAVE | `.wav`, `.wave` | FFmpeg |
|
||||
| Windows Media Audio | `.wma` | FFmpeg |
|
||||
@@ -86,26 +78,47 @@ Audio thumbnails will default to embedded cover art (if any) andfallback to gene
|
||||
|
||||
Preview support for office documents or well-known project file formats varies by the format and whether or not embedded thumbnails are available to be read from. OpenDocument-based files are typically supported.
|
||||
|
||||
| Filetype | Extensions | Preview Type |
|
||||
| ----------------------------- | --------------------- | -------------------------------------------------------------------------- |
|
||||
| Blender | `.blend`, `.blend<#>` | Embedded thumbnail :material-alert-circle:{ title="If available in file" } |
|
||||
| Keynote (Apple iWork) | `.key` | Embedded thumbnail |
|
||||
| Krita[^3] | `.kra`, `.krz` | Embedded thumbnail :material-alert-circle:{ title="If available in file" } |
|
||||
| MuseScore | `.mscz` | Embedded thumbnail :material-alert-circle:{ title="If available in file" } |
|
||||
| Numbers (Apple iWork) | `.numbers` | Embedded thumbnail |
|
||||
| OpenDocument Presentation | `.odp`, `.fodp` | Embedded thumbnail |
|
||||
| OpenDocument Spreadsheet | `.ods`, `.fods` | Embedded thumbnail |
|
||||
| OpenDocument Text | `.odt`, `.fodt` | Embedded thumbnail |
|
||||
| Pages (Apple iWork) | `.pages` | Embedded thumbnail |
|
||||
| PDF | `.pdf` | First page render |
|
||||
| Photoshop | `.psd` | Flattened image render |
|
||||
| PowerPoint (Microsoft Office) | `.pptx`, `.ppt` | Embedded thumbnail :material-alert-circle:{ title="If available in file" } |
|
||||
| Filetype | Extensions | Preview Type |
|
||||
|--------------------------------------| --------------------- | -------------------------------------------------------------------------- |
|
||||
| Blender | `.blend`, `.blend<#>` | Embedded thumbnail :material-alert-circle:{ title="If available in file" } |
|
||||
| Clip Studio Paint | `.clip` | Embedded thumbnail |
|
||||
| Keynote (Apple iWork) | `.key` | Embedded thumbnail |
|
||||
| Krita[^3] | `.kra`, `.krz` | Embedded thumbnail :material-alert-circle:{ title="If available in file" } |
|
||||
| Mdipack (FireAlpaca, Medibang Paint) | `.mdp` | Embedded thumbnail |
|
||||
| MuseScore | `.mscz` | Embedded thumbnail :material-alert-circle:{ title="If available in file" } |
|
||||
| Numbers (Apple iWork) | `.numbers` | Embedded thumbnail |
|
||||
| OpenDocument Presentation | `.odp`, `.fodp` | Embedded thumbnail |
|
||||
| OpenDocument Spreadsheet | `.ods`, `.fods` | Embedded thumbnail |
|
||||
| OpenDocument Text | `.odt`, `.fodt` | Embedded thumbnail |
|
||||
| Pages (Apple iWork) | `.pages` | Embedded thumbnail |
|
||||
| Paint.NET | `.pdn` | Embedded thumbnail |
|
||||
| PDF | `.pdf` | First page render |
|
||||
| Photoshop | `.psd` | Flattened image render |
|
||||
| PowerPoint (Microsoft Office) | `.pptx`, `.ppt` | Embedded thumbnail :material-alert-circle:{ title="If available in file" } |
|
||||
|
||||
### 3D Models
|
||||
### :material-archive: Archives
|
||||
|
||||
Archive thumbnails will display the first image from the archive within the Preview Panel.
|
||||
|
||||
| Filetype | Extensions |
|
||||
|----------|----------------|
|
||||
| 7-Zip | `.7z`, `.s7z` |
|
||||
| RAR | `.rar` |
|
||||
| Tar | `.tar`, `.tgz` |
|
||||
| Zip | `.zip` |
|
||||
|
||||
### :material-book: eBooks
|
||||
|
||||
| Filetype | Extensions | Preview Type |
|
||||
| ------------------ | ----------------------------- | ---------------------------- |
|
||||
| EPUB | `.epub` | Embedded cover |
|
||||
| Comic Book Archive | `.cbr`, `.cbt` `.cbz`, `.cb7` | Embedded cover or first page |
|
||||
|
||||
### :material-cube-outline: 3D Models
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! failure "3D Model Support"
|
||||
TagStudio does not currently support previews for 3D model files *(outside of Blender project embedded thumbnails)*. This is on our [roadmap](../updates/roadmap.md#uiux) for future features.
|
||||
TagStudio does not currently support previews for 3D model files *(outside of Blender project embedded thumbnails)*. This is on our [roadmap](roadmap.md#uiux) for a future release.
|
||||
|
||||
### :material-format-font: Fonts
|
||||
|
||||
@@ -123,7 +136,7 @@ Font thumbnails will use a "Aa" example preview of the font, with a full alphanu
|
||||
!!! info "Plain Text Support"
|
||||
TagStudio supports the *vast* majority of files considered to be "[plain text](https://en.wikipedia.org/wiki/Plain_text)". If an extension or format is not listed here, odds are it's still supported anyway.
|
||||
|
||||
Text files render the first 256 bytes of text information to an image preview for thumbnails and the Preview Panel. Improved thumbnails, full scrollable text, and syntax highlighting are on our [roadmap](../updates/roadmap.md#uiux) for future features.
|
||||
Text files render the first 256 bytes of text information to an image preview for thumbnails and the Preview Panel. Improved thumbnails, full scrollable text, and syntax highlighting are on our [roadmap](roadmap.md#uiux) for future features.
|
||||
|
||||
| Filetype | Extensions | Syntax Highlighting |
|
||||
| ---------- | --------------------------------------------- | :--------------------------------: |
|
||||
@@ -136,12 +149,6 @@ Text files render the first 256 bytes of text information to an image preview fo
|
||||
| XML | `.xml`, `.xul` | :material-close-circle:{.lg .red} |
|
||||
| YAML | `.yaml`, `.yml` | :material-close-circle:{.lg .red} |
|
||||
|
||||
### :material-file: Other
|
||||
|
||||
| Filetype | Extensions | Preview Type |
|
||||
| -------- | ---------- | -------------------- |
|
||||
| EPUB | `.epub` | Embedded ebook cover |
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[^1]:
|
||||
The `.jpg_large` extension is unofficial and instead the byproduct of how [Google Chrome used to download images from Twitter](https://fileinfo.com/extension/jpg_large). Since this mangled extension is still in circulation, TagStudio supports it.
|
||||
@@ -39,8 +39,8 @@ Must be finalized or deemed "feature complete" before other core features are de
|
||||
!!! note
|
||||
See the "[Library](#library)" section for features related to the library database rather than the underlying schema.
|
||||
|
||||
- [x] A SQLite-based library save file format **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [ ] Cached File Properties Table :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [x] A SQLite-based library save file format **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [ ] Cached File Properties Table :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [x] Date Entry Added to Library :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Date File Created :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Date File Modified :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
@@ -77,16 +77,16 @@ A detailed written specification for the TagStudio tag and/or library format. In
|
||||
- [ ] Lightbox View :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- Similar to List View in concept, but displays one large preview that can cycle back/forth between entries.
|
||||
- [ ] Smaller thumbnails of immediate adjacent entries below :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
- [x] Library Statistics Screen :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.5.4]**
|
||||
- [ ] Unified Library Health/Cleanup Screen :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.5.4]**
|
||||
- [x] Library Statistics Screen **[[v9.5.4](changelog.md#954-september-1st-2025)]**
|
||||
- [x] Unified Library Health/Cleanup Screen **[[v9.5.4](changelog.md#954-september-1st-2025)]**
|
||||
- [x] Fix Unlinked Entries
|
||||
- [x] Fix Duplicate Files
|
||||
- [x] ~~Fix Duplicate Entries~~
|
||||
- [ ] Remove Ignored Entries :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.5.4]**
|
||||
- [ ] Delete Old Backups :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.5.5]**
|
||||
- [ ] Delete Legacy JSON File :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.5.5]**
|
||||
- [x] Remove Ignored Entries **[[v9.5.4](changelog.md#954-september-1st-2025)]**
|
||||
- [x] Delete Old Backups **[[v9.5.4](changelog.md#954-september-1st-2025)]**
|
||||
- [x] Delete Legacy JSON File **[[v9.5.4](changelog.md#954-september-1st-2025)]**
|
||||
- [x] Translations
|
||||
- [ ] Search Bar Rework :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.7.0]**
|
||||
- [ ] Search Bar Rework :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.7.x]**
|
||||
- [ ] Improved Tag Autocomplete :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Tags appear as widgets in search bar :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [x] Unified Media Player
|
||||
@@ -111,9 +111,9 @@ A detailed written specification for the TagStudio tag and/or library format. In
|
||||
- [ ] Recent Tags
|
||||
- [ ] Tag Search
|
||||
- [ ] Pinned Tags
|
||||
- [ ] New Tabbed Tag Building UI to Support New Tag Features :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] New Tabbed Tag Building UI to Support New Tag Features :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Custom Thumbnail Overrides :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
- [ ] Media Duration Labels :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Media Duration Labels :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Word/Line Count Labels :material-chevron-up:{ .priority-low title="Low Priority" }
|
||||
- [ ] Custom Tag Badges :material-chevron-up:{ .priority-low title="Low Priority" }
|
||||
- Would serve as an addition/alternative to the Favorite and Archived badges.
|
||||
@@ -125,7 +125,7 @@ A detailed written specification for the TagStudio tag and/or library format. In
|
||||
- [x] Language
|
||||
- [x] Date and Time Format
|
||||
- [x] Theme
|
||||
- [x] Thumbnail Generation :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.5.4]**
|
||||
- [x] Thumbnail Generation **[[v9.5.4](changelog.md#954-september-1st-2025)]**
|
||||
- [x] Configurable Page Size
|
||||
- [ ] Library Settings :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Stored in `.TagStudio` folder :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
@@ -140,24 +140,24 @@ Some form of official plugin support for TagStudio, likely with its own API that
|
||||
|
||||
---
|
||||
|
||||
## [Library](../library/index.md)
|
||||
## [Library](libraries.md)
|
||||
|
||||
### :material-wrench: Library Mechanics
|
||||
|
||||
- [x] Per-Library Tags
|
||||
- [ ] Global Tags :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Multiple Root Directories :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Ability to store TagStudio library folder separate from library files :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Automatic Entry Relinking :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.7.0]**
|
||||
- [ ] Multiple Root Directories :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Ability to store TagStudio library folder separate from library files :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Automatic Entry Relinking :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.7.x]**
|
||||
- [ ] Detect Renames :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Detect Moves :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Detect Deletions :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Performant :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Background File Scanning :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.7.0]**
|
||||
- [x] Thumbnail Caching **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [ ] Audio Waveform Caching :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.7.0]**
|
||||
- [ ] Background File Scanning :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.7.x]**
|
||||
- [x] Thumbnail Caching **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [ ] Audio Waveform Caching :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.7.x]**
|
||||
|
||||
### :material-grid: [Entries](../library/entry.md)
|
||||
### :material-grid: [Entries](entries.md)
|
||||
|
||||
Library representations of files or file-like objects.
|
||||
|
||||
@@ -167,10 +167,10 @@ Library representations of files or file-like objects.
|
||||
- [x] Fields
|
||||
- [x] Text Lines
|
||||
- [x] Text Boxes
|
||||
- [x] Datetimes **[v9.5.4]**
|
||||
- [ ] User-Titled Fields :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Removal of Deprecated Fields :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Entry Groups :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.7.0]**
|
||||
- [x] Datetimes **[[v9.5.4](changelog.md#954-september-1st-2025)]**
|
||||
- [ ] User-Titled Fields :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Removal of Deprecated Fields :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Entry Groups :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.7.x]**
|
||||
- [ ] Non-exclusive; Entries can be in multiple groups :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Ability to number entries within group :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Ability to set sorting method for group :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
@@ -178,80 +178,80 @@ Library representations of files or file-like objects.
|
||||
- [ ] Group is treated as entry with tags and metadata :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
- [ ] Nested groups :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
|
||||
### :material-tag-text: [Tags](../library/tag.md)
|
||||
### :material-tag-text: [Tags](tags.md)
|
||||
|
||||
Discrete library objects representing [attributes](<https://en.wikipedia.org/wiki/Property_(philosophy)>). Can be applied to library [entries](../library/entry.md), or applied to other tags to build traversable relationships.
|
||||
Discrete library objects representing [attributes](<https://en.wikipedia.org/wiki/Property_(philosophy)>). Can be applied to library [entries](entries.md), or applied to other tags to build traversable relationships.
|
||||
|
||||
- [x] Tag Name **[v8.0.0]**
|
||||
- [x] Tag Shorthand Name **[v8.0.0]**
|
||||
- [x] Tag Aliases List **[v8.0.0]**
|
||||
- [x] Tag Color **[v8.0.0]**
|
||||
- [ ] Tag Description :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.6.0]**
|
||||
- [ ] Tag Description :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.6.x]**
|
||||
- [x] Tag Colors
|
||||
- [x] Built-in Color Palette **[v8.0.0]**
|
||||
- [x] User-Defined Colors **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [x] Primary and Secondary Colors **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [ ] Tag Icons :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Small Icons :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Large Icons for Profiles :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.6.0]**
|
||||
- [ ] Built-in Icon Packs (i.e. Boxicons) :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] User-Defined Icons :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [x] [Category Property](../library/tag_categories.md) **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [x] User-Defined Colors **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [x] Primary and Secondary Colors **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [ ] Tag Icons :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Small Icons :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Large Icons for Profiles :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.6.x]**
|
||||
- [ ] Built-in Icon Packs (i.e. Boxicons) :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] User-Defined Icons :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [x] [Category Property](tags.md#is-category) **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [x] Property available for tags that allow the tag and any inheriting from it to be displayed separately in the preview panel under a title
|
||||
- [ ] Fine-tuned exclusion from categories :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Hidden Property :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Built-in "Archived" tag has this property by default :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Checkbox near search bar to show hidden tags in search :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Fine-tuned exclusion from categories :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Hidden Property :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Built-in "Archived" tag has this property by default :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Checkbox near search bar to show hidden tags in search :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Tag Relationships
|
||||
- [x] [Parent Tags](../library/tag.md#parent-tags) ([Inheritance](<https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)>) Relationship) **[v9.0.0]**
|
||||
- [ ] [Component Tags](../library/tag.md#component-tags) ([Composition](https://en.wikipedia.org/wiki/Object_composition) Relationship) :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Multiple Language Support :material-chevron-up:{ .priority-low title="Low Priority" } **[v9.9.0]**
|
||||
- [x] [Parent Tags](tags.md#parent-tags) ([Inheritance](<https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)>) Relationship) **[v9.0.0]**
|
||||
- [ ] [Component Tags](tags.md#component-tags) ([Composition](https://en.wikipedia.org/wiki/Object_composition) Relationship) :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Multiple Language Support :material-chevron-up:{ .priority-low title="Low Priority" } **[v9.9.x]**
|
||||
- [ ] Tag Overrides :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
- [ ] Tag Merging :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
|
||||
### :material-magnify: [Search](../library/library_search.md)
|
||||
### :material-magnify: [Search](search.md)
|
||||
|
||||
- [x] Tag Search **[v8.0.0]**
|
||||
- [x] Filename Search **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [x] Glob Search **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [x] Filetype Search **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [x] Search by Extension (e.g. ".jpg", ".png") **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [x] Optional consolidation of extension synonyms (i.e. ".jpg" can equal ".jpeg") **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [x] Search by media type (e.g. "image", "video", "document") **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [ ] Field Content Search :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [x] [Boolean Operators](../library/library_search.md) **[[v9.5.0](./changelog.md#950-2025-03-03)]**
|
||||
- [x] Filename Search **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [x] Glob Search **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [x] Filetype Search **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [x] Search by Extension (e.g. ".jpg", ".png") **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [x] Optional consolidation of extension synonyms (i.e. ".jpg" can equal ".jpeg") **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [x] Search by media type (e.g. "image", "video", "document") **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [ ] Field Content Search :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [x] [Boolean Operators](search.md) **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [x] `AND` Operator
|
||||
- [x] `OR` Operator
|
||||
- [x] `NOT` Operator
|
||||
- [x] Parenthesis Grouping
|
||||
- [x] Character Escaping
|
||||
- [ ] `HAS` Operator (for [Component Tags](../library/tag.md#component-tags)) :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Conditional Search :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.7.0]**
|
||||
- [ ] `HAS` Operator (for [Component Tags](tags.md#component-tags)) :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Conditional Search :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.7.x]**
|
||||
- [ ] Compare Dates :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
- [ ] Compare Durations :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
- [ ] Compare File Sizes :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
- [ ] Compare Dimensions :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
- [x] Smartcase Search [[v9.5.0](./changelog.md#950-2025-03-03)]
|
||||
- [x] Smartcase Search **[[v9.5.0](changelog.md#950-march-3rd-2025)]**
|
||||
- [ ] Search Result Sorting
|
||||
- [x] Sort by Filename **[[v9.5.2](./changelog.md#952-2025-03-31)]**
|
||||
- [x] Sort by Date Entry Added to Library **[[v9.5.2](./changelog.md#952-2025-03-31)]**
|
||||
- [ ] Sort by File Creation Date :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Sort by File Modification Date :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [x] Sort by Filename **[[v9.5.2](changelog.md#952-march-31st-2025)]**
|
||||
- [x] Sort by Date Entry Added to Library **[[v9.5.2](changelog.md#952-march-31st-2025)]**
|
||||
- [ ] Sort by File Creation Date :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Sort by File Modification Date :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [ ] Sort by File Modification Date :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Sort by Date Taken (Photos) :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.0]**
|
||||
- [ ] Sort by Date Taken (Photos) :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.6.x]**
|
||||
- [x] Random/Shuffle Sort
|
||||
- [ ] OCR Search :material-chevron-up:{ .priority-low title="Low Priority" }
|
||||
- [ ] Fuzzy Search :material-chevron-up:{ .priority-low title="Low Priority" }
|
||||
|
||||
### :material-file-cog: [Macros](../utilities/macro.md)
|
||||
### :material-file-cog: [Macros](macros.md)
|
||||
|
||||
- [ ] Standard, Human Readable Format (TOML) :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.5.5]**
|
||||
- [ ] Versioning System :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.5.5]**
|
||||
- [ ] Triggers **[v9.5.5]**
|
||||
- [ ] Standard, Human Readable Format (TOML) :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.5.x]**
|
||||
- [ ] Versioning System :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.5.x]**
|
||||
- [ ] Triggers **[v9.5.x]**
|
||||
- [ ] On File Added :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] On Library Refresh :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] [...]
|
||||
- [ ] Actions **[v9.5.5]**
|
||||
- [ ] Actions **[v9.5.x]**
|
||||
- [ ] Add Tag(s) :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Add Field(s) :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Set Field Content :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
@@ -262,22 +262,22 @@ Discrete library objects representing [attributes](<https://en.wikipedia.org/wik
|
||||
Sharable TagStudio library data in the form of data packs (tags, colors, etc.) or other formats.
|
||||
Packs are intended as an easy way to import and export specific data between libraries and users, while export-only formats are intended to be imported by other programs.
|
||||
|
||||
- [ ] Color Packs :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.5.5]**
|
||||
- [ ] Color Packs :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.5.x]**
|
||||
- [ ] Importable
|
||||
- [ ] Exportable
|
||||
- [x] UUIDs + Namespaces :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [x] Standard, Human Readable Format (TOML) :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Versioning System :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
- [ ] Tag Packs :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.9.0]**
|
||||
- [ ] Tag Packs :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.9.x]**
|
||||
- [ ] Importable :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Exportable :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] UUIDs + Namespaces :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Standard, Human Readable Format (TOML) :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Versioning System :material-chevron-double-up:{ .priority-med title="Medium Priority" }
|
||||
- [ ] Macro Sharing :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.5.5]**
|
||||
- [ ] Macro Sharing :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v9.5.x]**
|
||||
- [ ] Importable :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Exportable :material-chevron-triple-up:{ .priority-high title="High Priority" }
|
||||
- [ ] Sharable Entry Data :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.9.0]**
|
||||
- [ ] Sharable Entry Data :material-chevron-double-up:{ .priority-med title="Medium Priority" } **[v9.9.x]**
|
||||
- _Specifics of this are yet to be determined_
|
||||
- [ ] Export Library to Human Readable Format :material-chevron-triple-up:{ .priority-high title="High Priority" } **[v10.0.0]**
|
||||
- Intended to give users more flexible options with their data if they wish to migrate away from TagStudio
|
||||
@@ -2,7 +2,7 @@
|
||||
icon: material/magnify
|
||||
---
|
||||
|
||||
# :material-magnify: Search
|
||||
# :material-magnify: Searching
|
||||
|
||||
TagStudio provides various methods to search your library, ranging from TagStudio data such as tags to inherent file data such as paths or media types.
|
||||
|
||||
@@ -58,13 +58,13 @@ Sometimes search queries have ambiguous characters and need to be "escaped". Thi
|
||||
|
||||
## Tags
|
||||
|
||||
[Tag](#tags) search is the default mode of file entry search in TagStudio. No keyword prefix is required, however using `tag:` will also work. The tag search attempts to match tag [names](./tag.md#name), [shorthands](./tag.md#shorthand), [aliases](./tag.md#aliases), as well as allows for tags to [substitute](./tag.md#intuition-via-substitution) in for any of their [parent tags](./tag.md#parent-tags).
|
||||
[Tag](#tags) search is the default mode of file entry search in TagStudio. No keyword prefix is required, however using `tag:` will also work. The tag search attempts to match tag [names](tags.md#name), [shorthands](tags.md#shorthand), [aliases](tags.md#aliases), as well as allows for tags to [substitute](tags.md#intuition-via-substitution) in for any of their [parent tags](tags.md#parent-tags).
|
||||
|
||||
You may also see the `tag_id:` prefix keyword show up when using the right-click "Search for Tag" option on tags. This is meant for internal use, and eventually will not be displayed or accessible to the user.
|
||||
|
||||
## Fields
|
||||
|
||||
_[Field](./field.md) search is currently not in the program, however is coming in a future version._
|
||||
_[Field](fields.md) search is currently not in the program, however is coming in a future version._
|
||||
|
||||
## File Entry Search
|
||||
|
||||
96
docs/style.md
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
icon: material/sign-text
|
||||
---
|
||||
|
||||
# :material-sign-text: Style Guide
|
||||
|
||||
## Formatting
|
||||
|
||||
Most of the style guidelines can be checked, fixed, and enforced via Ruff. Older code may not be adhering to all of these guidelines, in which case _"do as I say, not as I do"..._
|
||||
|
||||
- Do your best to write clear, concise, and modular code.
|
||||
- This should include making methods private by default (e.g. `__method()`)
|
||||
- Methods should only be protected (e.g. `_method()`) or public (e.g. `method()`) when needed and warranted
|
||||
- Keep a maximum column width of no more than **100** characters.
|
||||
- Code comments should be used to help describe sections of code that can't speak for themselves.
|
||||
- Use [Google style](https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings) docstrings for any classes and functions you add.
|
||||
- If you're modifying an existing function that does _not_ have docstrings, you don't _have_ to add docstrings to it... but it would be pretty cool if you did ;)
|
||||
- Imports should be ordered alphabetically.
|
||||
- Lists of values should be ordered using their [natural sort order](https://en.wikipedia.org/wiki/Natural_sort_order).
|
||||
- Some files have their methods ordered alphabetically as well (i.e. [`thumb_renderer`](https://github.com/TagStudioDev/TagStudio/blob/main/src/tagstudio/qt/widgets/thumb_renderer.py)). If you're working in a file and notice this, please try and keep to the pattern.
|
||||
- When writing text for window titles or form titles, use "[Title Case](https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case)" capitalization. Your IDE may have a command to format this for you automatically, although some may incorrectly capitalize short prepositions. In a pinch you can use a website such as [capitalizemytitle.com](https://capitalizemytitle.com/) to check.
|
||||
- If it wasn't mentioned above, then stick to [**PEP-8**](https://peps.python.org/pep-0008/)!
|
||||
|
||||
## Qt
|
||||
|
||||
As of writing this section, the QT part of the code base is quite unstructured and the View and Controller parts are completely intermixed[^1]. This makes maintenance, fixes and general understanding of the code base quite challenging, because the interesting parts you are looking for are entangled in a bunch of repetitive UI setup code. To address this we are aiming to more strictly separate the view and controller aspects of the QT frontend.
|
||||
|
||||
The general structure of the QT code base should look like this:
|
||||
|
||||
```
|
||||
qt
|
||||
├── controllers
|
||||
│ ├── widgets
|
||||
│ │ └── preview_panel_controller.py
|
||||
│ └── main_window_controller.py
|
||||
├── views
|
||||
│ ├── widgets
|
||||
│ │ └── preview_panel_view.py
|
||||
│ └── main_window_view.py
|
||||
├── ts_qt.py
|
||||
└── mixed.py
|
||||
```
|
||||
|
||||
In this structure there are the `views` and `controllers` sub-directories. They have the exact same structure and for every `<component>_view.py` there is a `<component>_controller.py` at the same location in the other subdirectory and vice versa.
|
||||
|
||||
Typically the classes should look like this:
|
||||
|
||||
```py
|
||||
# my_cool_widget_view.py
|
||||
class MyCoolWidgetView(QWidget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.__button = QPushButton()
|
||||
self.__color_dropdown = QComboBox()
|
||||
# ...
|
||||
self.__connect_callbacks()
|
||||
|
||||
def __connect_callbacks(self):
|
||||
self.__button.clicked.connect(self._button_click_callback)
|
||||
self.__color_dropdown.currentIndexChanged.connect(
|
||||
lambda idx: self._color_dropdown_callback(self.__color_dropdown.itemData(idx))
|
||||
)
|
||||
|
||||
def _button_click_callback(self):
|
||||
raise NotImplementedError()
|
||||
```
|
||||
|
||||
```py
|
||||
# my_cool_widget_controller.py
|
||||
class MyCoolWidget(MyCoolWidgetView):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def _button_click_callback(self):
|
||||
print("Button was clicked!")
|
||||
|
||||
def _color_dropdown_callback(self, color: Color):
|
||||
print(f"The selected color is now: {color}")
|
||||
```
|
||||
|
||||
Observe the following key aspects of this example:
|
||||
|
||||
- The Controller is just called `MyCoolWidget` instead of `MyCoolWidgetController` as it will be directly used by other code
|
||||
- The UI elements are in private variables
|
||||
- This enforces that the controller shouldn't directly access UI elements
|
||||
- Instead the view should provide a protected API (e.g. `_get_color()`) for things like setting/getting the value of a dropdown, etc.
|
||||
- Instead of `_get_color()` there could also be a `_color` method marked with `@property`
|
||||
- The callback methods are already defined as protected methods with NotImplementedErrors
|
||||
- Defines the interface the callbacks
|
||||
- Enforces that UI events be handled
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! tip
|
||||
A good (non-exhaustive) rule of thumb is: If it requires a non-UI import, then it doesn't belong in the `*_view.py` file.
|
||||
|
||||
[^1]: For an explanation of the Model-View-Controller (MVC) Model, checkout this article: [MVC Framework Introduction](https://www.geeksforgeeks.org/mvc-framework-introduction/).
|
||||
@@ -26,6 +26,36 @@
|
||||
);
|
||||
}
|
||||
|
||||
.md-tabs {
|
||||
background: none;
|
||||
font-family: "Bai Jamjuree", Roboto, sans-serif;
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.05rem !important;
|
||||
}
|
||||
.md-tabs__link {
|
||||
opacity: 1;
|
||||
color: var(--md-default-fg-color--light);
|
||||
padding: 0.1rem;
|
||||
}
|
||||
.md-tabs__link:hover {
|
||||
color: var(--md-accent-fg-color) !important;
|
||||
}
|
||||
.md-tabs__item--active {
|
||||
color: var(--md-typeset-a-color) !important;
|
||||
|
||||
border-color: var(--md-typeset-a-color) !important;
|
||||
border-width: 0 0 2px 0 !important;
|
||||
border: solid;
|
||||
}
|
||||
.md-tabs__item {
|
||||
height: 1.8rem;
|
||||
}
|
||||
.md-tabs__link {
|
||||
font-size: 0.8rem;
|
||||
margin-top: 0.2rem;
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
|
||||
/* Mobile Nav Header */
|
||||
.md-nav__source {
|
||||
background: linear-gradient(
|
||||
@@ -43,6 +73,15 @@ td {
|
||||
padding: 0.5em 1em 0.5em 1em !important;
|
||||
}
|
||||
|
||||
.md-typeset ul li ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
|
||||
.md-typeset ul li {
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
|
||||
.md-header {
|
||||
border-style: solid;
|
||||
border-width: 0 0 2px 0;
|
||||
|
||||
@@ -12,3 +12,16 @@ h2 {
|
||||
font-size: 1rem !important;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
.md-content {
|
||||
margin-left: 5.5rem;
|
||||
margin-right: 5.5rem;
|
||||
}
|
||||
|
||||
/* Keeps four cards in a square on all screens */
|
||||
@media screen and (max-width: 64em) {
|
||||
.md-content {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,15 +26,15 @@ This is a special type of alias that's used for shortening the tag name under sp
|
||||
|
||||
Aliases are alternate names that the tag can go by. This may include individual first names for people, alternate spellings, shortened names, and more. If there's a common abbreviation or shortened name for your tag, it's recommended to use the [shorthand](#shorthand) field for this instead.
|
||||
|
||||
When searching for a tag, aliases (including the shorthand) can also be used to find the tag. This not only includes searching for tags themselves, but for tagged [file entries](./entry.md) as well!
|
||||
When searching for a tag, aliases (including the shorthand) can also be used to find the tag. This not only includes searching for tags themselves, but for tagged [file entries](entries.md) as well!
|
||||
|
||||
### Automatic Disambiguation
|
||||
### Disambiguation
|
||||
|
||||
Just as in real life, sometimes there are different attributes that share the same name with one another. The process of adding specificity to something in order to not confuse it with something similar is known as [disambiguation](https://en.wikipedia.org/wiki/Word-sense_disambiguation). In TagStudio we give the option to automatically disambiguate tag names based on a specially marked [Parent Tag](#parent-tags). Parent tags are explained in further detail below, but for the purposes of tag names they can lend themselves to clarifying the name of a tag without the user needing to manually change the name or add complicated aliases.
|
||||
|
||||
Given a tag named "Freddy", we may confuse it with other "Freddy" tags in our library. There are lots of Freddys in the world, after all. If we're talking about Freddy from "Five Nights at Freddy's", then we may already (and likely should) have a separate "Five Nights at Freddy's" tag added as a parent tag. When the disambiguation box next to a parent tag is selected (see image below) then our tag name will automatically display its name with that parent tag's name (or shorthand if available) in parentheses.
|
||||
|
||||

|
||||

|
||||
|
||||
So if the "Five Nights at Freddy's" tag is added as a parent tag on the "Freddy" tag, and the disambiguation box next to it is checked, then our tag name will automatically be displayed as "Freddy (Five Nights at Freddy's)". Better yet, if the "Five Nights at Freddy's" tag has a shorthand such as "FNAF", then our "Freddy" tag will be displayed as "Freddy (FNAF)". This process preserves our base tag name ("Freddy") and provides an option to get a clean and consistent method to display disambiguating parent categories, rather than having to type this information in manually for each applicable tag.
|
||||
|
||||
@@ -52,7 +52,7 @@ One of the core properties of tags in TagStudio is their ability to form relatio
|
||||
|
||||
In a system where tags have no relationships, you're required to add as many tags as you possibly can to describe every last element of an image or file. If you want to tag an image of Shrek, you need to add a tag for `Shrek` himself, a `Character` tag since he's a character, a `Movie` and perhaps `Dreamworks` tag since he's a character from a movie, or perhaps a `Book` tag if we're talking about the original character, and then of course tags for every other attribute of Shrek shown or implied. By allowing tags to have inheritance relationships, we can have a single `Shrek` tag inherit from `Character` (Shrek IS a character) as well as from a separate `Shrek (Movie Franchise)` tag that itself inherits from `Movie Franchise` and `Dreamworks`. Now by simply adding the `Shrek` tag to an image, we've effectively also added the `Character`, `Shrek (Move Franchise)`, `Movie Franchise`, and `Dreamworks` attributes all in one go. On the image entry itself we only see `Shrek`, but the rest of the attributes are implied.
|
||||
|
||||

|
||||

|
||||
|
||||
#### Intuition via Substitution
|
||||
|
||||
@@ -64,7 +64,9 @@ Lastly, when searching your files with broader categories such as `Character` or
|
||||
|
||||
### Component Tags
|
||||
|
||||
**_Coming in version 9.6_**
|
||||
<!-- prettier-ignore -->
|
||||
!!! warning ""
|
||||
**_Coming in version 9.6.x_**
|
||||
|
||||
Component tags will be built from a composition-based, or "HAS" type relationship between tags. This takes care of instances where an attribute may "have" another attribute, but doesn't inherit from it. Shrek may be an `Ogre`, he may be a `Character`, but he is NOT a `Leather Vest` - even if he's commonly seen _with_ it. Component tags, along with the upcoming "Tag Override" feature, are built to handle these cases in a way that still simplifies the tagging process without adding too much undue complexity for the user.
|
||||
|
||||
@@ -74,17 +76,19 @@ Component tags will be built from a composition-based, or "HAS" type relationshi
|
||||
|
||||
Tags use a default uncolored appearance by default, however can take on a number of built-in and user-created colors and color palettes! Tag color palettes can be based on a single color value (see: TagStudio Standard, TagStudio Shades, TagStudio Pastels) or use an optional secondary color use for the text and optionally the tag border (e.g. TagStudio Neon).
|
||||
|
||||

|
||||

|
||||
|
||||
#### User-Created Colors
|
||||
|
||||
Custom palettes and colors can be created via the [Tag Color Manager](./tag_color.md). These colors will display alongside the built-in colors inside the tag selection window and are separated by their namespace names. Colors which use the secondary color for the tag border will be outlined in that color, otherwise they will only display the secondary color on the bottom of the swatch to indicate at a glance that the text colors are different.
|
||||
Custom palettes and colors can be created via the [Tag Color Manager](colors.md). These colors will display alongside the built-in colors inside the tag selection window and are separated by their namespace names. Colors which use the secondary color for the tag border will be outlined in that color, otherwise they will only display the secondary color on the bottom of the swatch to indicate at a glance that the text colors are different.
|
||||
|
||||

|
||||

|
||||
|
||||
### Icon
|
||||
|
||||
**_Coming in version 9.6_**
|
||||
<!-- prettier-ignore -->
|
||||
!!! warning ""
|
||||
**_Coming in version 9.6.x_**
|
||||
|
||||
## Tag Properties
|
||||
|
||||
@@ -92,13 +96,25 @@ Properties are special attributes of tags that change their behavior in some way
|
||||
|
||||
#### Is Category
|
||||
|
||||
When the "Is Category" property is checked, this tag now acts as a category separator inside the preview panel. If this tag or any tags inheriting from this tag (i.e. tags that have this tag as a "[Parent Tag](#parent-tags)"), then these tags will appear under a separated group that's named after this tag. Tags inheriting from multiple "category tags" will still show up under any applicable category. _Read more under: [Tag Categories](../library/tag_categories.md)._
|
||||
The "Is Category" property of tags determines if a tag should be treated as a category itself when being organized inside the preview panel. If this tag or any tags inheriting from this tag (i.e. tags that have this tag as a "[Parent Tag](#parent-tags)"), then these tags will appear under a separated group that's named after this tag. Tags inheriting from multiple "category tags" will still show up under any applicable category.
|
||||
|
||||

|
||||
This means that duplicates of tags can appear on entries if the tag inherits from multiple parent categories, however this is by design and reflects the nature of multiple inheritance. Any tags not inheriting from a category tag will simply show under a default "Tag" section.
|
||||
|
||||

|
||||
|
||||
### Built-In Tags and Categories
|
||||
|
||||
The built-in tags "Favorite" and "Archived" inherit from the built-in "Meta Tags" category which is marked as a category by default. This behavior of default tags can be fully customized by disabling the category option and/or by adding/removing the tags' Parent Tags.
|
||||
|
||||
### Migrating from v9.4 Libraries
|
||||
|
||||
Due to the nature of how tags and Tag Felids operated prior to v9.5, the organization style of Tag Categories vs Tag Fields is not 1:1. Instead of tags being organized into fields on a per-entry basis, tags themselves determine their organizational layout via the "Is Property" flag. Any tags _(not currently inheriting from either the "Favorite" or "Archived" tags)_ will be shown under the default "Tags" header upon migrating to the v9.5+ library format. Similar organization to Tag Fields can be achieved by using the built-in "Meta Tags" tag or any other marked with "Is Category" and then setting those tags as parents for other tags to inherit from.
|
||||
|
||||
#### Is Hidden
|
||||
|
||||
**_Coming in version 9.6_**
|
||||
<!-- prettier-ignore -->
|
||||
!!! warning ""
|
||||
**_Coming in version 9.6.x_**
|
||||
|
||||
When the "Is Hidden" property is checked, any file entries tagged with this tag will not show up in searches by default. This property comes by default with the built-in "Archived" tag.
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
title: Changelog
|
||||
icon: material/list-status
|
||||
---
|
||||
|
||||
--8<-- "CHANGELOG.md"
|
||||
@@ -2,7 +2,7 @@
|
||||
icon: material/mouse
|
||||
---
|
||||
|
||||
# :material-mouse: Usage
|
||||
# :material-mouse: Basic Usage
|
||||
|
||||
## Creating/Opening a Library
|
||||
|
||||
|
||||
12
flake.lock
generated
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754487366,
|
||||
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
||||
"lastModified": 1763759067,
|
||||
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
||||
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -22,11 +22,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1755615617,
|
||||
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
|
||||
"lastModified": 1763835633,
|
||||
"narHash": "sha256-HzxeGVID5MChuCPESuC0dlQL1/scDKu+MmzoVBJxulM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
|
||||
"rev": "050e09e091117c3d7328c7b2b7b577492c43c134",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
71
mkdocs.yml
@@ -29,26 +29,32 @@ extra:
|
||||
nav:
|
||||
- Home:
|
||||
- index.md
|
||||
- Getting Started:
|
||||
- install.md
|
||||
- usage.md
|
||||
- develop.md
|
||||
- Help:
|
||||
- help/ffmpeg.md
|
||||
- Library:
|
||||
- library/index.md
|
||||
- library/library_search.md
|
||||
- library/entry.md
|
||||
- library/field.md
|
||||
- library/tag.md
|
||||
- library/tag_categories.md
|
||||
- library/tag_color.md
|
||||
- Utilities:
|
||||
- utilities/ignore.md
|
||||
- utilities/macro.md
|
||||
- Developing:
|
||||
- developing.md
|
||||
- contributing.md
|
||||
- style.md
|
||||
- Help:
|
||||
- help/ffmpeg.md
|
||||
- Using Libraries:
|
||||
- libraries.md
|
||||
- entries.md
|
||||
- preview-support.md
|
||||
- search.md
|
||||
- ignore.md
|
||||
- macros.md
|
||||
- Fields:
|
||||
- fields.md
|
||||
- Tags:
|
||||
- tags.md
|
||||
- colors.md
|
||||
- Updates:
|
||||
- updates/changelog.md
|
||||
- updates/roadmap.md
|
||||
- updates/schema_changes.md
|
||||
- changelog.md
|
||||
- roadmap.md
|
||||
- Schema History:
|
||||
- library-changes.md
|
||||
|
||||
theme:
|
||||
name: material
|
||||
@@ -81,16 +87,17 @@ theme:
|
||||
code: Jetbrains Mono
|
||||
language: en
|
||||
features:
|
||||
- navigation.instant
|
||||
- navigation.indexes
|
||||
- navigation.tracking
|
||||
- navigation.expand
|
||||
- navigation.sections
|
||||
- search.suggest
|
||||
- content.action.edit
|
||||
- content.code.annotate
|
||||
- content.code.copy
|
||||
- content.action.edit
|
||||
- content.tooltips
|
||||
- navigation.indexes
|
||||
- navigation.instant
|
||||
- navigation.sections
|
||||
- navigation.tabs
|
||||
# - navigation.tabs.sticky
|
||||
- navigation.tracking
|
||||
- search.suggest
|
||||
icon:
|
||||
repo: fontawesome/brands/github
|
||||
tag:
|
||||
@@ -108,6 +115,7 @@ markdown_extensions:
|
||||
- tables
|
||||
- toc:
|
||||
permalink: true
|
||||
toc_depth: 3
|
||||
|
||||
# Python Markdown Extensions
|
||||
- pymdownx.arithmatex:
|
||||
@@ -142,6 +150,21 @@ plugins:
|
||||
- tags
|
||||
- social: # social embed cards
|
||||
enabled: !ENV [CI, false] # enabled only when running in CI (eg GitHub Actions)
|
||||
- redirects:
|
||||
redirect_maps:
|
||||
"develop.md": "developing.md"
|
||||
"library/entry.md": "entries.md"
|
||||
"library/field.md": "fields.md"
|
||||
"library/index.md": "libraries.md"
|
||||
"library/library_search.md": "search.md"
|
||||
"library/tag_categories.md": "tags.md"
|
||||
"library/tag_color.md": "colors.md"
|
||||
"library/tag.md": "tags.md"
|
||||
"updates/changelog.md": "changelog.md"
|
||||
"updates/roadmap.md": "roadmap.md"
|
||||
"updates/schema_changes.md": "library-changes.md"
|
||||
"utilities/ignore.md": "ignore.md"
|
||||
"utilities/macro.md": "macros.md"
|
||||
|
||||
extra_css:
|
||||
- stylesheets/extra.css
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
qt6,
|
||||
ripgrep,
|
||||
stdenv,
|
||||
wrapGAppsHook,
|
||||
wrapGAppsHook3,
|
||||
|
||||
pillow-jxl-plugin,
|
||||
|
||||
@@ -30,7 +30,7 @@ python3Packages.buildPythonApplication {
|
||||
# Should be unnecessary once PR is pulled.
|
||||
# PR: https://github.com/NixOS/nixpkgs/pull/271037
|
||||
# Issue: https://github.com/NixOS/nixpkgs/issues/149812
|
||||
wrapGAppsHook
|
||||
wrapGAppsHook3
|
||||
];
|
||||
buildInputs = [
|
||||
qt6.qtbase
|
||||
@@ -55,14 +55,14 @@ python3Packages.buildPythonApplication {
|
||||
dontWrapGApps = true;
|
||||
dontWrapQtApps = true;
|
||||
makeWrapperArgs = [
|
||||
"--prefix PATH : ${
|
||||
"--suffix PATH : ${
|
||||
lib.makeBinPath [
|
||||
ffmpeg-headless
|
||||
ripgrep
|
||||
]
|
||||
}"
|
||||
]
|
||||
++ lib.optional stdenv.hostPlatform.isLinux "--prefix LD_LIBRARY_PATH : ${
|
||||
++ lib.optional stdenv.hostPlatform.isLinux "--suffix LD_LIBRARY_PATH : ${
|
||||
lib.makeLibraryPath [ pipewire ]
|
||||
}"
|
||||
++ [
|
||||
@@ -70,14 +70,18 @@ python3Packages.buildPythonApplication {
|
||||
"\${qtWrapperArgs[@]}"
|
||||
];
|
||||
|
||||
pythonRemoveDeps = lib.optional (!withJXLSupport) [ "pillow_jxl" ];
|
||||
pythonRemoveDeps = lib.optional (!withJXLSupport) "pillow_jxl";
|
||||
pythonRelaxDeps = [
|
||||
"numpy"
|
||||
"pillow"
|
||||
"pillow-avif-plugin"
|
||||
"pillow-heif"
|
||||
"pillow-jxl-plugin"
|
||||
"py7zr"
|
||||
"pyside6"
|
||||
"rarfile"
|
||||
"requests"
|
||||
"semver"
|
||||
"structlog"
|
||||
"typing-extensions"
|
||||
];
|
||||
@@ -94,12 +98,15 @@ python3Packages.buildPythonApplication {
|
||||
numpy
|
||||
opencv-python
|
||||
pillow
|
||||
pillow-avif-plugin
|
||||
pillow-heif
|
||||
py7zr
|
||||
pydantic
|
||||
pydub
|
||||
pyside6
|
||||
rarfile
|
||||
rawpy
|
||||
requests
|
||||
semver
|
||||
send2trash
|
||||
sqlalchemy
|
||||
srctools
|
||||
@@ -115,7 +122,9 @@ python3Packages.buildPythonApplication {
|
||||
disabledTests = [
|
||||
"test_badge_visual_state"
|
||||
"test_browsing_state_update"
|
||||
"test_close_library" # TODO: Look into segfault.
|
||||
"test_flow_layout_happy_path"
|
||||
"test_get" # TODO: Look further into, might be possible to run.
|
||||
"test_json_migration"
|
||||
"test_library_migrations"
|
||||
"test_update_tags"
|
||||
|
||||
@@ -51,7 +51,7 @@ let
|
||||
# Should be unnecessary once PR is pulled.
|
||||
# PR: https://github.com/NixOS/nixpkgs/pull/271037
|
||||
# Issue: https://github.com/NixOS/nixpkgs/issues/149812
|
||||
wrapGAppsHook
|
||||
wrapGAppsHook3
|
||||
];
|
||||
buildInputs = with pkgs.qt6; [
|
||||
qtbase
|
||||
@@ -60,7 +60,7 @@ let
|
||||
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/${python3.meta.mainProgram} \
|
||||
--prefix ${libraryPath} : ${pythonLibraryPath} \
|
||||
--suffix ${libraryPath} : ${pythonLibraryPath} \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
"''${qtWrapperArgs[@]}"
|
||||
'';
|
||||
@@ -87,7 +87,7 @@ pkgs.mkShellNoCC {
|
||||
env = {
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
|
||||
UV_NO_SYNC = "1";
|
||||
UV_NO_SYNC = 1;
|
||||
UV_PYTHON_DOWNLOADS = "never";
|
||||
};
|
||||
|
||||
@@ -111,7 +111,8 @@ pkgs.mkShellNoCC {
|
||||
fi
|
||||
|
||||
source "''${venv}"/bin/activate
|
||||
PYTHONPATH=${pythonPath}''${PYTHONPATH:+:}''${PYTHONPATH:-}
|
||||
PYTHONPATH=${pythonPath}''${PYTHONPATH:+:''${PYTHONPATH}}
|
||||
export PYTHONPATH
|
||||
|
||||
if [ ! -f "''${venv}"/pyproject.toml ] || ! diff --brief pyproject.toml "''${venv}"/pyproject.toml >/dev/null; then
|
||||
printf '%s\n' 'Installing dependencies, pyproject.toml changed...' >&2
|
||||
|
||||
43
overrides/partials/toc-item.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<!--
|
||||
Copyright (c) 2016-2025 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Table of contents item -->
|
||||
<li class="md-nav__item">
|
||||
<a href="{{ toc_item.url }}" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
{{ toc_item.title }}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<!-- Table of contents list -->
|
||||
{% if toc_item.children %}
|
||||
<nav class="md-nav" aria-label="{{ toc_item.title | striptags | e }}">
|
||||
<ul class="md-nav__list">
|
||||
{% for toc_item in toc_item.children %}
|
||||
{% if not page.meta.toc_depth or toc_item.level <= page.meta.toc_depth %}
|
||||
{% include "partials/toc-item.html" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
</li>
|
||||
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
|
||||
[project]
|
||||
name = "TagStudio"
|
||||
description = "A User-Focused Photo & File Management System."
|
||||
version = "9.5.4"
|
||||
version = "9.5.6"
|
||||
license = "GPL-3.0-only"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12,<3.13"
|
||||
@@ -16,13 +16,14 @@ dependencies = [
|
||||
"mutagen~=1.47",
|
||||
"numpy~=2.2",
|
||||
"opencv_python~=4.11",
|
||||
"Pillow>=10.2,<=11",
|
||||
"pillow-avif-plugin~=1.5",
|
||||
"Pillow>=10.2,<12",
|
||||
"pillow-heif~=0.22",
|
||||
"pillow-jxl-plugin~=1.3",
|
||||
"py7zr==1.0.0",
|
||||
"pydantic~=2.10",
|
||||
"pydub~=0.25",
|
||||
"PySide6==6.8.0.*",
|
||||
"rarfile==4.2",
|
||||
"rawpy~=0.24",
|
||||
"Send2Trash~=1.8",
|
||||
"SQLAlchemy~=2.0",
|
||||
@@ -32,11 +33,13 @@ dependencies = [
|
||||
"typing_extensions~=4.13",
|
||||
"ujson~=5.10",
|
||||
"wcmatch==10.*",
|
||||
"requests~=2.31.0",
|
||||
"semver~=3.0.4",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = ["tagstudio[mkdocs,mypy,pre-commit,pyinstaller,pytest,ruff]"]
|
||||
mkdocs = ["mkdocs-material[imaging]>=9.6.14"]
|
||||
mkdocs = ["mkdocs-material[imaging]>=9.6.14", "mkdocs-redirects~=1.2"]
|
||||
mypy = ["mypy==1.15.0", "mypy-extensions==1.*", "types-ujson~=5.10"]
|
||||
pre-commit = ["pre-commit~=4.2"]
|
||||
pyinstaller = ["Pyinstaller~=6.13"]
|
||||
@@ -85,7 +88,11 @@ ignore_errors = true
|
||||
qt_api = "pyside6"
|
||||
|
||||
[tool.pyright]
|
||||
ignore = ["src/tagstudio/qt/helpers/vendored/pydub/", ".venv/**"]
|
||||
ignore = [
|
||||
".venv/**",
|
||||
"src/tagstudio/core/library/json/",
|
||||
"src/tagstudio/qt/previews/vendored/pydub/",
|
||||
]
|
||||
include = ["src/tagstudio", "tests"]
|
||||
reportAny = false
|
||||
reportIgnoreCommentWithoutRule = false
|
||||
@@ -109,7 +116,7 @@ ignore = ["D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107"]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"tests/**" = ["D", "E402"]
|
||||
"src/tagstudio/qt/helpers/vendored/**" = ["B", "E", "N", "UP", "SIM115"]
|
||||
"src/tagstudio/qt/previews/vendored/**" = ["B", "E", "N", "UP", "SIM115"]
|
||||
|
||||
[tool.ruff.lint.pydocstyle]
|
||||
convention = "google"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Licensed under the GPL-3.0 License.
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
VERSION: str = "9.5.4" # Major.Minor.Patch
|
||||
VERSION: str = "9.5.6" # Major.Minor.Patch
|
||||
VERSION_BRANCH: str = "" # Usually "" or "Pre-Release"
|
||||
|
||||
# The folder & file names where TagStudio keeps its data relative to a library.
|
||||
|
||||
@@ -5,14 +5,16 @@ from PySide6.QtCore import QSettings
|
||||
|
||||
from tagstudio.core.constants import TS_FOLDER_NAME
|
||||
from tagstudio.core.enums import SettingItems
|
||||
from tagstudio.core.global_settings import GlobalSettings
|
||||
from tagstudio.core.library.alchemy.library import LibraryStatus
|
||||
from tagstudio.qt.global_settings import GlobalSettings
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
|
||||
class DriverMixin:
|
||||
cached_values: QSettings
|
||||
# TODO: GlobalSettings has become closely tied to Qt.
|
||||
# Should there be a base Settings class?
|
||||
settings: GlobalSettings
|
||||
|
||||
def evaluate_path(self, open_path: str | None) -> LibraryStatus:
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# Copyright (C) 2024 Travis Abendshien (CyanVoxel).
|
||||
# Licensed under the GPL-3.0 License.
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
|
||||
class FieldTemplate:
|
||||
"""A TagStudio Library Field Template object."""
|
||||
|
||||
def __init__(self, id: int, name: str, type: str) -> None:
|
||||
self.id = id
|
||||
self.name = name
|
||||
self.type = type
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"\nID: {self.id}\nName: {self.name}\nType: {self.type}\n"
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return self.__str__()
|
||||
|
||||
def to_compressed_obj(self) -> dict:
|
||||
"""An alternative to __dict__ that only includes fields containing non-default data."""
|
||||
obj: dict = {}
|
||||
# All Field fields (haha) are mandatory, so no value checks are done.
|
||||
obj["id"] = self.id
|
||||
obj["name"] = self.name
|
||||
obj["type"] = self.type
|
||||
|
||||
return obj
|
||||
@@ -11,7 +11,7 @@ JSON_FILENAME: str = "ts_library.json"
|
||||
DB_VERSION_LEGACY_KEY: str = "DB_VERSION"
|
||||
DB_VERSION_CURRENT_KEY: str = "CURRENT"
|
||||
DB_VERSION_INITIAL_KEY: str = "INITIAL"
|
||||
DB_VERSION: int = 101
|
||||
DB_VERSION: int = 103
|
||||
|
||||
TAG_CHILDREN_QUERY = text("""
|
||||
WITH RECURSIVE ChildTags AS (
|
||||
@@ -23,3 +23,14 @@ WITH RECURSIVE ChildTags AS (
|
||||
)
|
||||
SELECT * FROM ChildTags;
|
||||
""")
|
||||
|
||||
TAG_CHILDREN_ID_QUERY = text("""
|
||||
WITH RECURSIVE ChildTags AS (
|
||||
SELECT :tag_id AS tag_id
|
||||
UNION
|
||||
SELECT tp.child_id AS tag_id
|
||||
FROM tag_parents tp
|
||||
INNER JOIN ChildTags c ON tp.parent_id = c.tag_id
|
||||
)
|
||||
SELECT tag_id FROM ChildTags;
|
||||
""")
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
|
||||
from pathlib import Path
|
||||
from typing import override
|
||||
|
||||
import structlog
|
||||
from sqlalchemy import Dialect, Engine, String, TypeDecorator, create_engine, text
|
||||
@@ -19,12 +20,14 @@ class PathType(TypeDecorator):
|
||||
impl = String
|
||||
cache_ok = True
|
||||
|
||||
def process_bind_param(self, value: Path, dialect: Dialect):
|
||||
@override
|
||||
def process_bind_param(self, value: Path | None, dialect: Dialect):
|
||||
if value is not None:
|
||||
return Path(value).as_posix()
|
||||
return None
|
||||
|
||||
def process_result_value(self, value: str, dialect: Dialect):
|
||||
@override
|
||||
def process_result_value(self, value: str | None, dialect: Dialect):
|
||||
if value is not None:
|
||||
return Path(value)
|
||||
return None
|
||||
@@ -54,8 +57,8 @@ def make_tables(engine: Engine) -> None:
|
||||
conn.execute(
|
||||
text(
|
||||
"INSERT INTO tags "
|
||||
"(id, name, color_namespace, color_slug, is_category) VALUES "
|
||||
f"({RESERVED_TAG_END}, 'temp', NULL, NULL, false)"
|
||||
"(id, name, color_namespace, color_slug, is_category, is_hidden) VALUES "
|
||||
f"({RESERVED_TAG_END}, 'temp', NULL, NULL, false, false)"
|
||||
)
|
||||
)
|
||||
conn.execute(text(f"DELETE FROM tags WHERE id = {RESERVED_TAG_END}"))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import enum
|
||||
import random
|
||||
from dataclasses import dataclass, replace
|
||||
from dataclasses import dataclass, field, replace
|
||||
from pathlib import Path
|
||||
|
||||
import structlog
|
||||
@@ -78,10 +78,13 @@ class BrowsingState:
|
||||
"""Represent a state of the Library grid view."""
|
||||
|
||||
page_index: int = 0
|
||||
page_positions: dict[int, int] = field(default_factory=dict)
|
||||
sorting_mode: SortingModeEnum = SortingModeEnum.DATE_ADDED
|
||||
ascending: bool = True
|
||||
ascending: bool = False
|
||||
random_seed: float = 0
|
||||
|
||||
show_hidden_entries: bool = False
|
||||
|
||||
query: str | None = None
|
||||
|
||||
# Abstract Syntax Tree Of the current Search Query
|
||||
@@ -147,6 +150,9 @@ class BrowsingState:
|
||||
def with_search_query(self, search_query: str) -> "BrowsingState":
|
||||
return replace(self, query=search_query)
|
||||
|
||||
def with_show_hidden_entries(self, show_hidden_entries: bool) -> "BrowsingState":
|
||||
return replace(self, show_hidden_entries=show_hidden_entries)
|
||||
|
||||
|
||||
class FieldTypeEnum(enum.Enum):
|
||||
TEXT_LINE = "Text Line"
|
||||
|
||||
@@ -7,7 +7,7 @@ from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from enum import Enum
|
||||
from typing import TYPE_CHECKING, Any
|
||||
from typing import TYPE_CHECKING, Any, override
|
||||
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import Mapped, declared_attr, mapped_column, relationship
|
||||
@@ -32,7 +32,7 @@ class BaseField(Base):
|
||||
|
||||
@declared_attr
|
||||
def type(self) -> Mapped[ValueType]:
|
||||
return relationship(foreign_keys=[self.type_key], lazy=False) # type: ignore
|
||||
return relationship(foreign_keys=[self.type_key], lazy=False) # type: ignore # pyright: ignore[reportArgumentType]
|
||||
|
||||
@declared_attr
|
||||
def entry_id(self) -> Mapped[int]:
|
||||
@@ -40,19 +40,20 @@ class BaseField(Base):
|
||||
|
||||
@declared_attr
|
||||
def entry(self) -> Mapped[Entry]:
|
||||
return relationship(foreign_keys=[self.entry_id]) # type: ignore
|
||||
return relationship(foreign_keys=[self.entry_id]) # type: ignore # pyright: ignore[reportArgumentType]
|
||||
|
||||
@declared_attr
|
||||
def position(self) -> Mapped[int]:
|
||||
return mapped_column(default=0)
|
||||
|
||||
@override
|
||||
def __hash__(self):
|
||||
return hash(self.__key())
|
||||
|
||||
def __key(self):
|
||||
def __key(self): # pyright: ignore[reportUnknownParameterType]
|
||||
raise NotImplementedError
|
||||
|
||||
value: Any
|
||||
value: Any # pyright: ignore
|
||||
|
||||
|
||||
class BooleanField(BaseField):
|
||||
@@ -63,7 +64,8 @@ class BooleanField(BaseField):
|
||||
def __key(self):
|
||||
return (self.type, self.value)
|
||||
|
||||
def __eq__(self, value) -> bool:
|
||||
@override
|
||||
def __eq__(self, value: object) -> bool:
|
||||
if isinstance(value, BooleanField):
|
||||
return self.__key() == value.__key()
|
||||
raise NotImplementedError
|
||||
@@ -74,10 +76,11 @@ class TextField(BaseField):
|
||||
|
||||
value: Mapped[str | None]
|
||||
|
||||
def __key(self) -> tuple:
|
||||
def __key(self) -> tuple[ValueType, str | None]:
|
||||
return self.type, self.value
|
||||
|
||||
def __eq__(self, value) -> bool:
|
||||
@override
|
||||
def __eq__(self, value: object) -> bool:
|
||||
if isinstance(value, TextField):
|
||||
return self.__key() == value.__key()
|
||||
elif isinstance(value, DatetimeField):
|
||||
@@ -93,7 +96,8 @@ class DatetimeField(BaseField):
|
||||
def __key(self):
|
||||
return (self.type, self.value)
|
||||
|
||||
def __eq__(self, value) -> bool:
|
||||
@override
|
||||
def __eq__(self, value: object) -> bool:
|
||||
if isinstance(value, DatetimeField):
|
||||
return self.__key() == value.__key()
|
||||
raise NotImplementedError
|
||||
@@ -107,7 +111,7 @@ class DefaultField:
|
||||
is_default: bool = field(default=False)
|
||||
|
||||
|
||||
class _FieldID(Enum):
|
||||
class FieldID(Enum):
|
||||
"""Only for bootstrapping content of DB table."""
|
||||
|
||||
TITLE = DefaultField(id=0, name="Title", type=FieldTypeEnum.TEXT_LINE, is_default=True)
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
# Licensed under the GPL-3.0 License.
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
# NOTE: This file contains necessary use of deprecated first-party code until that
|
||||
# code is removed in a future version (prefs).
|
||||
# pyright: reportDeprecated=false
|
||||
|
||||
|
||||
import re
|
||||
import shutil
|
||||
@@ -18,7 +22,7 @@ from warnings import catch_warnings
|
||||
|
||||
import sqlalchemy
|
||||
import structlog
|
||||
from humanfriendly import format_timespan
|
||||
from humanfriendly import format_timespan # pyright: ignore[reportUnknownVariableType]
|
||||
from sqlalchemy import (
|
||||
URL,
|
||||
ColumnExpressionArgument,
|
||||
@@ -40,6 +44,7 @@ from sqlalchemy import (
|
||||
)
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
from sqlalchemy.orm import (
|
||||
InstanceState,
|
||||
Session,
|
||||
contains_eager,
|
||||
joinedload,
|
||||
@@ -47,6 +52,7 @@ from sqlalchemy.orm import (
|
||||
noload,
|
||||
selectinload,
|
||||
)
|
||||
from typing_extensions import deprecated
|
||||
|
||||
from tagstudio.core.constants import (
|
||||
BACKUP_FOLDER_NAME,
|
||||
@@ -81,8 +87,8 @@ from tagstudio.core.library.alchemy.enums import (
|
||||
from tagstudio.core.library.alchemy.fields import (
|
||||
BaseField,
|
||||
DatetimeField,
|
||||
FieldID,
|
||||
TextField,
|
||||
_FieldID,
|
||||
)
|
||||
from tagstudio.core.library.alchemy.joins import TagEntry, TagParent
|
||||
from tagstudio.core.library.alchemy.models import (
|
||||
@@ -145,6 +151,7 @@ def get_default_tags() -> tuple[Tag, ...]:
|
||||
name="Archived",
|
||||
aliases={TagAlias(name="Archive")},
|
||||
parent_tags={meta_tag},
|
||||
is_hidden=True,
|
||||
color_slug="red",
|
||||
color_namespace="tagstudio-standard",
|
||||
)
|
||||
@@ -210,9 +217,9 @@ class Library:
|
||||
"""Class for the Library object, and all CRUD operations made upon it."""
|
||||
|
||||
library_dir: Path | None = None
|
||||
storage_path: Path | str | None
|
||||
storage_path: Path | str | None = None
|
||||
engine: Engine | None = None
|
||||
folder: Folder | None
|
||||
folder: Folder | None = None
|
||||
included_files: set[Path] = set()
|
||||
|
||||
def __init__(self) -> None:
|
||||
@@ -224,7 +231,7 @@ class Library:
|
||||
def close(self):
|
||||
if self.engine:
|
||||
self.engine.dispose()
|
||||
self.library_dir: Path | None = None
|
||||
self.library_dir = None
|
||||
self.storage_path = None
|
||||
self.folder = None
|
||||
self.included_files = set()
|
||||
@@ -300,8 +307,8 @@ class Library:
|
||||
]
|
||||
)
|
||||
for entry in json_lib.entries:
|
||||
for field in entry.fields:
|
||||
for k, v in field.items():
|
||||
for field in entry.fields: # pyright: ignore[reportUnknownVariableType]
|
||||
for k, v in field.items(): # pyright: ignore[reportUnknownVariableType]
|
||||
# Old tag fields get added as tags
|
||||
if k in LEGACY_TAG_FIELD_IDS:
|
||||
self.add_tags_to_entries(entry_ids=entry.id + 1, tag_ids=v)
|
||||
@@ -319,8 +326,8 @@ class Library:
|
||||
end_time = time.time()
|
||||
logger.info(f"Library Converted! ({format_timespan(end_time - start_time)})")
|
||||
|
||||
def get_field_name_from_id(self, field_id: int) -> _FieldID:
|
||||
for f in _FieldID:
|
||||
def get_field_name_from_id(self, field_id: int) -> FieldID | None:
|
||||
for f in FieldID:
|
||||
if field_id == f.value.id:
|
||||
return f
|
||||
return None
|
||||
@@ -482,7 +489,7 @@ class Library:
|
||||
except IntegrityError:
|
||||
session.rollback()
|
||||
|
||||
for field in _FieldID:
|
||||
for field in FieldID:
|
||||
try:
|
||||
session.add(
|
||||
ValueType(
|
||||
@@ -528,21 +535,27 @@ class Library:
|
||||
self.save_library_backup_to_disk()
|
||||
self.library_dir = None
|
||||
|
||||
# schema changes first
|
||||
# NOTE: Depending on the data, some data and schema changes need to be applied in
|
||||
# different orders. This chain of methods can likely be cleaned up and/or moved.
|
||||
if loaded_db_version < 8:
|
||||
self.__apply_db8_schema_changes(session)
|
||||
if loaded_db_version < 9:
|
||||
self.__apply_db9_schema_changes(session)
|
||||
|
||||
# now the data changes
|
||||
if loaded_db_version < 103:
|
||||
self.__apply_db103_schema_changes(session)
|
||||
if loaded_db_version == 6:
|
||||
self.__apply_repairs_for_db6(session)
|
||||
|
||||
if loaded_db_version >= 6 and loaded_db_version < 8:
|
||||
self.__apply_db8_default_data(session)
|
||||
if loaded_db_version < 9:
|
||||
self.__apply_db9_filename_population(session)
|
||||
if loaded_db_version < 100:
|
||||
self.__apply_db100_parent_repairs(session)
|
||||
if loaded_db_version < 102:
|
||||
self.__apply_db102_repairs(session)
|
||||
if loaded_db_version < 103:
|
||||
self.__apply_db103_default_data(session)
|
||||
|
||||
# Convert file extension list to ts_ignore file, if a .ts_ignore file does not exist
|
||||
self.migrate_sql_to_ts_ignore(library_dir)
|
||||
@@ -560,12 +573,12 @@ class Library:
|
||||
logger.info("[Library][Migration] Applying patches to DB_VERSION: 6 library...")
|
||||
with session:
|
||||
# Repair "Description" fields with a TEXT_LINE key instead of a TEXT_BOX key.
|
||||
desc_stmd = (
|
||||
desc_stmt = (
|
||||
update(ValueType)
|
||||
.where(ValueType.key == _FieldID.DESCRIPTION.name)
|
||||
.where(ValueType.key == FieldID.DESCRIPTION.name)
|
||||
.values(type=FieldTypeEnum.TEXT_BOX.name)
|
||||
)
|
||||
session.execute(desc_stmd)
|
||||
session.execute(desc_stmt)
|
||||
session.flush()
|
||||
|
||||
# Repair tags that may have a disambiguation_id pointing towards a deleted tag.
|
||||
@@ -679,7 +692,46 @@ class Library:
|
||||
)
|
||||
session.execute(stmt)
|
||||
session.commit()
|
||||
logger.info("[Library][Migration] Refactored TagParent column")
|
||||
logger.info("[Library][Migration] Refactored TagParent table")
|
||||
|
||||
def __apply_db102_repairs(self, session: Session):
|
||||
"""Repair tag_parents rows with references to deleted tags."""
|
||||
with session:
|
||||
all_tag_ids: list[int] = [t.id for t in self.tags]
|
||||
stmt = delete(TagParent).where(TagParent.parent_id.not_in(all_tag_ids))
|
||||
session.execute(stmt)
|
||||
session.commit()
|
||||
logger.info("[Library][Migration] Verified TagParent table data")
|
||||
|
||||
def __apply_db103_schema_changes(self, session: Session):
|
||||
"""Apply database schema changes introduced in DB_VERSION 103."""
|
||||
add_is_hidden_column = text(
|
||||
"ALTER TABLE tags ADD COLUMN is_hidden BOOLEAN NOT NULL DEFAULT 0"
|
||||
)
|
||||
try:
|
||||
session.execute(add_is_hidden_column)
|
||||
session.commit()
|
||||
logger.info("[Library][Migration] Added is_hidden column to tags table")
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
"[Library][Migration] Could not create is_hidden column in tags table!",
|
||||
error=e,
|
||||
)
|
||||
session.rollback()
|
||||
|
||||
def __apply_db103_default_data(self, session: Session):
|
||||
"""Apply default data changes introduced in DB_VERSION 103."""
|
||||
try:
|
||||
session.query(Tag).filter(Tag.id == TAG_ARCHIVED).update({"is_hidden": True})
|
||||
session.commit()
|
||||
logger.info("[Library][Migration] Updated archived tag to be hidden")
|
||||
session.commit()
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
"[Library][Migration] Could not update archived tag to be hidden!",
|
||||
error=e,
|
||||
)
|
||||
session.rollback()
|
||||
|
||||
def migrate_sql_to_ts_ignore(self, library_dir: Path):
|
||||
# Do not continue if existing '.ts_ignore' file is found
|
||||
@@ -697,8 +749,8 @@ class Library:
|
||||
logger.error("[ERROR][Library] Could not generate '.ts_ignore' file!", error=e)
|
||||
|
||||
# Load legacy extension data
|
||||
extensions: list[str] = self.prefs(LibraryPrefs.EXTENSION_LIST) # pyright: ignore[reportAssignmentType]
|
||||
is_exclude_list: bool = self.prefs(LibraryPrefs.IS_EXCLUDE_LIST) # pyright: ignore[reportAssignmentType]
|
||||
extensions: list[str] = self.prefs(LibraryPrefs.EXTENSION_LIST) # pyright: ignore
|
||||
is_exclude_list: bool = self.prefs(LibraryPrefs.IS_EXCLUDE_LIST) # pyright: ignore
|
||||
|
||||
# Copy extensions to '.ts_ignore' file
|
||||
if ts_ignore.exists():
|
||||
@@ -720,12 +772,6 @@ class Library:
|
||||
)
|
||||
return [x.as_field for x in types]
|
||||
|
||||
def delete_item(self, item):
|
||||
logger.info("deleting item", item=item)
|
||||
with Session(self.engine) as session:
|
||||
session.delete(item)
|
||||
session.commit()
|
||||
|
||||
def get_entry(self, entry_id: int) -> Entry | None:
|
||||
"""Load entry without joins."""
|
||||
with Session(self.engine) as session:
|
||||
@@ -864,7 +910,7 @@ class Library:
|
||||
@property
|
||||
def entries_count(self) -> int:
|
||||
with Session(self.engine) as session:
|
||||
return session.scalar(select(func.count(Entry.id)))
|
||||
return unwrap(session.scalar(select(func.count(Entry.id))))
|
||||
|
||||
def all_entries(self, with_joins: bool = False) -> Iterator[Entry]:
|
||||
"""Load entries without joins."""
|
||||
@@ -906,7 +952,7 @@ class Library:
|
||||
|
||||
return list(tags_list)
|
||||
|
||||
def verify_ts_folder(self, library_dir: Path) -> bool:
|
||||
def verify_ts_folder(self, library_dir: Path | None) -> bool:
|
||||
"""Verify/create folders required by TagStudio.
|
||||
|
||||
Returns:
|
||||
@@ -960,7 +1006,7 @@ class Library:
|
||||
with Session(self.engine) as session:
|
||||
return session.query(exists().where(Entry.path == path)).scalar()
|
||||
|
||||
def get_paths(self, glob: str | None = None, limit: int = -1) -> list[str]:
|
||||
def get_paths(self, limit: int = -1) -> list[str]:
|
||||
path_strings: list[str] = []
|
||||
with Session(self.engine) as session:
|
||||
if limit > 0:
|
||||
@@ -983,15 +1029,28 @@ class Library:
|
||||
assert self.library_dir
|
||||
|
||||
with Session(unwrap(self.engine), expire_on_commit=False) as session:
|
||||
statement = select(Entry.id, func.count().over())
|
||||
if page_size:
|
||||
statement = (
|
||||
select(Entry.id, func.count().over())
|
||||
.offset(search.page_index * page_size)
|
||||
.limit(page_size)
|
||||
)
|
||||
else:
|
||||
statement = select(Entry.id)
|
||||
|
||||
if search.ast:
|
||||
ast = search.ast
|
||||
|
||||
if not search.show_hidden_entries:
|
||||
statement = statement.where(~Entry.tags.any(Tag.is_hidden))
|
||||
|
||||
if ast:
|
||||
start_time = time.time()
|
||||
statement = statement.where(SQLBoolExpressionBuilder(self).visit(search.ast))
|
||||
statement = statement.where(SQLBoolExpressionBuilder(self).visit(ast))
|
||||
end_time = time.time()
|
||||
logger.info(
|
||||
f"SQL Expression Builder finished ({format_timespan(end_time - start_time)})"
|
||||
)
|
||||
|
||||
statement = statement.distinct(Entry.id)
|
||||
|
||||
sort_on: ColumnExpressionArgument = Entry.id
|
||||
@@ -1006,8 +1065,6 @@ class Library:
|
||||
sort_on = func.sin(Entry.id * search.random_seed)
|
||||
|
||||
statement = statement.order_by(asc(sort_on) if search.ascending else desc(sort_on))
|
||||
if page_size is not None:
|
||||
statement = statement.limit(page_size).offset(search.page_index * page_size)
|
||||
|
||||
logger.info(
|
||||
"searching library",
|
||||
@@ -1016,17 +1073,21 @@ class Library:
|
||||
)
|
||||
|
||||
start_time = time.time()
|
||||
rows = session.execute(statement).fetchall()
|
||||
ids = []
|
||||
count = 0
|
||||
for row in rows:
|
||||
id, count = row._tuple()
|
||||
ids.append(id)
|
||||
if page_size:
|
||||
rows = session.execute(statement).fetchall()
|
||||
ids = []
|
||||
total_count = 0
|
||||
for row in rows:
|
||||
ids.append(row[0])
|
||||
total_count = row[1]
|
||||
else:
|
||||
ids = list(session.scalars(statement))
|
||||
total_count = len(ids)
|
||||
end_time = time.time()
|
||||
logger.info(f"SQL Execution finished ({format_timespan(end_time - start_time)})")
|
||||
|
||||
res = SearchResult(
|
||||
total_count=count,
|
||||
total_count=total_count,
|
||||
ids=ids,
|
||||
)
|
||||
|
||||
@@ -1109,44 +1170,29 @@ class Library:
|
||||
session.commit()
|
||||
return True
|
||||
|
||||
def remove_tag(self, tag: Tag):
|
||||
def remove_tag(self, tag_id: int) -> bool:
|
||||
with Session(self.engine, expire_on_commit=False) as session:
|
||||
try:
|
||||
child_tags = session.scalars(
|
||||
select(TagParent).where(TagParent.child_id == tag.id)
|
||||
).all()
|
||||
tags_query = select(Tag).options(
|
||||
selectinload(Tag.parent_tags), selectinload(Tag.aliases)
|
||||
session.execute(delete(TagAlias).where(TagAlias.tag_id == tag_id))
|
||||
session.execute(delete(TagEntry).where(TagEntry.tag_id == tag_id))
|
||||
session.execute(
|
||||
delete(TagParent).where(
|
||||
or_(TagParent.child_id == tag_id, TagParent.parent_id == tag_id)
|
||||
)
|
||||
)
|
||||
tag = session.scalar(tags_query.where(Tag.id == tag.id))
|
||||
aliases = session.scalars(select(TagAlias).where(TagAlias.tag_id == tag.id))
|
||||
|
||||
for alias in aliases or []:
|
||||
session.delete(alias)
|
||||
|
||||
for child_tag in child_tags or []:
|
||||
session.delete(child_tag)
|
||||
session.expunge(child_tag)
|
||||
|
||||
disam_stmt = (
|
||||
session.execute(
|
||||
update(Tag)
|
||||
.where(Tag.disambiguation_id == tag.id)
|
||||
.where(Tag.disambiguation_id == tag_id)
|
||||
.values(disambiguation_id=None)
|
||||
)
|
||||
session.execute(disam_stmt)
|
||||
session.flush()
|
||||
|
||||
session.delete(tag)
|
||||
session.execute(delete(Tag).where(Tag.id == tag_id))
|
||||
session.commit()
|
||||
session.expunge(tag)
|
||||
|
||||
return tag
|
||||
|
||||
except IntegrityError as e:
|
||||
logger.error(e)
|
||||
session.rollback()
|
||||
|
||||
return None
|
||||
return False
|
||||
return True
|
||||
|
||||
def update_field_position(
|
||||
self,
|
||||
@@ -1247,7 +1293,7 @@ class Library:
|
||||
|
||||
def get_value_type(self, field_key: str) -> ValueType:
|
||||
with Session(self.engine) as session:
|
||||
field = session.scalar(select(ValueType).where(ValueType.key == field_key))
|
||||
field = unwrap(session.scalar(select(ValueType).where(ValueType.key == field_key)))
|
||||
session.expunge(field)
|
||||
return field
|
||||
|
||||
@@ -1256,7 +1302,7 @@ class Library:
|
||||
entry_id: int,
|
||||
*,
|
||||
field: ValueType | None = None,
|
||||
field_id: _FieldID | str | None = None,
|
||||
field_id: FieldID | str | None = None,
|
||||
value: str | datetime | None = None,
|
||||
) -> bool:
|
||||
logger.info(
|
||||
@@ -1270,9 +1316,9 @@ class Library:
|
||||
assert bool(field) != (field_id is not None)
|
||||
|
||||
if not field:
|
||||
if isinstance(field_id, _FieldID):
|
||||
if isinstance(field_id, FieldID):
|
||||
field_id = field_id.name
|
||||
field = self.get_value_type(field_id)
|
||||
field = self.get_value_type(unwrap(field_id))
|
||||
|
||||
field_model: TextField | DatetimeField
|
||||
if field.type in (FieldTypeEnum.TEXT_LINE, FieldTypeEnum.TEXT_BOX):
|
||||
@@ -1432,7 +1478,7 @@ class Library:
|
||||
return None
|
||||
|
||||
def add_tags_to_entries(
|
||||
self, entry_ids: int | list[int], tag_ids: int | list[int] | set[int]
|
||||
self, entry_ids: int | list[int] | set[int], tag_ids: int | list[int] | set[int]
|
||||
) -> int:
|
||||
"""Add one or more tags to one or more entries.
|
||||
|
||||
@@ -1461,7 +1507,7 @@ class Library:
|
||||
return total_added
|
||||
|
||||
def remove_tags_from_entries(
|
||||
self, entry_ids: int | list[int], tag_ids: int | list[int] | set[int]
|
||||
self, entry_ids: int | list[int] | set[int], tag_ids: int | list[int] | set[int]
|
||||
) -> bool:
|
||||
"""Remove one or more tags from one or more entries."""
|
||||
entry_ids_ = [entry_ids] if isinstance(entry_ids, int) else entry_ids
|
||||
@@ -1614,16 +1660,22 @@ class Library:
|
||||
for tag in tags:
|
||||
all_tags[tag.id] = tag
|
||||
for tag in all_tags.values():
|
||||
# Sqlalchemy tracks this as a change to the parent_tags field
|
||||
tag.parent_tags = {all_tags[p] for p in all_tag_parents.get(tag.id, [])}
|
||||
# When calling session.add with this tag instance sqlalchemy will
|
||||
# attempt to create TagParents that already exist.
|
||||
try:
|
||||
# Sqlalchemy tracks this as a change to the parent_tags field
|
||||
tag.parent_tags = {all_tags[p] for p in all_tag_parents.get(tag.id, [])}
|
||||
# When calling session.add with this tag instance sqlalchemy will
|
||||
# attempt to create TagParents that already exist.
|
||||
|
||||
state = inspect(tag)
|
||||
# Prevent sqlalchemy from thinking any fields are different from what's commited
|
||||
# commited_state contains original values for fields that have changed.
|
||||
# empty when no fields have changed
|
||||
state.committed_state.clear()
|
||||
state: InstanceState[Tag] = inspect(tag)
|
||||
# Prevent sqlalchemy from thinking fields are different from what's committed
|
||||
# committed_state contains original values for fields that have changed.
|
||||
# empty when no fields have changed
|
||||
state.committed_state.clear()
|
||||
except KeyError as e:
|
||||
logger.error(
|
||||
"[LIBRARY][get_tag_hierarchy] Tag referenced by TagParent does not exist!",
|
||||
error=e,
|
||||
)
|
||||
|
||||
return all_tags
|
||||
|
||||
@@ -1735,7 +1787,13 @@ class Library:
|
||||
else:
|
||||
self.add_color(new_color_group)
|
||||
|
||||
def update_aliases(self, tag, alias_ids, alias_names, session):
|
||||
def update_aliases(
|
||||
self,
|
||||
tag: Tag,
|
||||
alias_ids: list[int] | set[int],
|
||||
alias_names: list[str] | set[str],
|
||||
session: Session,
|
||||
):
|
||||
prev_aliases = session.scalars(select(TagAlias).where(TagAlias.tag_id == tag.id)).all()
|
||||
|
||||
for alias in prev_aliases:
|
||||
@@ -1749,7 +1807,7 @@ class Library:
|
||||
alias = TagAlias(alias_name, tag.id)
|
||||
session.add(alias)
|
||||
|
||||
def update_parent_tags(self, tag: Tag, parent_ids: list[int] | set[int], session):
|
||||
def update_parent_tags(self, tag: Tag, parent_ids: list[int] | set[int], session: Session):
|
||||
if tag.id in parent_ids:
|
||||
parent_ids.remove(tag.id)
|
||||
|
||||
@@ -1822,10 +1880,11 @@ class Library:
|
||||
# by older TagStudio versions.
|
||||
engine = sqlalchemy.inspect(self.engine)
|
||||
if engine and engine.has_table("Preferences"):
|
||||
pref = session.scalar(
|
||||
select(Preferences).where(Preferences.key == DB_VERSION_LEGACY_KEY)
|
||||
pref = unwrap(
|
||||
session.scalar(
|
||||
select(Preferences).where(Preferences.key == DB_VERSION_LEGACY_KEY)
|
||||
)
|
||||
)
|
||||
assert pref is not None
|
||||
pref.value = value # pyright: ignore
|
||||
session.add(pref)
|
||||
session.commit()
|
||||
@@ -1833,15 +1892,23 @@ class Library:
|
||||
logger.error("[Library][ERROR] Couldn't add default tag color namespaces", error=e)
|
||||
session.rollback()
|
||||
|
||||
def prefs(self, key: str | LibraryPrefs):
|
||||
# TODO: Remove this once the 'preferences' table is removed.
|
||||
@deprecated("Use `get_version() for version and `ts_ignore` system for extension exclusion.")
|
||||
def prefs(self, key: str | LibraryPrefs): # pyright: ignore[reportUnknownParameterType]
|
||||
# load given item from Preferences table
|
||||
with Session(self.engine) as session:
|
||||
if isinstance(key, LibraryPrefs):
|
||||
return session.scalar(select(Preferences).where(Preferences.key == key.name)).value
|
||||
return unwrap(
|
||||
session.scalar(select(Preferences).where(Preferences.key == key.name))
|
||||
).value # pyright: ignore[reportUnknownVariableType]
|
||||
else:
|
||||
return session.scalar(select(Preferences).where(Preferences.key == key)).value
|
||||
return unwrap(
|
||||
session.scalar(select(Preferences).where(Preferences.key == key))
|
||||
).value # pyright: ignore[reportUnknownVariableType]
|
||||
|
||||
def set_prefs(self, key: str | LibraryPrefs, value: Any) -> None:
|
||||
# TODO: Remove this once the 'preferences' table is removed.
|
||||
@deprecated("Use `get_version() for version and `ts_ignore` system for extension exclusion.")
|
||||
def set_prefs(self, key: str | LibraryPrefs, value: Any) -> None: # pyright: ignore[reportExplicitAny]
|
||||
# set given item in Preferences table
|
||||
with Session(self.engine) as session:
|
||||
# load existing preference and update value
|
||||
@@ -1873,7 +1940,7 @@ class Library:
|
||||
|
||||
# assign the field to all entries
|
||||
for entry in entries:
|
||||
for field_key, field in fields.items():
|
||||
for field_key, field in fields.items(): # pyright: ignore[reportUnknownVariableType]
|
||||
if field_key not in existing_fields:
|
||||
self.add_field_to_entry(
|
||||
entry_id=entry.id,
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
from datetime import datetime as dt
|
||||
from pathlib import Path
|
||||
from typing import override
|
||||
|
||||
from sqlalchemy import JSON, ForeignKey, ForeignKeyConstraint, Integer, event
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
@@ -96,6 +97,7 @@ class Tag(Base):
|
||||
color_slug: Mapped[str | None] = mapped_column()
|
||||
color: Mapped[TagColorGroup | None] = relationship(lazy="joined")
|
||||
is_category: Mapped[bool]
|
||||
is_hidden: Mapped[bool]
|
||||
icon: Mapped[str | None]
|
||||
aliases: Mapped[set[TagAlias]] = relationship(back_populates="tag")
|
||||
parent_tags: Mapped[set["Tag"]] = relationship(
|
||||
@@ -137,6 +139,7 @@ class Tag(Base):
|
||||
color_slug: str | None = None,
|
||||
disambiguation_id: int | None = None,
|
||||
is_category: bool = False,
|
||||
is_hidden: bool = False,
|
||||
):
|
||||
self.name = name
|
||||
self.aliases = aliases or set()
|
||||
@@ -147,28 +150,37 @@ class Tag(Base):
|
||||
self.shorthand = shorthand
|
||||
self.disambiguation_id = disambiguation_id
|
||||
self.is_category = is_category
|
||||
self.is_hidden = is_hidden
|
||||
self.id = id # pyright: ignore[reportAttributeAccessIssue]
|
||||
super().__init__()
|
||||
|
||||
@override
|
||||
def __str__(self) -> str:
|
||||
return f"<Tag ID: {self.id} Name: {self.name}>"
|
||||
|
||||
@override
|
||||
def __repr__(self) -> str:
|
||||
return self.__str__()
|
||||
|
||||
@override
|
||||
def __hash__(self) -> int:
|
||||
return hash(self.id)
|
||||
|
||||
def __lt__(self, other) -> bool:
|
||||
def __eq__(self, value: object) -> bool:
|
||||
if not isinstance(value, Tag):
|
||||
return False
|
||||
return self.id == value.id
|
||||
|
||||
def __lt__(self, other: "Tag") -> bool:
|
||||
return self.name < other.name
|
||||
|
||||
def __le__(self, other) -> bool:
|
||||
def __le__(self, other: "Tag") -> bool:
|
||||
return self.name <= other.name
|
||||
|
||||
def __gt__(self, other) -> bool:
|
||||
def __gt__(self, other: "Tag") -> bool:
|
||||
return self.name > other.name
|
||||
|
||||
def __ge__(self, other) -> bool:
|
||||
def __ge__(self, other: "Tag") -> bool:
|
||||
return self.name >= other.name
|
||||
|
||||
|
||||
@@ -233,6 +245,7 @@ class Entry(Base):
|
||||
date_modified: dt | None = None,
|
||||
date_added: dt | None = None,
|
||||
) -> None:
|
||||
super().__init__()
|
||||
self.path = path
|
||||
self.folder = folder
|
||||
self.id = id # pyright: ignore[reportAttributeAccessIssue]
|
||||
@@ -280,8 +293,8 @@ class ValueType(Base):
|
||||
key: Mapped[str] = mapped_column(primary_key=True)
|
||||
name: Mapped[str] = mapped_column(nullable=False)
|
||||
type: Mapped[FieldTypeEnum] = mapped_column(default=FieldTypeEnum.TEXT_LINE)
|
||||
is_default: Mapped[bool]
|
||||
position: Mapped[int]
|
||||
is_default: Mapped[bool] # pyright: ignore[reportUninitializedInstanceVariable]
|
||||
position: Mapped[int] # pyright: ignore[reportUninitializedInstanceVariable]
|
||||
|
||||
# add relations to other tables
|
||||
text_fields: Mapped[list[TextField]] = relationship("TextField", back_populates="type")
|
||||
@@ -306,7 +319,7 @@ class ValueType(Base):
|
||||
|
||||
|
||||
@event.listens_for(ValueType, "before_insert")
|
||||
def slugify_field_key(mapper, connection, target):
|
||||
def slugify_field_key(mapper, connection, target): # pyright: ignore
|
||||
"""Slugify the field key before inserting into the database."""
|
||||
if not target.key:
|
||||
from tagstudio.core.library.alchemy.library import slugify
|
||||
|
||||
@@ -4,15 +4,15 @@ from pathlib import Path
|
||||
|
||||
import structlog
|
||||
|
||||
from tagstudio.core.library.alchemy.enums import BrowsingState
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.library.alchemy.models import Entry
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
|
||||
logger = structlog.get_logger()
|
||||
|
||||
|
||||
@dataclass
|
||||
class DupeRegistry:
|
||||
class DupeFilesRegistry:
|
||||
"""State handler for DupeGuru results."""
|
||||
|
||||
library: Library
|
||||
@@ -28,7 +28,7 @@ class DupeRegistry:
|
||||
A duplicate file is defined as an identical or near-identical file as determined
|
||||
by a DupeGuru results file.
|
||||
"""
|
||||
library_dir = self.library.library_dir
|
||||
library_dir = unwrap(self.library.library_dir)
|
||||
if not isinstance(results_filepath, Path):
|
||||
results_filepath = Path(results_filepath)
|
||||
|
||||
@@ -43,7 +43,7 @@ class DupeRegistry:
|
||||
files: list[Entry] = []
|
||||
for element in group:
|
||||
if element.tag == "file":
|
||||
file_path = Path(element.attrib.get("path"))
|
||||
file_path = Path(unwrap(element.attrib.get("path")))
|
||||
|
||||
try:
|
||||
path_relative = file_path.relative_to(library_dir)
|
||||
@@ -51,16 +51,12 @@ class DupeRegistry:
|
||||
# The file is not in the library directory
|
||||
continue
|
||||
|
||||
results = self.library.search_library(
|
||||
BrowsingState.from_path(path_relative), 500
|
||||
)
|
||||
entries = self.library.get_entries(results.ids)
|
||||
|
||||
if not results:
|
||||
entry = self.library.get_entry_full_by_path(path_relative)
|
||||
if entry is None:
|
||||
# file not in library
|
||||
continue
|
||||
|
||||
files.append(entries[0])
|
||||
files.append(entry)
|
||||
|
||||
if not len(files) > 1:
|
||||
# only one file in the group, nothing to do
|
||||
@@ -82,5 +78,5 @@ class DupeRegistry:
|
||||
for i, entries in enumerate(self.groups):
|
||||
remove_ids = entries[1:]
|
||||
logger.info("Removing entries group", ids=remove_ids)
|
||||
self.library.remove_entries(remove_ids)
|
||||
self.library.remove_entries([e.id for e in remove_ids])
|
||||
yield i - 1 # The -1 waits for the next step to finish
|
||||
@@ -7,7 +7,7 @@ from wcmatch import pathlib
|
||||
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.library.alchemy.models import Entry
|
||||
from tagstudio.core.library.ignore import PATH_GLOB_FLAGS, Ignore
|
||||
from tagstudio.core.library.ignore import PATH_GLOB_FLAGS, Ignore, ignore_to_glob
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
|
||||
logger = structlog.get_logger()
|
||||
@@ -47,7 +47,8 @@ class UnlinkedRegistry:
|
||||
library_dir = unwrap(self.lib.library_dir)
|
||||
matches: list[Path] = []
|
||||
|
||||
ignore_patterns = Ignore.get_patterns(library_dir)
|
||||
# NOTE: ignore_to_glob() is needed for wcmatch, not ripgrep.
|
||||
ignore_patterns = ignore_to_glob(Ignore.get_patterns(library_dir))
|
||||
for path in pathlib.Path(str(library_dir)).glob(
|
||||
f"***/{match_entry.path.name}",
|
||||
flags=PATH_GLOB_FLAGS,
|
||||
@@ -3,13 +3,14 @@
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
import re
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, override
|
||||
|
||||
import structlog
|
||||
from sqlalchemy import ColumnElement, and_, distinct, func, or_, select, text
|
||||
from sqlalchemy import ColumnElement, and_, distinct, func, or_, select
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy.sql.operators import ilike_op
|
||||
|
||||
from tagstudio.core.library.alchemy.constants import TAG_CHILDREN_ID_QUERY
|
||||
from tagstudio.core.library.alchemy.joins import TagEntry
|
||||
from tagstudio.core.library.alchemy.models import Entry, Tag, TagAlias
|
||||
from tagstudio.core.media_types import FILETYPE_EQUIVALENTS, MediaCategories
|
||||
@@ -32,17 +33,6 @@ else:
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
TAG_CHILDREN_ID_QUERY = text("""
|
||||
WITH RECURSIVE ChildTags AS (
|
||||
SELECT :tag_id AS tag_id
|
||||
UNION
|
||||
SELECT tp.child_id AS tag_id
|
||||
FROM tag_parents tp
|
||||
INNER JOIN ChildTags c ON tp.parent_id = c.tag_id
|
||||
)
|
||||
SELECT tag_id FROM ChildTags;
|
||||
""")
|
||||
|
||||
|
||||
def get_filetype_equivalency_list(item: str) -> list[str] | set[str]:
|
||||
for s in FILETYPE_EQUIVALENTS:
|
||||
@@ -56,19 +46,22 @@ class SQLBoolExpressionBuilder(BaseVisitor[ColumnElement[bool]]):
|
||||
super().__init__()
|
||||
self.lib = lib
|
||||
|
||||
def visit_or_list(self, node: ORList) -> ColumnElement[bool]:
|
||||
@override
|
||||
def visit_or_list(self, node: ORList) -> ColumnElement[bool]: # type: ignore
|
||||
tag_ids, bool_expressions = self.__separate_tags(node.elements, only_single=False)
|
||||
if len(tag_ids) > 0:
|
||||
bool_expressions.append(self.__entry_has_any_tags(tag_ids))
|
||||
return or_(*bool_expressions)
|
||||
|
||||
def visit_and_list(self, node: ANDList) -> ColumnElement[bool]:
|
||||
@override
|
||||
def visit_and_list(self, node: ANDList) -> ColumnElement[bool]: # type: ignore
|
||||
tag_ids, bool_expressions = self.__separate_tags(node.terms, only_single=True)
|
||||
if len(tag_ids) > 0:
|
||||
bool_expressions.append(self.__entry_has_all_tags(tag_ids))
|
||||
return and_(*bool_expressions)
|
||||
|
||||
def visit_constraint(self, node: Constraint) -> ColumnElement[bool]:
|
||||
@override
|
||||
def visit_constraint(self, node: Constraint) -> ColumnElement[bool]: # type: ignore
|
||||
"""Returns a Boolean Expression that is true, if the Entry satisfies the constraint."""
|
||||
if len(node.properties) != 0:
|
||||
raise NotImplementedError("Properties are not implemented yet") # TODO TSQLANG
|
||||
@@ -119,10 +112,12 @@ class SQLBoolExpressionBuilder(BaseVisitor[ColumnElement[bool]]):
|
||||
# raise exception if Constraint stays unhandled
|
||||
raise NotImplementedError("This type of constraint is not implemented yet")
|
||||
|
||||
def visit_property(self, node: Property) -> ColumnElement[bool]:
|
||||
@override
|
||||
def visit_property(self, node: Property) -> ColumnElement[bool]: # type: ignore
|
||||
raise NotImplementedError("This should never be reached!")
|
||||
|
||||
def visit_not(self, node: Not) -> ColumnElement[bool]:
|
||||
@override
|
||||
def visit_not(self, node: Not) -> ColumnElement[bool]: # type: ignore
|
||||
return ~self.visit(node.child)
|
||||
|
||||
def __get_tag_ids(self, tag_name: str, include_children: bool = True) -> list[int]:
|
||||
@@ -143,7 +138,7 @@ class SQLBoolExpressionBuilder(BaseVisitor[ColumnElement[bool]]):
|
||||
)
|
||||
if not include_children:
|
||||
return tag_ids
|
||||
outp = []
|
||||
outp: list[int] = []
|
||||
for tag_id in tag_ids:
|
||||
outp.extend(list(session.scalars(TAG_CHILDREN_ID_QUERY, {"tag_id": tag_id})))
|
||||
return outp
|
||||
@@ -151,7 +146,7 @@ class SQLBoolExpressionBuilder(BaseVisitor[ColumnElement[bool]]):
|
||||
def __separate_tags(
|
||||
self, terms: list[AST], only_single: bool = True
|
||||
) -> tuple[list[int], list[ColumnElement[bool]]]:
|
||||
tag_ids: list[int] = []
|
||||
tag_ids: set[int] = set()
|
||||
bool_expressions: list[ColumnElement[bool]] = []
|
||||
|
||||
for term in terms:
|
||||
@@ -159,7 +154,7 @@ class SQLBoolExpressionBuilder(BaseVisitor[ColumnElement[bool]]):
|
||||
match term.type:
|
||||
case ConstraintType.TagID:
|
||||
try:
|
||||
tag_ids.append(int(term.value))
|
||||
tag_ids.add(int(term.value))
|
||||
except ValueError:
|
||||
logger.error(
|
||||
"[SQLBoolExpressionBuilder] Could not cast value to an int Tag ID",
|
||||
@@ -169,14 +164,24 @@ class SQLBoolExpressionBuilder(BaseVisitor[ColumnElement[bool]]):
|
||||
case ConstraintType.Tag:
|
||||
ids = self.__get_tag_ids(term.value)
|
||||
if not only_single:
|
||||
tag_ids.extend(ids)
|
||||
tag_ids.update(ids)
|
||||
continue
|
||||
elif len(ids) == 1:
|
||||
tag_ids.append(ids[0])
|
||||
tag_ids.add(ids[0])
|
||||
continue
|
||||
case ConstraintType.FileType:
|
||||
pass
|
||||
case ConstraintType.MediaType:
|
||||
pass
|
||||
case ConstraintType.Path:
|
||||
pass
|
||||
case ConstraintType.Special:
|
||||
pass
|
||||
case _:
|
||||
raise NotImplementedError(f"Unhandled constraint: '{term.type}'")
|
||||
|
||||
bool_expressions.append(self.visit(term))
|
||||
return tag_ids, bool_expressions
|
||||
return list(tag_ids), bool_expressions
|
||||
|
||||
def __entry_has_all_tags(self, tag_ids: list[int]) -> ColumnElement[bool]:
|
||||
"""Returns Binary Expression that is true if the Entry has all provided tag ids."""
|
||||
|
||||
@@ -10,7 +10,7 @@ import wcmatch.fnmatch as fnmatch
|
||||
from wcmatch import glob, pathlib
|
||||
|
||||
from tagstudio.core.constants import IGNORE_NAME, TS_FOLDER_NAME
|
||||
from tagstudio.core.singleton import Singleton
|
||||
from tagstudio.core.utils.singleton import Singleton
|
||||
|
||||
logger = structlog.get_logger()
|
||||
|
||||
@@ -38,7 +38,7 @@ GLOBAL_IGNORE = [
|
||||
|
||||
|
||||
def ignore_to_glob(ignore_patterns: list[str]) -> list[str]:
|
||||
"""Convert .gitignore-like patterns to explicit glob syntax.
|
||||
"""Convert .gitignore-like patterns to Unix-like glob syntax.
|
||||
|
||||
Args:
|
||||
ignore_patterns (list[str]): The .gitignore-like patterns to convert.
|
||||
@@ -48,7 +48,7 @@ def ignore_to_glob(ignore_patterns: list[str]) -> list[str]:
|
||||
additional_patterns: list[str] = []
|
||||
root_patterns: list[str] = []
|
||||
|
||||
# Mimic implicit .gitignore syntax behavior for the SQLite GLOB function.
|
||||
# Expand .gitignore patterns to mimic the same behavior with unix-like glob patterns.
|
||||
for pattern in glob_patterns:
|
||||
# Temporarily remove any exclusion character before processing
|
||||
exclusion_char = ""
|
||||
@@ -62,9 +62,6 @@ def ignore_to_glob(ignore_patterns: list[str]) -> list[str]:
|
||||
gp = "**/" + gp
|
||||
additional_patterns.append(exclusion_char + gp)
|
||||
|
||||
gp = gp.removesuffix("/**").removesuffix("/*").removesuffix("/")
|
||||
additional_patterns.append(exclusion_char + gp)
|
||||
|
||||
gp = gp.removeprefix("**/").removeprefix("*/")
|
||||
additional_patterns.append(exclusion_char + gp)
|
||||
|
||||
|
||||
@@ -27,8 +27,7 @@ from tagstudio.core.constants import (
|
||||
)
|
||||
from tagstudio.core.enums import OpenStatus
|
||||
from tagstudio.core.library.json.fields import DEFAULT_FIELDS, TEXT_FIELDS
|
||||
from tagstudio.core.utils.str import strip_punctuation
|
||||
from tagstudio.core.utils.web import strip_web_protocol
|
||||
from tagstudio.core.utils.str_formatting import strip_punctuation, strip_web_protocol
|
||||
|
||||
TYPE = ["file", "meta", "alt", "mask"]
|
||||
|
||||
|
||||
@@ -16,13 +16,14 @@ from wcmatch import pathlib
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.library.alchemy.models import Entry
|
||||
from tagstudio.core.library.ignore import PATH_GLOB_FLAGS, Ignore, ignore_to_glob
|
||||
from tagstudio.qt.helpers.silent_popen import silent_run # pyright: ignore
|
||||
from tagstudio.core.utils.silent_subprocess import silent_run # pyright: ignore
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
|
||||
@dataclass
|
||||
class RefreshDirTracker:
|
||||
class RefreshTracker:
|
||||
library: Library
|
||||
files_not_in_library: list[Path] = field(default_factory=list)
|
||||
|
||||
@@ -30,24 +31,27 @@ class RefreshDirTracker:
|
||||
def files_count(self) -> int:
|
||||
return len(self.files_not_in_library)
|
||||
|
||||
def save_new_files(self):
|
||||
def save_new_files(self) -> Iterator[int]:
|
||||
"""Save the list of files that are not in the library."""
|
||||
if self.files_not_in_library:
|
||||
batch_size = 200
|
||||
|
||||
index = 0
|
||||
while index < len(self.files_not_in_library):
|
||||
yield index
|
||||
end = min(len(self.files_not_in_library), index + batch_size)
|
||||
entries = [
|
||||
Entry(
|
||||
path=entry_path,
|
||||
folder=self.library.folder, # pyright: ignore[reportArgumentType]
|
||||
folder=unwrap(self.library.folder),
|
||||
fields=[],
|
||||
date_added=dt.now(),
|
||||
)
|
||||
for entry_path in self.files_not_in_library
|
||||
for entry_path in self.files_not_in_library[index:end]
|
||||
]
|
||||
self.library.add_entries(entries)
|
||||
|
||||
index = end
|
||||
self.files_not_in_library = []
|
||||
|
||||
yield
|
||||
|
||||
def refresh_dir(self, library_dir: Path, force_internal_tools: bool = False) -> Iterator[int]:
|
||||
"""Scan a directory for files, and add those relative filenames to internal variables.
|
||||
|
||||
@@ -101,8 +105,8 @@ class RefreshDirTracker:
|
||||
),
|
||||
cwd=library_dir,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
shell=True,
|
||||
encoding="UTF-8",
|
||||
)
|
||||
compiled_ignore_path.unlink()
|
||||
|
||||
@@ -33,6 +33,7 @@ class MediaType(str, Enum):
|
||||
AUDIO_MIDI = "audio_midi"
|
||||
AUDIO = "audio"
|
||||
BLENDER = "blender"
|
||||
CLIP_STUDIO_PAINT = "clip_studio_paint"
|
||||
CODE = "code"
|
||||
DATABASE = "database"
|
||||
DISK_IMAGE = "disk_image"
|
||||
@@ -46,9 +47,11 @@ class MediaType(str, Enum):
|
||||
INSTALLER = "installer"
|
||||
IWORK = "iwork"
|
||||
MATERIAL = "material"
|
||||
MDIPACK = "mdipack"
|
||||
MODEL = "model"
|
||||
OPEN_DOCUMENT = "open_document"
|
||||
PACKAGE = "package"
|
||||
PAINT_DOT_NET = "paint_dot_net"
|
||||
PDF = "pdf"
|
||||
PLAINTEXT = "plaintext"
|
||||
PRESENTATION = "presentation"
|
||||
@@ -175,6 +178,7 @@ class MediaCategories:
|
||||
".blend31",
|
||||
".blend32",
|
||||
}
|
||||
_CLIP_STUDIO_PAINT_SET: set[str] = {".clip"}
|
||||
_CODE_SET: set[str] = {
|
||||
".bat",
|
||||
".cfg",
|
||||
@@ -335,6 +339,7 @@ class MediaCategories:
|
||||
_INSTALLER_SET: set[str] = {".appx", ".msi", ".msix"}
|
||||
_IWORK_SET: set[str] = {".key", ".pages", ".numbers"}
|
||||
_MATERIAL_SET: set[str] = {".mtl"}
|
||||
_MDIPACK_SET: set[str] = {".mdp"}
|
||||
_MODEL_SET: set[str] = {".3ds", ".fbx", ".obj", ".stl"}
|
||||
_OPEN_DOCUMENT_SET: set[str] = {
|
||||
".fodg",
|
||||
@@ -358,6 +363,7 @@ class MediaCategories:
|
||||
".pkg",
|
||||
".xapk",
|
||||
}
|
||||
_PAINT_DOT_NET_SET: set[str] = {".pdn"}
|
||||
_PDF_SET: set[str] = {".pdf"}
|
||||
_PLAINTEXT_SET: set[str] = {
|
||||
".csv",
|
||||
@@ -452,6 +458,12 @@ class MediaCategories:
|
||||
is_iana=False,
|
||||
name="blender",
|
||||
)
|
||||
CLIP_STUDIO_PAINT_TYPES = MediaCategory(
|
||||
media_type=MediaType.CLIP_STUDIO_PAINT,
|
||||
extensions=_CLIP_STUDIO_PAINT_SET,
|
||||
is_iana=False,
|
||||
name="clip studio paint",
|
||||
)
|
||||
CODE_TYPES = MediaCategory(
|
||||
media_type=MediaType.CODE,
|
||||
extensions=_CODE_SET,
|
||||
@@ -536,6 +548,12 @@ class MediaCategories:
|
||||
is_iana=False,
|
||||
name="material",
|
||||
)
|
||||
MDIPACK_TYPES = MediaCategory(
|
||||
media_type=MediaType.MDIPACK,
|
||||
extensions=_MDIPACK_SET,
|
||||
is_iana=False,
|
||||
name="mdipack",
|
||||
)
|
||||
MODEL_TYPES = MediaCategory(
|
||||
media_type=MediaType.MODEL,
|
||||
extensions=_MODEL_SET,
|
||||
@@ -554,6 +572,12 @@ class MediaCategories:
|
||||
is_iana=False,
|
||||
name="package",
|
||||
)
|
||||
PAINT_DOT_NET_TYPES = MediaCategory(
|
||||
media_type=MediaType.PAINT_DOT_NET,
|
||||
extensions=_PAINT_DOT_NET_SET,
|
||||
is_iana=False,
|
||||
name="paint.net",
|
||||
)
|
||||
PDF_TYPES = MediaCategory(
|
||||
media_type=MediaType.PDF,
|
||||
extensions=_PDF_SET,
|
||||
@@ -628,6 +652,7 @@ class MediaCategories:
|
||||
AUDIO_MIDI_TYPES,
|
||||
AUDIO_TYPES,
|
||||
BLENDER_TYPES,
|
||||
CLIP_STUDIO_PAINT_TYPES,
|
||||
DATABASE_TYPES,
|
||||
DISK_IMAGE_TYPES,
|
||||
DOCUMENT_TYPES,
|
||||
@@ -640,9 +665,11 @@ class MediaCategories:
|
||||
INSTALLER_TYPES,
|
||||
IWORK_TYPES,
|
||||
MATERIAL_TYPES,
|
||||
MDIPACK_TYPES,
|
||||
MODEL_TYPES,
|
||||
OPEN_DOCUMENT_TYPES,
|
||||
PACKAGE_TYPES,
|
||||
PAINT_DOT_NET_TYPES,
|
||||
PDF_TYPES,
|
||||
PLAINTEXT_TYPES,
|
||||
PRESENTATION_TYPES,
|
||||
@@ -679,7 +706,7 @@ class MediaCategories:
|
||||
|
||||
Args:
|
||||
ext (str): File extension with a leading "." and in all lowercase.
|
||||
media_cat (MediaCategory): The MediaCategory to to check for extension membership.
|
||||
media_cat (MediaCategory): The MediaCategory to check for extension membership.
|
||||
mime_fallback (bool): Flag to guess MIME type if no set matches are made.
|
||||
"""
|
||||
return media_cat.contains(ext, mime_fallback)
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
# Copyright (C) 2025
|
||||
# Licensed under the GPL-3.0 License.
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from enum import Enum
|
||||
from typing import Generic, TypeVar, Union
|
||||
from typing import Generic, TypeVar, override
|
||||
|
||||
|
||||
class ConstraintType(Enum):
|
||||
@@ -12,7 +17,7 @@ class ConstraintType(Enum):
|
||||
Special = 5
|
||||
|
||||
@staticmethod
|
||||
def from_string(text: str) -> Union["ConstraintType", None]:
|
||||
def from_string(text: str) -> "ConstraintType | None":
|
||||
return {
|
||||
"tag": ConstraintType.Tag,
|
||||
"tag_id": ConstraintType.TagID,
|
||||
@@ -24,14 +29,16 @@ class ConstraintType(Enum):
|
||||
|
||||
|
||||
class AST:
|
||||
parent: Union["AST", None] = None
|
||||
parent: "AST | None" = None
|
||||
|
||||
@override
|
||||
def __str__(self):
|
||||
class_name = self.__class__.__name__
|
||||
fields = vars(self) # Get all instance variables as a dictionary
|
||||
field_str = ", ".join(f"{key}={value}" for key, value in fields.items())
|
||||
return f"{class_name}({field_str})"
|
||||
|
||||
@override
|
||||
def __repr__(self) -> str:
|
||||
return self.__str__()
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
# Copyright (C) 2025
|
||||
# Licensed under the GPL-3.0 License.
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
|
||||
from tagstudio.core.query_lang.ast import (
|
||||
AST,
|
||||
ANDList,
|
||||
@@ -27,7 +32,7 @@ class Parser:
|
||||
if self.next_token.type == TokenType.EOF:
|
||||
return ORList([])
|
||||
out = self.__or_list()
|
||||
if self.next_token.type != TokenType.EOF:
|
||||
if self.next_token.type != TokenType.EOF: # pyright: ignore[reportUnnecessaryComparison]
|
||||
raise ParsingError(self.next_token.start, self.next_token.end, "Syntax Error")
|
||||
return out
|
||||
|
||||
@@ -41,7 +46,7 @@ class Parser:
|
||||
return ORList(terms) if len(terms) > 1 else terms[0]
|
||||
|
||||
def __is_next_or(self) -> bool:
|
||||
return self.next_token.type == TokenType.ULITERAL and self.next_token.value.upper() == "OR"
|
||||
return self.next_token.type == TokenType.ULITERAL and self.next_token.value.upper() == "OR" # pyright: ignore
|
||||
|
||||
def __and_list(self) -> AST:
|
||||
elements = [self.__term()]
|
||||
@@ -67,7 +72,7 @@ class Parser:
|
||||
raise self.__syntax_error("Unexpected AND")
|
||||
|
||||
def __is_next_and(self) -> bool:
|
||||
return self.next_token.type == TokenType.ULITERAL and self.next_token.value.upper() == "AND"
|
||||
return self.next_token.type == TokenType.ULITERAL and self.next_token.value.upper() == "AND" # pyright: ignore
|
||||
|
||||
def __term(self) -> AST:
|
||||
if self.__is_next_not():
|
||||
@@ -85,11 +90,14 @@ class Parser:
|
||||
return self.__constraint()
|
||||
|
||||
def __is_next_not(self) -> bool:
|
||||
return self.next_token.type == TokenType.ULITERAL and self.next_token.value.upper() == "NOT"
|
||||
return self.next_token.type == TokenType.ULITERAL and self.next_token.value.upper() == "NOT" # pyright: ignore
|
||||
|
||||
def __constraint(self) -> Constraint:
|
||||
if self.next_token.type == TokenType.CONSTRAINTTYPE:
|
||||
self.last_constraint_type = self.__eat(TokenType.CONSTRAINTTYPE).value
|
||||
constraint = self.__eat(TokenType.CONSTRAINTTYPE).value
|
||||
if not isinstance(constraint, ConstraintType):
|
||||
raise self.__syntax_error()
|
||||
self.last_constraint_type = constraint
|
||||
|
||||
value = self.__literal()
|
||||
|
||||
@@ -98,7 +106,7 @@ class Parser:
|
||||
self.__eat(TokenType.SBRACKETO)
|
||||
properties.append(self.__property())
|
||||
|
||||
while self.next_token.type == TokenType.COMMA:
|
||||
while self.next_token.type == TokenType.COMMA: # pyright: ignore[reportUnnecessaryComparison]
|
||||
self.__eat(TokenType.COMMA)
|
||||
properties.append(self.__property())
|
||||
|
||||
@@ -110,11 +118,16 @@ class Parser:
|
||||
key = self.__eat(TokenType.ULITERAL).value
|
||||
self.__eat(TokenType.EQUALS)
|
||||
value = self.__literal()
|
||||
if not isinstance(key, str):
|
||||
raise self.__syntax_error()
|
||||
return Property(key, value)
|
||||
|
||||
def __literal(self) -> str:
|
||||
if self.next_token.type in [TokenType.QLITERAL, TokenType.ULITERAL]:
|
||||
return self.__eat(self.next_token.type).value
|
||||
literal = self.__eat(self.next_token.type).value
|
||||
if not isinstance(literal, str):
|
||||
raise self.__syntax_error()
|
||||
return literal
|
||||
raise self.__syntax_error()
|
||||
|
||||
def __eat(self, type: TokenType) -> Token:
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# Copyright (C) 2025
|
||||
# Licensed under the GPL-3.0 License.
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
|
||||
from enum import Enum
|
||||
from typing import Any
|
||||
from typing import override
|
||||
|
||||
from tagstudio.core.query_lang.ast import ConstraintType
|
||||
from tagstudio.core.query_lang.util import ParsingError
|
||||
@@ -21,12 +26,14 @@ class TokenType(Enum):
|
||||
|
||||
class Token:
|
||||
type: TokenType
|
||||
value: Any
|
||||
value: str | ConstraintType | None
|
||||
|
||||
start: int
|
||||
end: int
|
||||
|
||||
def __init__(self, type: TokenType, value: Any, start: int, end: int) -> None:
|
||||
def __init__(
|
||||
self, type: TokenType, value: str | ConstraintType | None, start: int, end: int
|
||||
) -> None:
|
||||
self.type = type
|
||||
self.value = value
|
||||
self.start = start
|
||||
@@ -40,9 +47,11 @@ class Token:
|
||||
def EOF(pos: int) -> "Token": # noqa: N802
|
||||
return Token.from_type(TokenType.EOF, pos)
|
||||
|
||||
@override
|
||||
def __str__(self) -> str:
|
||||
return f"Token({self.type}, {self.value}, {self.start}, {self.end})" # pragma: nocover
|
||||
|
||||
@override
|
||||
def __repr__(self) -> str:
|
||||
return self.__str__() # pragma: nocover
|
||||
|
||||
|
||||
@@ -1,15 +1,26 @@
|
||||
# Copyright (C) 2025
|
||||
# Licensed under the GPL-3.0 License.
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
|
||||
from typing import override
|
||||
|
||||
|
||||
class ParsingError(BaseException):
|
||||
start: int
|
||||
end: int
|
||||
msg: str
|
||||
|
||||
def __init__(self, start: int, end: int, msg: str = "Syntax Error") -> None:
|
||||
super().__init__()
|
||||
self.start = start
|
||||
self.end = end
|
||||
self.msg = msg
|
||||
|
||||
@override
|
||||
def __str__(self) -> str:
|
||||
return f"Syntax Error {self.start}->{self.end}: {self.msg}" # pragma: nocover
|
||||
|
||||
@override
|
||||
def __repr__(self) -> str:
|
||||
return self.__str__() # pragma: nocover
|
||||
|
||||
@@ -5,13 +5,22 @@
|
||||
"""The core classes and methods of TagStudio."""
|
||||
|
||||
import json
|
||||
import re
|
||||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
|
||||
import requests
|
||||
import structlog
|
||||
|
||||
from tagstudio.core.constants import TS_FOLDER_NAME
|
||||
from tagstudio.core.library.alchemy.fields import _FieldID
|
||||
from tagstudio.core.library.alchemy.fields import FieldID
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.library.alchemy.models import Entry
|
||||
from tagstudio.core.utils.unlinked_registry import logger
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
MOST_RECENT_RELEASE_VERSION: str | None = None
|
||||
|
||||
|
||||
class TagStudioCore:
|
||||
@@ -24,6 +33,7 @@ class TagStudioCore:
|
||||
|
||||
Return a formatted object with notable values or an empty object if none is found.
|
||||
"""
|
||||
raise NotImplementedError("This method is currently broken and needs to be fixed.")
|
||||
info = {}
|
||||
_filepath = filepath.parent / (filepath.name + ".json")
|
||||
|
||||
@@ -43,27 +53,27 @@ class TagStudioCore:
|
||||
return {}
|
||||
|
||||
if source == "twitter":
|
||||
info[_FieldID.DESCRIPTION] = json_dump["content"].strip()
|
||||
info[_FieldID.DATE_PUBLISHED] = json_dump["date"]
|
||||
info[FieldID.DESCRIPTION] = json_dump["content"].strip()
|
||||
info[FieldID.DATE_PUBLISHED] = json_dump["date"]
|
||||
elif source == "instagram":
|
||||
info[_FieldID.DESCRIPTION] = json_dump["description"].strip()
|
||||
info[_FieldID.DATE_PUBLISHED] = json_dump["date"]
|
||||
info[FieldID.DESCRIPTION] = json_dump["description"].strip()
|
||||
info[FieldID.DATE_PUBLISHED] = json_dump["date"]
|
||||
elif source == "artstation":
|
||||
info[_FieldID.TITLE] = json_dump["title"].strip()
|
||||
info[_FieldID.ARTIST] = json_dump["user"]["full_name"].strip()
|
||||
info[_FieldID.DESCRIPTION] = json_dump["description"].strip()
|
||||
info[_FieldID.TAGS] = json_dump["tags"]
|
||||
info[FieldID.TITLE] = json_dump["title"].strip()
|
||||
info[FieldID.ARTIST] = json_dump["user"]["full_name"].strip()
|
||||
info[FieldID.DESCRIPTION] = json_dump["description"].strip()
|
||||
info[FieldID.TAGS] = json_dump["tags"]
|
||||
# info["tags"] = [x for x in json_dump["mediums"]["name"]]
|
||||
info[_FieldID.DATE_PUBLISHED] = json_dump["date"]
|
||||
info[FieldID.DATE_PUBLISHED] = json_dump["date"]
|
||||
elif source == "newgrounds":
|
||||
# info["title"] = json_dump["title"]
|
||||
# info["artist"] = json_dump["artist"]
|
||||
# info["description"] = json_dump["description"]
|
||||
info[_FieldID.TAGS] = json_dump["tags"]
|
||||
info[_FieldID.DATE_PUBLISHED] = json_dump["date"]
|
||||
info[_FieldID.ARTIST] = json_dump["user"].strip()
|
||||
info[_FieldID.DESCRIPTION] = json_dump["description"].strip()
|
||||
info[_FieldID.SOURCE] = json_dump["post_url"].strip()
|
||||
info[FieldID.TAGS] = json_dump["tags"]
|
||||
info[FieldID.DATE_PUBLISHED] = json_dump["date"]
|
||||
info[FieldID.ARTIST] = json_dump["user"].strip()
|
||||
info[FieldID.DESCRIPTION] = json_dump["description"].strip()
|
||||
info[FieldID.SOURCE] = json_dump["post_url"].strip()
|
||||
|
||||
except Exception:
|
||||
logger.exception("Error handling sidecar file.", path=_filepath)
|
||||
@@ -98,11 +108,11 @@ class TagStudioCore:
|
||||
"""Match defined conditions against a file to add Entry data."""
|
||||
# TODO - what even is this file format?
|
||||
# TODO: Make this stored somewhere better instead of temporarily in this JSON file.
|
||||
cond_file = lib.library_dir / TS_FOLDER_NAME / "conditions.json"
|
||||
cond_file = unwrap(lib.library_dir) / TS_FOLDER_NAME / "conditions.json"
|
||||
if not cond_file.is_file():
|
||||
return False
|
||||
|
||||
entry: Entry = lib.get_entry(entry_id)
|
||||
entry: Entry = unwrap(lib.get_entry(entry_id))
|
||||
|
||||
try:
|
||||
with open(cond_file, encoding="utf8") as f:
|
||||
@@ -127,7 +137,9 @@ class TagStudioCore:
|
||||
is_new = field["id"] not in entry_field_types
|
||||
field_key = field["id"]
|
||||
if is_new:
|
||||
lib.add_field_to_entry(entry.id, field_key, field["value"])
|
||||
lib.add_field_to_entry(
|
||||
entry.id, field_id=field_key, value=field["value"]
|
||||
)
|
||||
else:
|
||||
lib.update_entry_field(entry.id, field_key, field["value"])
|
||||
|
||||
@@ -178,3 +190,21 @@ class TagStudioCore:
|
||||
except Exception:
|
||||
logger.exception("Error building Instagram URL.", entry=entry)
|
||||
return ""
|
||||
|
||||
@staticmethod
|
||||
@lru_cache(maxsize=1)
|
||||
def get_most_recent_release_version() -> str:
|
||||
"""Get the version of the most recent Github release."""
|
||||
resp = requests.get("https://api.github.com/repos/TagStudioDev/TagStudio/releases/latest")
|
||||
assert resp.status_code == 200, "Could not fetch information on latest release."
|
||||
|
||||
data = resp.json()
|
||||
tag: str = data["tag_name"]
|
||||
assert tag.startswith("v")
|
||||
|
||||
version = tag[1:]
|
||||
# the assert does not allow for prerelease/build,
|
||||
# because the latest release should never have them
|
||||
assert re.match(r"^\d+\.\d+\.\d+$", version) is not None, "Invalid version format."
|
||||
|
||||
return version
|
||||
|
||||
@@ -1,46 +1,49 @@
|
||||
# Copyright (C) 2024 Travis Abendshien (CyanVoxel).
|
||||
# Copyright (C) 2025
|
||||
# Licensed under the GPL-3.0 License.
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from collections.abc import Callable, Collection, Iterable
|
||||
from typing import Any
|
||||
|
||||
"""Implementation of subprocess.Popen that does not spawn console windows or log output
|
||||
and sanitizes pyinstall environment variables."""
|
||||
and sanitizes pyinstaller environment variables."""
|
||||
|
||||
|
||||
def silent_Popen( # noqa: N802
|
||||
def silent_popen(
|
||||
args,
|
||||
bufsize=-1,
|
||||
bufsize: int = -1,
|
||||
executable=None,
|
||||
stdin=None,
|
||||
stdout=None,
|
||||
stderr=None,
|
||||
preexec_fn=None,
|
||||
close_fds=True,
|
||||
shell=False,
|
||||
preexec_fn: Callable[[], Any] | None = None,
|
||||
close_fds: bool = True,
|
||||
shell: bool = False,
|
||||
cwd=None,
|
||||
env=None,
|
||||
universal_newlines=None,
|
||||
startupinfo=None,
|
||||
creationflags=0,
|
||||
restore_signals=True,
|
||||
start_new_session=False,
|
||||
pass_fds=(),
|
||||
universal_newlines: bool | None = None,
|
||||
startupinfo: Any | None = None,
|
||||
creationflags: int = 0,
|
||||
restore_signals: bool = True,
|
||||
start_new_session: bool = False,
|
||||
pass_fds: Collection[int] = (),
|
||||
*,
|
||||
group=None,
|
||||
extra_groups=None,
|
||||
user=None,
|
||||
umask=-1,
|
||||
encoding=None,
|
||||
errors=None,
|
||||
text=None,
|
||||
pipesize=-1,
|
||||
process_group=None,
|
||||
text: bool | None = None,
|
||||
encoding: str | None = None,
|
||||
errors: str | None = None,
|
||||
user: str | int | None = None,
|
||||
group: str | int | None = None,
|
||||
extra_groups: Iterable[str | int] | None = None,
|
||||
umask: int = -1,
|
||||
pipesize: int = -1,
|
||||
process_group: int | None = None,
|
||||
):
|
||||
"""Call subprocess.Popen without creating a console window."""
|
||||
current_env = env
|
||||
|
||||
if sys.platform == "win32":
|
||||
creationflags |= subprocess.CREATE_NO_WINDOW
|
||||
import ctypes
|
||||
@@ -52,9 +55,9 @@ def silent_Popen( # noqa: N802
|
||||
or sys.platform.startswith("openbsd")
|
||||
):
|
||||
# pass clean environment to the subprocess
|
||||
env = os.environ
|
||||
original_env = env.get("LD_LIBRARY_PATH_ORIG")
|
||||
env["LD_LIBRARY_PATH"] = original_env if original_env else ""
|
||||
current_env = os.environ
|
||||
original_env = current_env.get("LD_LIBRARY_PATH_ORIG")
|
||||
current_env["LD_LIBRARY_PATH"] = original_env if original_env else ""
|
||||
|
||||
return subprocess.Popen(
|
||||
args=args,
|
||||
@@ -67,20 +70,20 @@ def silent_Popen( # noqa: N802
|
||||
close_fds=close_fds,
|
||||
shell=shell,
|
||||
cwd=cwd,
|
||||
env=env,
|
||||
env=current_env,
|
||||
universal_newlines=universal_newlines,
|
||||
startupinfo=startupinfo,
|
||||
creationflags=creationflags,
|
||||
restore_signals=restore_signals,
|
||||
start_new_session=start_new_session,
|
||||
pass_fds=pass_fds,
|
||||
group=group,
|
||||
extra_groups=extra_groups,
|
||||
user=user,
|
||||
umask=umask,
|
||||
text=text,
|
||||
encoding=encoding,
|
||||
errors=errors,
|
||||
text=text,
|
||||
user=user,
|
||||
group=group,
|
||||
extra_groups=extra_groups,
|
||||
umask=umask,
|
||||
pipesize=pipesize,
|
||||
process_group=process_group,
|
||||
)
|
||||
@@ -1,26 +0,0 @@
|
||||
# Copyright (C) 2024 Travis Abendshien (CyanVoxel).
|
||||
# Licensed under the GPL-3.0 License.
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
|
||||
def strip_punctuation(string: str) -> str:
|
||||
"""Returns a given string stripped of all punctuation characters."""
|
||||
return (
|
||||
string.replace("(", "")
|
||||
.replace(")", "")
|
||||
.replace("[", "")
|
||||
.replace("]", "")
|
||||
.replace("{", "")
|
||||
.replace("}", "")
|
||||
.replace("'", "")
|
||||
.replace("`", "")
|
||||
.replace("’", "")
|
||||
.replace("‘", "")
|
||||
.replace('"', "")
|
||||
.replace("“", "")
|
||||
.replace("”", "")
|
||||
.replace("_", "")
|
||||
.replace("-", "")
|
||||
.replace(" ", "")
|
||||
.replace(" ", "")
|
||||
)
|
||||
51
src/tagstudio/core/utils/str_formatting.py
Normal file
@@ -0,0 +1,51 @@
|
||||
# Copyright (C) 2025 Travis Abendshien (CyanVoxel).
|
||||
# Licensed under the GPL-3.0 License.
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
import semver
|
||||
|
||||
|
||||
def strip_punctuation(string: str) -> str:
|
||||
"""Returns a given string stripped of all punctuation characters."""
|
||||
return (
|
||||
string.replace("(", "")
|
||||
.replace(")", "")
|
||||
.replace("[", "")
|
||||
.replace("]", "")
|
||||
.replace("{", "")
|
||||
.replace("}", "")
|
||||
.replace("'", "")
|
||||
.replace("`", "")
|
||||
.replace("’", "")
|
||||
.replace("‘", "")
|
||||
.replace('"', "")
|
||||
.replace("“", "")
|
||||
.replace("”", "")
|
||||
.replace("_", "")
|
||||
.replace("-", "")
|
||||
.replace(" ", "")
|
||||
.replace(" ", "")
|
||||
)
|
||||
|
||||
|
||||
def strip_web_protocol(string: str) -> str:
|
||||
r"""Strips a leading web protocol (ex. \"https://\") as well as \"www.\" from a string."""
|
||||
prefixes = ["https://", "http://", "www.", "www2."]
|
||||
for prefix in prefixes:
|
||||
string = string.removeprefix(prefix)
|
||||
return string
|
||||
|
||||
|
||||
def is_version_outdated(current: str, latest: str) -> bool:
|
||||
vcur = semver.Version.parse(current)
|
||||
vlat = semver.Version.parse(latest)
|
||||
assert vlat.prerelease is None and vlat.build is None
|
||||
|
||||
if vcur.major != vlat.major:
|
||||
return vcur.major < vlat.major
|
||||
elif vcur.minor != vlat.minor:
|
||||
return vcur.minor < vlat.minor
|
||||
elif vcur.patch != vlat.patch:
|
||||
return vcur.patch < vlat.patch
|
||||
else:
|
||||
return vcur.prerelease is not None or vcur.build is not None
|
||||
@@ -1,11 +0,0 @@
|
||||
# Copyright (C) 2024 Travis Abendshien (CyanVoxel).
|
||||
# Licensed under the GPL-3.0 License.
|
||||
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio
|
||||
|
||||
|
||||
def strip_web_protocol(string: str) -> str:
|
||||
r"""Strips a leading web protocol (ex. \"https://\") as well as \"www.\" from a string."""
|
||||
prefixes = ["https://", "http://", "www.", "www2."]
|
||||
for prefix in prefixes:
|
||||
string = string.removeprefix(prefix)
|
||||
return string
|
||||
@@ -12,7 +12,7 @@ import structlog
|
||||
from PIL import Image
|
||||
|
||||
from tagstudio.core.constants import THUMB_CACHE_NAME, TS_FOLDER_NAME
|
||||
from tagstudio.core.global_settings import DEFAULT_THUMB_CACHE_SIZE
|
||||
from tagstudio.qt.global_settings import DEFAULT_CACHED_IMAGE_QUALITY, DEFAULT_THUMB_CACHE_SIZE
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
@@ -24,19 +24,21 @@ class CacheFolder:
|
||||
|
||||
|
||||
class CacheManager:
|
||||
MAX_FOLDER_SIZE = 10 # Number in MiB
|
||||
MAX_FOLDER_SIZE = 10 # Absolute maximum size of a folder, number in MiB
|
||||
STAT_MULTIPLIER = 1_000_000 # Multiplier to apply to file stats (bytes) to get user units (MiB)
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
library_dir: Path,
|
||||
max_size: int | float = DEFAULT_THUMB_CACHE_SIZE,
|
||||
img_quality: int = DEFAULT_CACHED_IMAGE_QUALITY,
|
||||
):
|
||||
"""A class for managing frontend caches, such as for file thumbnails.
|
||||
|
||||
Args:
|
||||
library_dir(Path): The path of the folder containing the .TagStudio library folder.
|
||||
max_size: (int | float) The maximum size of the cache, in MiB.
|
||||
img_quality: (int) The image quality value to save PIL images (0-100, default=80)
|
||||
"""
|
||||
self._lock = RLock()
|
||||
self.cache_path = library_dir / TS_FOLDER_NAME / THUMB_CACHE_NAME
|
||||
@@ -44,6 +46,9 @@ class CacheManager:
|
||||
math.floor(max_size * CacheManager.STAT_MULTIPLIER),
|
||||
math.floor(CacheManager.MAX_FOLDER_SIZE * CacheManager.STAT_MULTIPLIER),
|
||||
)
|
||||
self.img_quality = (
|
||||
img_quality if img_quality >= 0 and img_quality <= 100 else DEFAULT_CACHED_IMAGE_QUALITY
|
||||
)
|
||||
|
||||
self.folders: list[CacheFolder] = []
|
||||
self.current_size = 0
|
||||
@@ -127,12 +132,20 @@ class CacheManager:
|
||||
with self._lock as _lock:
|
||||
cache_folder: CacheFolder = self._get_current_folder()
|
||||
file_path = cache_folder.path / file_name
|
||||
image.save(file_path, mode=mode)
|
||||
try:
|
||||
image.save(file_path, mode=mode, quality=self.img_quality)
|
||||
|
||||
size = file_path.stat().st_size
|
||||
cache_folder.size += size
|
||||
self.current_size += size
|
||||
self._cull_folders()
|
||||
size = file_path.stat().st_size
|
||||
cache_folder.size += size
|
||||
self.current_size += size
|
||||
self._cull_folders()
|
||||
except FileNotFoundError:
|
||||
logger.warn(
|
||||
"[CacheManager] Failed to save cached image, was the folder deleted on disk?",
|
||||
folder=file_path,
|
||||
)
|
||||
if not cache_folder.path.exists():
|
||||
self.folders.remove(cache_folder)
|
||||
|
||||
def _create_folder(self) -> CacheFolder:
|
||||
with self._lock as _lock:
|
||||
|
||||
@@ -5,14 +5,14 @@ from PySide6.QtCore import Qt, QUrl
|
||||
from PySide6.QtGui import QDesktopServices
|
||||
from PySide6.QtWidgets import QMessageBox
|
||||
|
||||
from tagstudio.core.palette import ColorType, UiColor, get_ui_color
|
||||
from tagstudio.qt.helpers.vendored.ffmpeg import FFMPEG_CMD, FFPROBE_CMD
|
||||
from tagstudio.qt.models.palette import ColorType, UiColor, get_ui_color
|
||||
from tagstudio.qt.previews.vendored.ffmpeg import FFMPEG_CMD, FFPROBE_CMD
|
||||
from tagstudio.qt.translations import Translations
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
|
||||
class FfmpegChecker(QMessageBox):
|
||||
class FfmpegMissingMessageBox(QMessageBox):
|
||||
"""A warning dialog for if FFmpeg is missing."""
|
||||
|
||||
HELP_URL = "https://docs.tagstud.io/help/ffmpeg/"
|
||||
@@ -9,11 +9,11 @@ import structlog
|
||||
from PySide6 import QtGui
|
||||
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.utils.ignored_registry import IgnoredRegistry
|
||||
from tagstudio.qt.modals.remove_ignored_modal import RemoveIgnoredModal
|
||||
from tagstudio.core.library.alchemy.registries.ignored_registry import IgnoredRegistry
|
||||
from tagstudio.qt.mixed.progress_bar import ProgressWidget
|
||||
from tagstudio.qt.mixed.remove_ignored_modal import RemoveIgnoredModal
|
||||
from tagstudio.qt.translations import Translations
|
||||
from tagstudio.qt.view.widgets.fix_ignored_modal_view import FixIgnoredEntriesModalView
|
||||
from tagstudio.qt.widgets.progress import ProgressWidget
|
||||
from tagstudio.qt.views.fix_ignored_modal_view import FixIgnoredEntriesModalView
|
||||
|
||||
# Only import for type checking/autocompletion, will not be imported at runtime.
|
||||
if TYPE_CHECKING:
|
||||
@@ -32,7 +32,7 @@ class FixIgnoredEntriesModal(FixIgnoredEntriesModalView):
|
||||
lambda: (
|
||||
self.update_ignored_count(),
|
||||
self.driver.update_browsing_state(),
|
||||
self.driver.library_info_window.update_cleanup(),
|
||||
self.update_driver_widgets(),
|
||||
self.refresh_ignored(),
|
||||
)
|
||||
)
|
||||
@@ -52,20 +52,13 @@ class FixIgnoredEntriesModal(FixIgnoredEntriesModalView):
|
||||
pw.setWindowTitle(Translations["library.scan_library.title"])
|
||||
pw.update_label(Translations["entries.ignored.scanning"])
|
||||
|
||||
def update_driver_widgets():
|
||||
if (
|
||||
hasattr(self.driver, "library_info_window")
|
||||
and self.driver.library_info_window.isVisible()
|
||||
):
|
||||
self.driver.library_info_window.update_cleanup()
|
||||
|
||||
pw.from_iterable_function(
|
||||
self.tracker.refresh_ignored_entries,
|
||||
None,
|
||||
self.set_ignored_count,
|
||||
self.update_ignored_count,
|
||||
self.remove_modal.refresh_list,
|
||||
update_driver_widgets,
|
||||
self.update_driver_widgets,
|
||||
)
|
||||
|
||||
def set_ignored_count(self):
|
||||
@@ -88,6 +81,13 @@ class FixIgnoredEntriesModal(FixIgnoredEntriesModalView):
|
||||
)
|
||||
self.ignored_count_label.setText(f"<h3>{count_text}</h3>")
|
||||
|
||||
def update_driver_widgets(self):
|
||||
if (
|
||||
hasattr(self.driver, "library_info_window")
|
||||
and self.driver.library_info_window.isVisible()
|
||||
):
|
||||
self.driver.library_info_window.update_cleanup()
|
||||
|
||||
@override
|
||||
def showEvent(self, event: QtGui.QShowEvent) -> None: # type: ignore
|
||||
self.update_ignored_count()
|
||||
@@ -4,17 +4,18 @@
|
||||
|
||||
|
||||
from pathlib import Path
|
||||
from typing import override
|
||||
|
||||
import structlog
|
||||
from PySide6 import QtGui
|
||||
from PySide6.QtCore import Signal
|
||||
from PySide6.QtGui import QShowEvent
|
||||
|
||||
from tagstudio.core.constants import IGNORE_NAME, TS_FOLDER_NAME
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.library.alchemy.models import Tag
|
||||
from tagstudio.core.library.ignore import Ignore
|
||||
from tagstudio.qt.helpers import file_opener
|
||||
from tagstudio.qt.view.widgets.ignore_modal_view import IgnoreModalView
|
||||
from tagstudio.qt.utils.file_opener import open_file
|
||||
from tagstudio.qt.views.ignore_modal_view import IgnoreModalView
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
@@ -36,7 +37,7 @@ class IgnoreModal(IgnoreModalView):
|
||||
if not self.lib.library_dir:
|
||||
return
|
||||
ts_ignore_path = Path(self.lib.library_dir / TS_FOLDER_NAME / IGNORE_NAME)
|
||||
file_opener.open_file(ts_ignore_path, file_manager=True)
|
||||
open_file(ts_ignore_path, file_manager=True)
|
||||
|
||||
def save(self):
|
||||
if not self.lib.library_dir:
|
||||
@@ -45,6 +46,7 @@ class IgnoreModal(IgnoreModalView):
|
||||
lines = [f"{line}\n" for line in lines]
|
||||
Ignore.write_ignore_file(self.lib.library_dir, lines)
|
||||
|
||||
def showEvent(self, event: QtGui.QShowEvent) -> None: # noqa N802
|
||||
@override
|
||||
def showEvent(self, event: QShowEvent) -> None: # type: ignore
|
||||
self.__load_file()
|
||||
return super().showEvent(event)
|
||||
@@ -18,9 +18,9 @@ from tagstudio.core.library.alchemy.constants import (
|
||||
)
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
from tagstudio.qt.helpers import file_opener
|
||||
from tagstudio.qt.translations import Translations
|
||||
from tagstudio.qt.view.widgets.library_info_window_view import LibraryInfoWindowView
|
||||
from tagstudio.qt.utils import file_opener
|
||||
from tagstudio.qt.views.library_info_window_view import LibraryInfoWindowView
|
||||
|
||||
# Only import for type checking/autocompletion, will not be imported at runtime.
|
||||
if TYPE_CHECKING:
|
||||
39
src/tagstudio/qt/controllers/out_of_date_message_box.py
Normal file
@@ -0,0 +1,39 @@
|
||||
import structlog
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import QMessageBox
|
||||
|
||||
from tagstudio.core.constants import VERSION
|
||||
from tagstudio.core.ts_core import TagStudioCore
|
||||
from tagstudio.qt.models.palette import ColorType, UiColor, get_ui_color
|
||||
from tagstudio.qt.translations import Translations
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
|
||||
class OutOfDateMessageBox(QMessageBox):
|
||||
"""A warning dialog for if the TagStudio is not running under the latest release version."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
title = Translations.format("version_modal.title")
|
||||
self.setWindowTitle(title)
|
||||
self.setIcon(QMessageBox.Icon.Warning)
|
||||
self.setWindowModality(Qt.WindowModality.ApplicationModal)
|
||||
|
||||
self.setStandardButtons(
|
||||
QMessageBox.StandardButton.Ignore | QMessageBox.StandardButton.Cancel
|
||||
)
|
||||
self.setDefaultButton(QMessageBox.StandardButton.Ignore)
|
||||
# Enables the cancel button but hides it to allow for click X to close dialog
|
||||
self.button(QMessageBox.StandardButton.Cancel).hide()
|
||||
|
||||
red = get_ui_color(ColorType.PRIMARY, UiColor.RED)
|
||||
green = get_ui_color(ColorType.PRIMARY, UiColor.GREEN)
|
||||
latest_release_version = TagStudioCore.get_most_recent_release_version()
|
||||
status = Translations.format(
|
||||
"version_modal.status",
|
||||
installed_version=f"<span style='color:{red}'>{VERSION}</span>",
|
||||
latest_release_version=f"<span style='color:{green}'>{latest_release_version}</span>",
|
||||
)
|
||||
self.setText(f"{Translations['version_modal.description']}<br><br>{status}")
|
||||
@@ -10,7 +10,7 @@ from PySide6 import QtCore, QtGui
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import QHBoxLayout, QLabel, QVBoxLayout, QWidget
|
||||
|
||||
from tagstudio.qt.widgets.paged_panel.paged_panel_state import PagedPanelState
|
||||
from tagstudio.qt.controllers.paged_panel_state import PagedPanelState
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
from PySide6.QtWidgets import QPushButton
|
||||
|
||||
from tagstudio.qt.widgets.paged_panel.paged_body_wrapper import PagedBodyWrapper
|
||||
from tagstudio.qt.views.paged_body_wrapper import PagedBodyWrapper
|
||||
|
||||
|
||||
class PagedPanelState:
|
||||
@@ -7,9 +7,9 @@ from warnings import catch_warnings
|
||||
from PySide6.QtWidgets import QListWidgetItem
|
||||
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.qt.modals.add_field import AddFieldModal
|
||||
from tagstudio.qt.modals.tag_search import TagSearchModal
|
||||
from tagstudio.qt.view.widgets.preview_panel_view import PreviewPanelView
|
||||
from tagstudio.qt.mixed.add_field import AddFieldModal
|
||||
from tagstudio.qt.mixed.tag_search import TagSearchModal
|
||||
from tagstudio.qt.views.preview_panel_view import PreviewPanelView
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from tagstudio.qt.ts_qt import QtDriver
|
||||
@@ -14,10 +14,10 @@ from PySide6.QtCore import QSize
|
||||
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.media_types import MediaCategories
|
||||
from tagstudio.qt.helpers.file_opener import open_file
|
||||
from tagstudio.qt.helpers.file_tester import is_readable_video
|
||||
from tagstudio.qt.view.widgets.preview.preview_thumb_view import PreviewThumbView
|
||||
from tagstudio.qt.widgets.preview.file_attributes import FileAttributeData
|
||||
from tagstudio.qt.mixed.file_attributes import FileAttributeData
|
||||
from tagstudio.qt.utils.file_opener import open_file
|
||||
from tagstudio.qt.views.preview_thumb_view import PreviewThumbView
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from tagstudio.qt.ts_qt import QtDriver
|
||||
@@ -11,9 +11,9 @@ from tagstudio.core.enums import TagClickActionOption
|
||||
from tagstudio.core.library.alchemy.enums import BrowsingState
|
||||
from tagstudio.core.library.alchemy.models import Tag
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
from tagstudio.qt.modals.build_tag import BuildTagPanel
|
||||
from tagstudio.qt.view.components.tag_box_view import TagBoxWidgetView
|
||||
from tagstudio.qt.widgets.panel import PanelModal
|
||||
from tagstudio.qt.mixed.build_tag import BuildTagPanel
|
||||
from tagstudio.qt.views.panel_modal import PanelModal
|
||||
from tagstudio.qt.views.tag_box_view import TagBoxWidgetView
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from tagstudio.qt.ts_qt import QtDriver
|
||||
@@ -24,6 +24,10 @@ DEFAULT_GLOBAL_SETTINGS_PATH = (
|
||||
DEFAULT_THUMB_CACHE_SIZE = 500 # Number in MiB
|
||||
MIN_THUMB_CACHE_SIZE = 10 # Number in MiB
|
||||
|
||||
# See: https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#webp-saving
|
||||
DEFAULT_CACHED_IMAGE_QUALITY = 80
|
||||
DEFAULT_CACHED_IMAGE_RES = 256
|
||||
|
||||
|
||||
class Theme(IntEnum):
|
||||
DARK = 0
|
||||
@@ -56,10 +60,13 @@ class GlobalSettings(BaseModel):
|
||||
open_last_loaded_on_startup: bool = Field(default=True)
|
||||
generate_thumbs: bool = Field(default=True)
|
||||
thumb_cache_size: float = Field(default=DEFAULT_THUMB_CACHE_SIZE)
|
||||
cached_thumb_quality: int = Field(default=DEFAULT_CACHED_IMAGE_QUALITY)
|
||||
cached_thumb_resolution: int = Field(default=DEFAULT_CACHED_IMAGE_RES)
|
||||
autoplay: bool = Field(default=True)
|
||||
loop: bool = Field(default=True)
|
||||
show_filenames_in_grid: bool = Field(default=True)
|
||||
page_size: int = Field(default=100)
|
||||
infinite_scroll: bool = Field(default=True)
|
||||
show_filepath: ShowFilepathOption = Field(default=ShowFilepathOption.DEFAULT)
|
||||
tag_click_action: TagClickActionOption = Field(default=TagClickActionOption.DEFAULT)
|
||||
theme: Theme = Field(default=Theme.SYSTEM)
|
||||
@@ -7,7 +7,7 @@ from PIL import Image
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtGui import QGuiApplication
|
||||
|
||||
from tagstudio.qt.helpers.gradient import linear_gradient
|
||||
from tagstudio.qt.helpers.gradients import linear_gradient
|
||||
|
||||
# TODO: Consolidate the built-in QT theme values with the values
|
||||
# here, in enums.py, and in palette.py.
|
||||
|
||||
@@ -7,7 +7,9 @@ from pathlib import Path
|
||||
|
||||
import ffmpeg
|
||||
|
||||
from tagstudio.qt.helpers.vendored.ffmpeg import probe
|
||||
from tagstudio.qt.previews.vendored.ffmpeg import (
|
||||
probe, # pyright: ignore[reportUnknownVariableType]
|
||||
)
|
||||
|
||||
|
||||
def is_readable_video(filepath: Path | str):
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
|
||||
from PIL import Image
|
||||
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
|
||||
|
||||
def four_corner_gradient(
|
||||
image: Image.Image, size: tuple[int, int], mask: Image.Image | None = None
|
||||
) -> Image.Image:
|
||||
if image.size != size:
|
||||
# Four-Corner Gradient Background.
|
||||
tl = image.getpixel((0, 0))
|
||||
tr = image.getpixel(((image.size[0] - 1), 0))
|
||||
bl = image.getpixel((0, (image.size[1] - 1)))
|
||||
br = image.getpixel(((image.size[0] - 1), (image.size[1] - 1)))
|
||||
tl = unwrap(image.getpixel((0, 0)))
|
||||
tr = unwrap(image.getpixel(((image.size[0] - 1), 0)))
|
||||
bl = unwrap(image.getpixel((0, (image.size[1] - 1))))
|
||||
br = unwrap(image.getpixel(((image.size[0] - 1), (image.size[1] - 1))))
|
||||
bg = Image.new(mode="RGB", size=(2, 2))
|
||||
bg.paste(tl, (0, 0, 2, 2))
|
||||
bg.paste(tr, (1, 0, 2, 2))
|
||||
@@ -20,8 +20,9 @@ from PySide6.QtWidgets import (
|
||||
|
||||
from tagstudio.core.constants import VERSION, VERSION_BRANCH
|
||||
from tagstudio.core.enums import Theme
|
||||
from tagstudio.core.palette import ColorType, UiColor, get_ui_color
|
||||
from tagstudio.qt.helpers.vendored import ffmpeg
|
||||
from tagstudio.core.ts_core import TagStudioCore
|
||||
from tagstudio.qt.models.palette import ColorType, UiColor, get_ui_color
|
||||
from tagstudio.qt.previews.vendored import ffmpeg
|
||||
from tagstudio.qt.resource_manager import ResourceManager
|
||||
from tagstudio.qt.translations import Translations
|
||||
|
||||
@@ -103,6 +104,19 @@ class AboutModal(QWidget):
|
||||
self.system_info_layout = QFormLayout(self.system_info_widget)
|
||||
self.system_info_layout.setLabelAlignment(Qt.AlignmentFlag.AlignRight)
|
||||
|
||||
# Version
|
||||
version_title = QLabel("Version")
|
||||
most_recent_release = TagStudioCore.get_most_recent_release_version()
|
||||
version_content_style = self.form_content_style
|
||||
if most_recent_release == VERSION:
|
||||
version_content = QLabel(f"{VERSION}")
|
||||
else:
|
||||
version_content = QLabel(f"{VERSION} (Latest Release: {most_recent_release})")
|
||||
version_content_style += "color: #d9534f;"
|
||||
version_content.setStyleSheet(version_content_style)
|
||||
version_content.setMaximumWidth(version_content.sizeHint().width())
|
||||
self.system_info_layout.addRow(version_title, version_content)
|
||||
|
||||
# License
|
||||
license_title = QLabel(f"{Translations['about.license']}")
|
||||
license_content = QLabel("GPLv3")
|
||||
@@ -20,19 +20,19 @@ from PySide6.QtWidgets import (
|
||||
QWidget,
|
||||
)
|
||||
|
||||
from tagstudio.core import palette
|
||||
from tagstudio.core.library.alchemy.enums import TagColorEnum
|
||||
from tagstudio.core.library.alchemy.library import Library, slugify
|
||||
from tagstudio.core.library.alchemy.models import TagColorGroup
|
||||
from tagstudio.core.palette import ColorType, UiColor, get_tag_color, get_ui_color
|
||||
from tagstudio.qt.translations import Translations
|
||||
from tagstudio.qt.widgets.panel import PanelWidget
|
||||
from tagstudio.qt.widgets.tag import (
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
from tagstudio.qt.mixed.tag_color_preview import TagColorPreview
|
||||
from tagstudio.qt.mixed.tag_widget import (
|
||||
get_border_color,
|
||||
get_highlight_color,
|
||||
get_text_color,
|
||||
)
|
||||
from tagstudio.qt.widgets.tag_color_preview import TagColorPreview
|
||||
from tagstudio.qt.models.palette import ColorType, UiColor, get_tag_color, get_ui_color
|
||||
from tagstudio.qt.translations import Translations
|
||||
from tagstudio.qt.views.panel_modal import PanelWidget
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
@@ -127,8 +127,8 @@ class BuildColorPanel(PanelWidget):
|
||||
self.border_checkbox.setFixedSize(22, 22)
|
||||
self.border_checkbox.clicked.connect(
|
||||
lambda checked: self.update_secondary(
|
||||
color=QColor(self.preview_button.tag_color_group.secondary)
|
||||
if self.preview_button.tag_color_group.secondary
|
||||
color=QColor(unwrap(self.preview_button.tag_color_group).secondary)
|
||||
if unwrap(self.preview_button.tag_color_group).secondary
|
||||
else None,
|
||||
color_border=checked,
|
||||
)
|
||||
@@ -265,7 +265,7 @@ class BuildColorPanel(PanelWidget):
|
||||
def update_secondary(self, color: QColor | None = None, color_border: bool = False):
|
||||
logger.info("[BuildColorPanel] Updating Secondary", color=color)
|
||||
|
||||
color_ = color or QColor(palette.get_tag_color(ColorType.PRIMARY, TagColorEnum.DEFAULT))
|
||||
color_ = color or QColor(get_tag_color(ColorType.PRIMARY, TagColorEnum.DEFAULT))
|
||||
|
||||
highlight_color = get_highlight_color(color_)
|
||||
text_color = get_text_color(color_, highlight_color)
|
||||
@@ -13,9 +13,9 @@ from PySide6.QtWidgets import QLabel, QLineEdit, QVBoxLayout, QWidget
|
||||
from tagstudio.core.constants import RESERVED_NAMESPACE_PREFIX
|
||||
from tagstudio.core.library.alchemy.library import Library, ReservedNamespaceError, slugify
|
||||
from tagstudio.core.library.alchemy.models import Namespace
|
||||
from tagstudio.core.palette import ColorType, UiColor, get_ui_color
|
||||
from tagstudio.qt.models.palette import ColorType, UiColor, get_ui_color
|
||||
from tagstudio.qt.translations import Translations
|
||||
from tagstudio.qt.widgets.panel import PanelWidget
|
||||
from tagstudio.qt.views.panel_modal import PanelWidget
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
@@ -28,19 +28,20 @@ from PySide6.QtWidgets import (
|
||||
from tagstudio.core.library.alchemy.enums import TagColorEnum
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.library.alchemy.models import Tag, TagColorGroup
|
||||
from tagstudio.core.palette import ColorType, UiColor, get_tag_color, get_ui_color
|
||||
from tagstudio.qt.modals.tag_color_selection import TagColorSelection
|
||||
from tagstudio.qt.modals.tag_search import TagSearchModal, TagSearchPanel
|
||||
from tagstudio.qt.translations import Translations
|
||||
from tagstudio.qt.widgets.panel import PanelModal, PanelWidget
|
||||
from tagstudio.qt.widgets.tag import (
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
from tagstudio.qt.mixed.tag_color_preview import TagColorPreview
|
||||
from tagstudio.qt.mixed.tag_color_selection import TagColorSelection
|
||||
from tagstudio.qt.mixed.tag_search import TagSearchModal, TagSearchPanel
|
||||
from tagstudio.qt.mixed.tag_widget import (
|
||||
TagWidget,
|
||||
get_border_color,
|
||||
get_highlight_color,
|
||||
get_primary_color,
|
||||
get_text_color,
|
||||
)
|
||||
from tagstudio.qt.widgets.tag_color_preview import TagColorPreview
|
||||
from tagstudio.qt.models.palette import ColorType, UiColor, get_tag_color, get_ui_color
|
||||
from tagstudio.qt.translations import Translations
|
||||
from tagstudio.qt.views.panel_modal import PanelModal, PanelWidget
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
@@ -181,6 +182,7 @@ class BuildTagPanel(PanelWidget):
|
||||
self.color_layout.addWidget(self.color_title)
|
||||
self.color_button: TagColorPreview
|
||||
try:
|
||||
assert tag is not None
|
||||
self.color_button = TagColorPreview(self.lib, tag.color)
|
||||
except Exception as e:
|
||||
# TODO: Investigate why this happens during tests
|
||||
@@ -244,6 +246,46 @@ class BuildTagPanel(PanelWidget):
|
||||
self.cat_layout.addWidget(self.cat_checkbox)
|
||||
self.cat_layout.addWidget(self.cat_title)
|
||||
|
||||
# Hidden ---------------------------------------------------------------
|
||||
self.hidden_widget = QWidget()
|
||||
self.hidden_layout = QHBoxLayout(self.hidden_widget)
|
||||
self.hidden_layout.setStretch(1, 1)
|
||||
self.hidden_layout.setContentsMargins(0, 0, 0, 0)
|
||||
self.hidden_layout.setSpacing(6)
|
||||
self.hidden_layout.setAlignment(Qt.AlignmentFlag.AlignLeft)
|
||||
self.hidden_title = QLabel(Translations["tag.is_hidden"])
|
||||
self.hidden_checkbox = QCheckBox()
|
||||
self.hidden_checkbox.setFixedSize(22, 22)
|
||||
|
||||
self.hidden_checkbox.setStyleSheet(
|
||||
f"QCheckBox{{"
|
||||
f"background: rgba{primary_color.toTuple()};"
|
||||
f"color: rgba{text_color.toTuple()};"
|
||||
f"border-color: rgba{border_color.toTuple()};"
|
||||
f"border-radius: 6px;"
|
||||
f"border-style:solid;"
|
||||
f"border-width: 2px;"
|
||||
f"}}"
|
||||
f"QCheckBox::indicator{{"
|
||||
f"width: 10px;"
|
||||
f"height: 10px;"
|
||||
f"border-radius: 2px;"
|
||||
f"margin: 4px;"
|
||||
f"}}"
|
||||
f"QCheckBox::indicator:checked{{"
|
||||
f"background: rgba{text_color.toTuple()};"
|
||||
f"}}"
|
||||
f"QCheckBox::hover{{"
|
||||
f"border-color: rgba{highlight_color.toTuple()};"
|
||||
f"}}"
|
||||
f"QCheckBox::focus{{"
|
||||
f"border-color: rgba{highlight_color.toTuple()};"
|
||||
f"outline:none;"
|
||||
f"}}"
|
||||
)
|
||||
self.hidden_layout.addWidget(self.hidden_checkbox)
|
||||
self.hidden_layout.addWidget(self.hidden_title)
|
||||
|
||||
# Add Widgets to Layout ================================================
|
||||
self.root_layout.addWidget(self.name_widget)
|
||||
self.root_layout.addWidget(self.shorthand_widget)
|
||||
@@ -254,6 +296,7 @@ class BuildTagPanel(PanelWidget):
|
||||
self.root_layout.addWidget(self.color_widget)
|
||||
self.root_layout.addWidget(QLabel("<h3>Properties</h3>"))
|
||||
self.root_layout.addWidget(self.cat_widget)
|
||||
self.root_layout.addWidget(self.hidden_widget)
|
||||
|
||||
self.parent_ids: set[int] = set()
|
||||
self.alias_ids: list[int] = []
|
||||
@@ -316,7 +359,7 @@ class BuildTagPanel(PanelWidget):
|
||||
item = self.aliases_table.cellWidget(row, 1)
|
||||
item.setFocus()
|
||||
|
||||
def remove_alias_callback(self, alias_name: str, alias_id: int | None = None):
|
||||
def remove_alias_callback(self, alias_name: str, alias_id: int):
|
||||
logger.info("remove_alias_callback")
|
||||
|
||||
self.alias_ids.remove(alias_id)
|
||||
@@ -468,7 +511,7 @@ class BuildTagPanel(PanelWidget):
|
||||
|
||||
def _update_new_alias_name_dict(self):
|
||||
for i in range(0, self.aliases_table.rowCount()):
|
||||
widget = self.aliases_table.cellWidget(i, 1)
|
||||
widget = cast(CustomTableItem, self.aliases_table.cellWidget(i, 1))
|
||||
self.new_alias_names[widget.id] = widget.text()
|
||||
|
||||
def _set_aliases(self):
|
||||
@@ -479,7 +522,7 @@ class BuildTagPanel(PanelWidget):
|
||||
|
||||
self.alias_names.clear()
|
||||
|
||||
last: QWidget = self.panel_save_button
|
||||
last: QWidget | None = self.panel_save_button
|
||||
for alias_id in self.alias_ids:
|
||||
alias = self.lib.get_alias(self.tag.id, alias_id)
|
||||
|
||||
@@ -506,7 +549,8 @@ class BuildTagPanel(PanelWidget):
|
||||
self.aliases_table.setCellWidget(row, 1, new_item)
|
||||
self.aliases_table.setCellWidget(row, 0, remove_btn)
|
||||
|
||||
self.setTabOrder(last, self.aliases_table.cellWidget(row, 1))
|
||||
if last is not None:
|
||||
self.setTabOrder(last, self.aliases_table.cellWidget(row, 1))
|
||||
self.setTabOrder(
|
||||
self.aliases_table.cellWidget(row, 1), self.aliases_table.cellWidget(row, 0)
|
||||
)
|
||||
@@ -542,6 +586,7 @@ class BuildTagPanel(PanelWidget):
|
||||
self.color_button.set_tag_color_group(None)
|
||||
|
||||
self.cat_checkbox.setChecked(tag.is_category)
|
||||
self.hidden_checkbox.setChecked(tag.is_hidden)
|
||||
|
||||
def on_name_changed(self):
|
||||
is_empty = not self.name_field.text().strip()
|
||||
@@ -565,6 +610,7 @@ class BuildTagPanel(PanelWidget):
|
||||
tag.color_namespace = self.tag_color_namespace
|
||||
tag.color_slug = self.tag_color_slug
|
||||
tag.is_category = self.cat_checkbox.isChecked()
|
||||
tag.is_hidden = self.hidden_checkbox.isChecked()
|
||||
|
||||
logger.info("built tag", tag=tag)
|
||||
return tag
|
||||
@@ -574,8 +620,9 @@ class BuildTagPanel(PanelWidget):
|
||||
self.setTabOrder(self.shorthand_field, self.aliases_add_button)
|
||||
self.setTabOrder(self.aliases_add_button, self.parent_tags_add_button)
|
||||
self.setTabOrder(self.parent_tags_add_button, self.color_button)
|
||||
self.setTabOrder(self.color_button, self.panel_cancel_button)
|
||||
self.setTabOrder(self.panel_cancel_button, self.panel_save_button)
|
||||
self.setTabOrder(self.panel_save_button, self.aliases_table.cellWidget(0, 1))
|
||||
self.setTabOrder(self.color_button, unwrap(self.panel_cancel_button))
|
||||
self.setTabOrder(unwrap(self.panel_cancel_button), unwrap(self.panel_save_button))
|
||||
self.setTabOrder(unwrap(self.panel_save_button), self.aliases_table.cellWidget(0, 1))
|
||||
self.name_field.selectAll()
|
||||
self.name_field.setFocus()
|
||||
self._set_aliases()
|
||||
@@ -13,16 +13,17 @@ from PySide6.QtWidgets import QMessageBox, QPushButton
|
||||
from tagstudio.core.constants import RESERVED_NAMESPACE_PREFIX
|
||||
from tagstudio.core.library.alchemy.enums import TagColorEnum
|
||||
from tagstudio.core.library.alchemy.models import TagColorGroup
|
||||
from tagstudio.core.palette import ColorType, get_tag_color
|
||||
from tagstudio.qt.flowlayout import FlowLayout
|
||||
from tagstudio.qt.modals.build_color import BuildColorPanel
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
from tagstudio.qt.mixed.build_color import BuildColorPanel
|
||||
from tagstudio.qt.mixed.field_widget import FieldWidget
|
||||
from tagstudio.qt.mixed.tag_color_label import TagColorLabel
|
||||
from tagstudio.qt.models.palette import ColorType, get_tag_color
|
||||
from tagstudio.qt.translations import Translations
|
||||
from tagstudio.qt.widgets.fields import FieldWidget
|
||||
from tagstudio.qt.widgets.panel import PanelModal
|
||||
from tagstudio.qt.widgets.tag_color_label import TagColorLabel
|
||||
from tagstudio.qt.views.layouts.flow_layout import FlowLayout
|
||||
from tagstudio.qt.views.panel_modal import PanelModal
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from tagstudio.core.library import Library
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
@@ -88,7 +89,7 @@ class ColorBoxWidget(FieldWidget):
|
||||
color_widgets: list[TagColorLabel] = []
|
||||
|
||||
while self.base_layout.itemAt(0):
|
||||
self.base_layout.takeAt(0).widget().deleteLater()
|
||||
unwrap(self.base_layout.takeAt(0)).widget().deleteLater()
|
||||
|
||||
for color in colors_:
|
||||
color_widget = TagColorLabel(
|
||||
@@ -6,7 +6,7 @@ from typing import cast
|
||||
from PySide6.QtCore import QDateTime
|
||||
from PySide6.QtWidgets import QDateTimeEdit, QVBoxLayout
|
||||
|
||||
from tagstudio.qt.widgets.panel import PanelWidget
|
||||
from tagstudio.qt.views.panel_modal import PanelWidget
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from tagstudio.qt.ts_qt import QtDriver
|
||||
@@ -21,8 +21,9 @@ from PySide6.QtWidgets import (
|
||||
QWidget,
|
||||
)
|
||||
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
from tagstudio.qt.mixed.progress_bar import ProgressWidget
|
||||
from tagstudio.qt.translations import Translations
|
||||
from tagstudio.qt.widgets.progress import ProgressWidget
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from tagstudio.qt.ts_qt import QtDriver
|
||||
@@ -120,7 +121,9 @@ class DropImportModal(QWidget):
|
||||
continue
|
||||
|
||||
self.files.append(f)
|
||||
if (self.driver.lib.library_dir / self._get_relative_path(file)).exists():
|
||||
if (
|
||||
unwrap(self.driver.lib.library_dir) / self._get_relative_path(file)
|
||||
).exists():
|
||||
self.duplicate_files.append(f)
|
||||
|
||||
self.dirs_in_root.append(file.parent)
|
||||
@@ -132,7 +135,7 @@ class DropImportModal(QWidget):
|
||||
file.parent
|
||||
) # to create relative path of files not in folder
|
||||
|
||||
if (Path(self.driver.lib.library_dir) / file.name).exists():
|
||||
if (Path(unwrap(self.driver.lib.library_dir)) / file.name).exists():
|
||||
self.duplicate_files.append(file)
|
||||
|
||||
def ask_duplicates_choice(self):
|
||||
@@ -205,8 +208,10 @@ class DropImportModal(QWidget):
|
||||
new_name = self._get_renamed_duplicate_filename(dest_file)
|
||||
dest_file = dest_file.with_name(new_name)
|
||||
|
||||
(self.driver.lib.library_dir / dest_file).parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copyfile(file, self.driver.lib.library_dir / dest_file)
|
||||
(unwrap(self.driver.lib.library_dir) / dest_file).parent.mkdir(
|
||||
parents=True, exist_ok=True
|
||||
)
|
||||
shutil.copyfile(file, unwrap(self.driver.lib.library_dir) / dest_file)
|
||||
|
||||
file_count += 1
|
||||
yield [file_count, duplicated_files_progress]
|
||||
@@ -226,7 +231,7 @@ class DropImportModal(QWidget):
|
||||
except ValueError:
|
||||
dot_idx = len(o_filename)
|
||||
|
||||
while (self.driver.lib.library_dir / filepath).exists():
|
||||
while (unwrap(self.driver.lib.library_dir) / filepath).exists():
|
||||
filepath = filepath.with_name(
|
||||
o_filename[:dot_idx] + f" ({index})" + o_filename[dot_idx:]
|
||||
)
|
||||
@@ -10,7 +10,7 @@ from datetime import datetime as dt
|
||||
from warnings import catch_warnings
|
||||
|
||||
import structlog
|
||||
from PySide6.QtCore import Qt, Signal
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtGui import QGuiApplication
|
||||
from PySide6.QtWidgets import (
|
||||
QFrame,
|
||||
@@ -22,25 +22,24 @@ from PySide6.QtWidgets import (
|
||||
QWidget,
|
||||
)
|
||||
|
||||
from tagstudio.core.constants import TAG_ARCHIVED, TAG_FAVORITE
|
||||
from tagstudio.core.enums import Theme
|
||||
from tagstudio.core.library.alchemy.enums import FieldTypeEnum
|
||||
from tagstudio.core.library.alchemy.fields import (
|
||||
BaseField,
|
||||
DatetimeField,
|
||||
FieldTypeEnum,
|
||||
TextField,
|
||||
)
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.library.alchemy.models import Entry, Tag
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
from tagstudio.qt.controller.components.tag_box_controller import TagBoxWidget
|
||||
from tagstudio.qt.controllers.tag_box_controller import TagBoxWidget
|
||||
from tagstudio.qt.mixed.datetime_picker import DatetimePicker
|
||||
from tagstudio.qt.mixed.field_widget import FieldContainer
|
||||
from tagstudio.qt.mixed.text_field import TextWidget
|
||||
from tagstudio.qt.translations import Translations
|
||||
from tagstudio.qt.widgets.datetime_picker import DatetimePicker
|
||||
from tagstudio.qt.widgets.fields import FieldContainer
|
||||
from tagstudio.qt.widgets.panel import PanelModal
|
||||
from tagstudio.qt.widgets.text import TextWidget
|
||||
from tagstudio.qt.widgets.text_box_edit import EditTextBox
|
||||
from tagstudio.qt.widgets.text_line_edit import EditTextLine
|
||||
from tagstudio.qt.views.edit_text_box_modal import EditTextBox
|
||||
from tagstudio.qt.views.edit_text_line_modal import EditTextLine
|
||||
from tagstudio.qt.views.panel_modal import PanelModal
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from tagstudio.qt.ts_qt import QtDriver
|
||||
@@ -51,9 +50,6 @@ logger = structlog.get_logger(__name__)
|
||||
class FieldContainers(QWidget):
|
||||
"""The Preview Panel Widget."""
|
||||
|
||||
favorite_updated = Signal(bool)
|
||||
archived_updated = Signal(bool)
|
||||
|
||||
def __init__(self, library: Library, driver: "QtDriver"):
|
||||
super().__init__()
|
||||
|
||||
@@ -131,7 +127,7 @@ class FieldContainers(QWidget):
|
||||
container_index += 1
|
||||
container_len += 1
|
||||
if update_badges:
|
||||
self.emit_badge_signals({t.id for t in entry_tags})
|
||||
self.driver.emit_badge_signals({t.id for t in entry_tags})
|
||||
|
||||
# Write field container(s)
|
||||
for index, field in enumerate(entry_fields, start=container_index):
|
||||
@@ -149,10 +145,12 @@ class FieldContainers(QWidget):
|
||||
tag = self.lib.get_tag(tag_id)
|
||||
if not tag:
|
||||
return
|
||||
new_tags = (
|
||||
entry.tags.union({tag}) if toggle_value else {t for t in entry.tags if t.id != tag_id}
|
||||
)
|
||||
self.update_granular(entry_tags=new_tags, entry_fields=entry.fields, update_badges=False)
|
||||
if toggle_value:
|
||||
entry.tags.add(tag)
|
||||
else:
|
||||
entry.tags.discard(tag)
|
||||
|
||||
self.update_granular(entry_tags=entry.tags, entry_fields=entry.fields, update_badges=False)
|
||||
|
||||
def hide_containers(self):
|
||||
"""Hide all field and tag containers."""
|
||||
@@ -240,7 +238,7 @@ class FieldContainers(QWidget):
|
||||
self.driver.selected,
|
||||
tag_ids=tags,
|
||||
)
|
||||
self.emit_badge_signals(tags, emit_on_absent=False)
|
||||
self.driver.emit_badge_signals(tags, emit_on_absent=False)
|
||||
|
||||
def write_container(self, index: int, field: BaseField, is_mixed: bool = False):
|
||||
"""Update/Create data for a FieldContainer.
|
||||
@@ -491,16 +489,3 @@ class FieldContainers(QWidget):
|
||||
result = remove_mb.exec_()
|
||||
if result == QMessageBox.ButtonRole.ActionRole.value:
|
||||
callback()
|
||||
|
||||
def emit_badge_signals(self, tag_ids: list[int] | set[int], emit_on_absent: bool = True):
|
||||
"""Emit any connected signals for updating badge icons."""
|
||||
logger.info("[emit_badge_signals] Emitting", tag_ids=tag_ids, emit_on_absent=emit_on_absent)
|
||||
if TAG_ARCHIVED in tag_ids:
|
||||
self.archived_updated.emit(True) # noqa: FBT003
|
||||
elif emit_on_absent:
|
||||
self.archived_updated.emit(False) # noqa: FBT003
|
||||
|
||||
if TAG_FAVORITE in tag_ids:
|
||||
self.favorite_updated.emit(True) # noqa: FBT003
|
||||
elif emit_on_absent:
|
||||
self.favorite_updated.emit(False) # noqa: FBT003
|
||||
@@ -22,10 +22,10 @@ from tagstudio.core.enums import ShowFilepathOption, Theme
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.library.ignore import Ignore
|
||||
from tagstudio.core.media_types import MediaCategories
|
||||
from tagstudio.core.palette import ColorType, UiColor, get_ui_color
|
||||
from tagstudio.core.utils.types import unwrap
|
||||
from tagstudio.qt.helpers.file_opener import FileOpenerHelper, FileOpenerLabel
|
||||
from tagstudio.qt.models.palette import ColorType, UiColor, get_ui_color
|
||||
from tagstudio.qt.translations import Translations
|
||||
from tagstudio.qt.utils.file_opener import FileOpenerHelper, FileOpenerLabel
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from tagstudio.qt.ts_qt import QtDriver
|
||||
@@ -151,7 +151,7 @@ class FileAttributes(QWidget):
|
||||
self.layout().setSpacing(0)
|
||||
self.file_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
||||
self.file_label.setText(f"<i>{Translations['preview.no_selection']}</i>")
|
||||
self.file_label.set_file_path("")
|
||||
self.file_label.set_file_path(Path())
|
||||
self.file_label.setCursor(Qt.CursorShape.ArrowCursor)
|
||||
self.dimensions_label.setText("")
|
||||
self.dimensions_label.setHidden(True)
|
||||
@@ -264,6 +264,6 @@ class FileAttributes(QWidget):
|
||||
self.file_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
||||
self.file_label.setText(Translations.format("preview.multiple_selection", count=count))
|
||||
self.file_label.setCursor(Qt.CursorShape.ArrowCursor)
|
||||
self.file_label.set_file_path("")
|
||||
self.file_label.set_file_path(Path())
|
||||
self.dimensions_label.setText("")
|
||||
self.dimensions_label.setHidden(True)
|
||||