diff --git a/README.md b/README.md index f1a205b5..31eb5d68 100644 --- a/README.md +++ b/README.md @@ -182,12 +182,11 @@ _Skip these steps if launching from the .sh script on Linux/macOS._ - Windows w/Command Prompt: `.venv\Scripts\activate.bat` - Linux/macOS: `source .venv/bin/activate` -3. Install the required packages: +3. Install the required packages: - required to run the app: `pip install -r requirements.txt` - required to develop: `pip install -r requirements-dev.txt` - To run all the tests use `python -m pytest tests/` from the `tagstudio` folder. _Learn more about setting up a virtual environment [here](https://docs.python.org/3/tutorial/venv.html)._ @@ -213,10 +212,13 @@ _Learn more about setting up a virtual environment [here](https://docs.python.or ### What State Is the Project Currently In? -As of writing (Alpha v9.2.0) the project is in a useable state, however it lacks proper testing and quality of life features. +As of writing (Alpha v9.2.1) the project is in a useable state, however it lacks proper testing and quality of life features. ### What Features Are You Planning on Adding? +> [!NOTE] +> **_See [Planned Features](/doc/planned_features.md) documentation._** + Of the several features I have planned for the project, these are broken up into “priority” features and “future” features. Priority features were originally intended for the first public release, however are currently absent from the Alpha v9.x.x builds. #### Priority Features diff --git a/doc/Field.md b/doc/Field.md deleted file mode 100644 index 1f91974e..00000000 --- a/doc/Field.md +++ /dev/null @@ -1,23 +0,0 @@ -# Field - -Fields are the building blocks of metadata stored in [entries](/doc/Entry.md). Fields have several base types for representing different kinds of information, including: - -#### `text_line` - - A string of text, displayed as a single line. - - e.g: Title, Author, Artist, URL, etc. -#### `text_box` - - A long string of text displayed as a box of text. - - e.g: Description, Notes, etc. -#### `tag_box` - - A box of [tags](/doc/Tag.md) defined and added by the user. - - Multiple tag boxes can be used to separate classifications of tags. - - e.g: Content Tags, Meta Tags, etc. -#### `datetime` [WIP] - - A date and time value. - - e.g: Date Created, Date Modified, Date Taken, etc. -#### `checkbox` [WIP] - - A simple two-state checkbox. - - Can be associated with a tag for quick organization. - - e.g: Archive, Favorite, etc. -#### `collation` [obsolete] - - Previously used for associating files to be used in a [collation](/doc/Macro.md/#create-collage), will be removed in favor of a more flexible feature in future updates. diff --git a/doc/Home.md b/doc/Home.md deleted file mode 100644 index fc28baa2..00000000 --- a/doc/Home.md +++ /dev/null @@ -1,19 +0,0 @@ -# Welcome to the TagStudio Wiki! - -> [!WARNING] -> This documentation is still a work in progress, and is intended to aide with deconstructing and understanding of the core mechanics of TagStudio and how it operates. - -![Under Construction](https://i0.wp.com/www.bapl.org/wp-content/uploads/2019/02/old-under-construction-gif.gif) - -## Table of Contents - -- [Library](/doc/Library.md) -- [Entries](/doc/Entry.md) -- [Fields](/doc/Field.md) -- [Tags](/doc/Tag.md) -- [Tools & Macros](/doc/Macro.md) - ---- - -### Database-Update -The "Database Update", "DB Migration", or "SQLite Migration" is an upcoming update to TagStudio which will replace the current JSON [library](/doc/Library.md) with a SQL-based one, and will additionally include some fundamental changes to how some features such as [tags](/doc/Tag.md) will work. diff --git a/doc/Library.md b/doc/Library.md deleted file mode 100644 index 47f2af33..00000000 --- a/doc/Library.md +++ /dev/null @@ -1,10 +0,0 @@ -# Library - -The library is how TagStudio represents your chosen directory, with every file inside of it being displayed as an [entry](/doc/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. -Note that this means [tags](/doc/Tag.md) you create only exist *per-library*. - -### Library contents -- [Entries](/doc/Entry.md) -- [Fields](/doc/Field.md) -- [Tags](/doc/Tag.md) -- [Macros](/doc/Macro.md) diff --git a/doc/assets/db_schema.png b/doc/assets/db_schema.png new file mode 100644 index 00000000..f611542f Binary files /dev/null and b/doc/assets/db_schema.png differ diff --git a/doc/assets/tag_override_ex-1.png b/doc/assets/tag_override_ex-1.png new file mode 100644 index 00000000..6aba28cc Binary files /dev/null and b/doc/assets/tag_override_ex-1.png differ diff --git a/doc/assets/tag_override_ex-2.png b/doc/assets/tag_override_ex-2.png new file mode 100644 index 00000000..66965a9f Binary files /dev/null and b/doc/assets/tag_override_ex-2.png differ diff --git a/doc/index.md b/doc/index.md new file mode 100644 index 00000000..50c9c518 --- /dev/null +++ b/doc/index.md @@ -0,0 +1,24 @@ +# Welcome to the TagStudio Documentation! + +> [!WARNING] +> This documentation is still a work in progress, and is intended to aide with deconstructing and understanding of the core mechanics of TagStudio and how it operates. + +
+ TagStudio Alpha + Under Construction +
+ +## Table of Contents + +- [Library](/doc/library/library.md) +- [Entries](/doc/library/entry.md) +- [Fields](/doc/library/field.md) +- [Tags](/doc/library/tag.md) +- [Tools & Macros](/doc/utilities/macro.md) +- [Planned Features](/doc/updates/planned_features.md) + +--- + +### [Database Migration](/doc/updates/db_migration.md) + +The "Database Migration", "DB Migration", or "SQLite Migration" is an upcoming update to TagStudio which will replace the current JSON [library](/doc/library/library.md) with a SQL-based one, and will additionally include some fundamental changes to how some features such as [tags](/doc/library/tag.md) will work. diff --git a/doc/Entry.md b/doc/library/entry.md similarity index 79% rename from doc/Entry.md rename to doc/library/entry.md index f80aceaf..10c85c10 100644 --- a/doc/Entry.md +++ b/doc/library/entry.md @@ -1,6 +1,6 @@ # Entry -Entries are the units that fill a [library](/doc/Library.md). Each one corresponds to a file, holding a reference to it along with the metadata associated with it. +Entries are the units that fill a [library](/doc/library/library.md). Each one corresponds to a file, holding a reference to it along with the metadata associated with it. ### Entry Object Structure @@ -14,12 +14,12 @@ Entries are the units that fill a [library](/doc/Library.md). Each one correspon 3. `path`: - String, **Required**, OS Agnostic - The folder path in which the media file is located in. -4. [`fields`](/doc/Field.md): +4. [`fields`](/doc/library/field.md): - List of dicts, Optional - A list of Field ID/Value dicts. NOTE: _Entries currently have several unused optional fields intended for later features._ -## Retrieving Entries based on [Tag](/doc/Tag.md) Cluster +## Retrieving Entries based on [Tag](/doc/library/tag.md) Cluster -By default when querying Entries, each Entry's `tags` list (stored in the form of Tag `id`s) is compared against the Tag `id`s in a given Tag cluster (list of Tag `id`s) or appended clusters in the case of multi-term queries. The type of comparison depends on the type of query and whether or not it is an inclusive or exclusive query, or a combination of both. This default searching behavior is done in _O(n)_ time, but can be sped up in the future by building indexes on certain search terms. These indexes can be stored on disk and loaded back into memory in future sessions. These indexes will also need to be updated as new Tags and Entries are added or edited. \ No newline at end of file +By default when querying Entries, each Entry's `tags` list (stored in the form of Tag `id`s) is compared against the Tag `id`s in a given Tag cluster (list of Tag `id`s) or appended clusters in the case of multi-term queries. The type of comparison depends on the type of query and whether or not it is an inclusive or exclusive query, or a combination of both. This default searching behavior is done in _O(n)_ time, but can be sped up in the future by building indexes on certain search terms. These indexes can be stored on disk and loaded back into memory in future sessions. These indexes will also need to be updated as new Tags and Entries are added or edited. diff --git a/doc/library/entry_groups.md b/doc/library/entry_groups.md new file mode 100644 index 00000000..1372e7dd --- /dev/null +++ b/doc/library/entry_groups.md @@ -0,0 +1,3 @@ +# Entry Groups (Upcoming Feature) + +Entries can be grouped via tags marked as “groups” which when applied to different entries will signal TagStudio to treat those entries as a single group inside of searches and browsing. diff --git a/doc/library/field.md b/doc/library/field.md new file mode 100644 index 00000000..e40b0c43 --- /dev/null +++ b/doc/library/field.md @@ -0,0 +1,34 @@ +# Field + +Fields are the building blocks of metadata stored in [entries](/doc/library/entry.md). Fields have several base types for representing different kinds of information, including: + +#### `text_line` + +- A string of text, displayed as a single line. + - e.g: Title, Author, Artist, URL, etc. + +#### `text_box` + +- A long string of text displayed as a box of text. + - e.g: Description, Notes, etc. + +#### `tag_box` + +- A box of [tags](/doc/library/tag.md) defined and added by the user. +- Multiple tag boxes can be used to separate classifications of tags. + - e.g: Content Tags, Meta Tags, etc. + +#### `datetime` [WIP] + +- A date and time value. + - e.g: Date Created, Date Modified, Date Taken, etc. + +#### `checkbox` [WIP] + +- A simple two-state checkbox. +- Can be associated with a tag for quick organization. + - e.g: Archive, Favorite, etc. + +#### `collation` [obsolete] + +- Previously used for associating files to be used in a [collation](/doc/utilities/macro.md#create-collage), will be removed in favor of a more flexible feature in future updates. diff --git a/doc/library/library.md b/doc/library/library.md new file mode 100644 index 00000000..bc8a6d0d --- /dev/null +++ b/doc/library/library.md @@ -0,0 +1,11 @@ +# Library + +The library is how TagStudio represents your chosen directory, with every file inside of it being displayed as an [entry](/doc/library/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. +Note that this means [tags](/doc/library/tag.md) you create only exist _per-library_. + +### Library Contents + +- [Entries](/doc/library/entry.md) +- [Fields](/doc/library/field.md) +- [Tags](/doc/library/tag.md) +- [Macros](/doc/utilities/macro.md) diff --git a/doc/Tag.md b/doc/library/tag.md similarity index 88% rename from doc/Tag.md rename to doc/library/tag.md index 644ca25f..599d5511 100644 --- a/doc/Tag.md +++ b/doc/library/tag.md @@ -1,37 +1,54 @@ # Tag -Tags are user-defined attributes made up of one or more keywords, aliases, and relationships to other tags. A person, place, thing, concept, you name it! Tags allow for a more sophisticated way to organize and search [entries](/doc/Entry.md) thanks to their aliases, parent tags, and more. +Tags are user-defined attributes made up of one or more keywords, aliases, and relationships to other tags. A person, place, thing, concept, you name it! Tags allow for a more sophisticated way to organize and search [entries](/doc/library/entry.md) thanks to their aliases, parent tags, and more. Tags can be as simple or complex as wanted, so that any user can tune TagStudio to fit their needs. -Among the things that make tags so useful, aliases give the ability to contain alternate names and spellings, making searches intuitive and expansive. Furthermore, parent-tags/subtags offer relational organization capabilities for the structuring and connection of the [library's](/doc/Library.md) contents. +Among the things that make tags so useful, aliases give the ability to contain alternate names and spellings, making searches intuitive and expansive. Furthermore, parent-tags/subtags offer relational organization capabilities for the structuring and connection of the [library's](/doc/library/library.md) contents. ## Tag Object Structure #### `id` + ID for the tag. + - Int, Unique, Required - Used for internal processing + #### `name` + The normal name of the tag, with no shortening or specification. + - String, Required - Doesn't have to be unique - Used for display, searching, and storing + #### `shorthand` + The shorthand name for the tag. Works like an alias but is used for specific display purposes. + - String, Optional - Doesn't have to be unique - Used for display and searching + #### `aliases` + Alternate names for the tag. + - List of Strings, Optional - Recommended to be unique to this tag - Used for searching + #### `subtags` + Other Tags that make up properties of this tag. Also called "parent tags". + - List of Strings, Optional - Used for display (first parent tag only) and searching. + #### `color` + A color name string for customizing the tag's display color + - String, Optional - Used for display @@ -41,11 +58,11 @@ Using for example, a library of files including some tagged with the following t | Tag | `name` | `shorthand` | `aliases` | `parent tags` | | ------------------- | ------------------- | ----------- | ---------------------- | -------------------------------------------- | -| *League of Legends* | "League of Legends" | "LoL" | ["League"] | ["Game", "Fantasy"] | -| *Arcane* | "Arcane" | "" | [] | ["League of Legends", "Cartoon"] | -| *Jinx (LoL)* | "Jinx Piltover" | "Jinx" | ["Jinxy", "Jinxy Poo"] | ["League of Legends", "Arcane", "Character"] | -| *Zander (Arcane)* | "Zander Zanderson" | "Zander" | [] | ["Arcane", "Character"] | -| *Mr. Legend (LoL)* | "Mr. Legend" | "" | [] | ["League of Legends", "Character"] | +| _League of Legends_ | "League of Legends" | "LoL" | ["League"] | ["Game", "Fantasy"] | +| _Arcane_ | "Arcane" | "" | [] | ["League of Legends", "Cartoon"] | +| _Jinx (LoL)_ | "Jinx Piltover" | "Jinx" | ["Jinxy", "Jinxy Poo"] | ["League of Legends", "Arcane", "Character"] | +| _Zander (Arcane)_ | "Zander Zanderson" | "Zander" | [] | ["Arcane", "Character"] | +| _Mr. Legend (LoL)_ | "Mr. Legend" | "" | [] | ["League of Legends", "Character"] | **The query "Arcane" will display results tagged with:** diff --git a/doc/library/tag_categories.md b/doc/library/tag_categories.md new file mode 100644 index 00000000..6edec95b --- /dev/null +++ b/doc/library/tag_categories.md @@ -0,0 +1,3 @@ +# Tag Categories (Upcoming Feature) + +Replaces [Tag Fields](/doc/library/field.md#tag_box). Tags are able to be marked as a “category” which then displays as tag fields currently do, with any tags inheriting from that category being displayed underneath. diff --git a/doc/library/tag_overrides.md b/doc/library/tag_overrides.md new file mode 100644 index 00000000..09673f74 --- /dev/null +++ b/doc/library/tag_overrides.md @@ -0,0 +1,16 @@ +# Tag Overrides (Upcoming Feature) + +Tag overrides are the ability to add or remove [parent tags](/doc/library/tag.md#subtags) from a [tag](/doc/library/tag.md) on a per- [entry](/doc/library/entry.md) basis. Relies on the [Database Migration](/doc/updates/db_migration.md) update being complete. + +## Examples + +
+ Example 1 +
Ex. 1 - Comparing standard tag composition vs additive and subtractive inheritance overrides.
+
+ +
+ Example 2 + +
Ex. 2 - Parent tag swap using tag overrides.
+
diff --git a/doc/updates/db_migration.md b/doc/updates/db_migration.md new file mode 100644 index 00000000..bccda350 --- /dev/null +++ b/doc/updates/db_migration.md @@ -0,0 +1,43 @@ +# Database Migration + +The database migration is an upcoming refactor to TagStudio's library data storage system. The database will be migrated from a JSON-based one to a SQLite-based one. Part of this migration will include a reworked schema, which will allow for several new features and changes to how [tags](/doc/library/tag.md) and [fields](/doc/library/field.md) operate. + +## Schema + +Database Schema + +### `alias` Table + +_Description TBA_ + +### `entry` Table + +_Description TBA_ + +### `entry_attribute` Table + +_Description TBA_ + +### `entry_page` Table + +_Description TBA_ + +### `location` Table + +_Description TBA_ + +### `tag` Table + +_Description TBA_ + +### `tag_relation` Table + +_Description TBA_ + +## Resulting New Features and Changes + +- Multiple Directory Support +- [Tag Categories](/doc/library/tag_categories.md) (Replaces [Tag Fields](/doc/library/field.md#tag_box)) +- [Tag Overrides](/doc/library/tag_overrides.md) +- User-Defined [Fields](/doc/library/field.md) +- Tag Icons diff --git a/doc/updates/planned_features.md b/doc/updates/planned_features.md new file mode 100644 index 00000000..12f89202 --- /dev/null +++ b/doc/updates/planned_features.md @@ -0,0 +1,59 @@ +# Planned Features + +The following lists outline the planned major and minor features for TagStudio, in no particular order. + +# Major Features + +- [SQL Database Migration](/doc/updates/db_migration.md) +- Multiple Directory Support +- [Tags Categories](/doc/library/tag_categories.md) +- [Entry Groups](/doc/library/entry_groups.md) +- [Tag Overrides](/doc/library/tag_overrides.md) +- Tagging Panel + - Top Tags + - Recent Tags + - Tag Search + - Pinned Tags +- Configurable Default Fields (May be part of [Macros](/doc/utilities/macro.md)) +- Deep File Extension Control +- Settings Menu +- Custom User Colors +- Search Engine Rework + - Boolean Search + - Tag Objects In Search + - Search For Fields + - Sortable Search Results +- Automatic Entry Relinking + - Detect Renames + - Detect Moves +- Thumbnail Caching +- User-Defined Fields +- Exportable Library/Tag Data + - Exportable Human-Readable Library + - Exportable/Importable Human-Readable “Tag Packs” + - Exportable/Importable Color Palettes +- Configurable Thumbnail Labels + - Toggle Extension Label + - Toggle File Size Label +- Configurable Thumbnail Tag Badges + - Customize tags that appear instead of just “Archive” and “Favorite” +- OCR Search + +## Minor Features + +- Deleting Tags +- Merging Tags +- Tag Icons +- Tag/Field Copy + Paste +- Collage UI +- Resizable Thumbnail Grid +- Draggable Files Outside The Program +- File Property Caching +- 3D Previews +- Audio Waveform Previews + - Toggle Between Waveform And Album Artwork +- PDF Previews +- SVG Previews +- Full Video Player +- Duration Properties For Video + Audio Files +- Optional Starter Tag Packs diff --git a/doc/Macro.md b/doc/utilities/macro.md similarity index 70% rename from doc/Macro.md rename to doc/utilities/macro.md index e5fe16c4..de576377 100644 --- a/doc/Macro.md +++ b/doc/utilities/macro.md @@ -1,12 +1,13 @@ # Tools & Macros -Tools and macros are features that serve to create a more fluid [library](/doc/Library.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](/doc/library/library.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](/doc/Entry.md), and some options for their resolution. +This tool displays the number of unlinked [entries](/doc/library/entry.md), and some options for their resolution. + 1. Refresh - Scans through the library and updates the unlinked entry count. 2. Search & Relink @@ -17,10 +18,11 @@ This tool displays the number of unlinked [entries](/doc/Entry.md), and some opt ### Fix Duplicate Files This tool allows for management of duplicate files in the library using a [DupeGuru](https://dupeguru.voltaicideas.net/) file. + 1. Load DupeGuru File - load the "results" file created from a DupeGuru scan 2. 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](/doc/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](/doc/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) ### Create Collage @@ -34,8 +36,8 @@ Tool is in development and will be documented in future update. ### Sort fields -Tool is in development, will allow for user-defined sorting of [fields](/doc/Field.md). +Tool is in development, will allow for user-defined sorting of [fields](/doc/library/field.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](/doc/Tag.md#subtags). Tags will initially be named after the folders, but can be fully edited and customized afterwards. \ No newline at end of file +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](/doc/library/tag.md#subtags). Tags will initially be named after the folders, but can be fully edited and customized afterwards.