From 3221aafdfc2f7439b3440ba253125cb68547614a Mon Sep 17 00:00:00 2001 From: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com> Date: Wed, 5 Mar 2025 21:46:53 -0800 Subject: [PATCH] refactor: rename "reverse_map" to "inverse_map" --- docs/macros.md | 8 ++++---- src/tagstudio/core/macro_parser.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/macros.md b/docs/macros.md index 3c54ca70..eb44022e 100644 --- a/docs/macros.md +++ b/docs/macros.md @@ -321,7 +321,7 @@ on_missing = "create" ### Manual Tag Mapping -If the results from the standard tag matching system aren't good enough to properly import specific source data into your TagStudio library, you have the option to manually specify mappings between source and destination tags. A table with the `.map` or `.reverse_map` suffixes will be used to map tags in the nearest scope. +If the results from the standard tag matching system aren't good enough to properly import specific source data into your TagStudio library, you have the option to manually specify mappings between source and destination tags. A table with the `.map` or `.inverse_map` suffixes will be used to map tags in the nearest scope. === "Global Scope" @@ -341,7 +341,7 @@ If the results from the standard tag matching system aren't good enough to prope ``` - `map`: Used for [1 to 0](#1-to-0-ignore-matches), [1 to 1](#1-to-1), and [1 to Many](#1-to-many) mappings. -- `reverse_map`: Used for [Many to 1](#many-to-1-reverse-map) mappings. +- `inverse_map`: Used for [Many to 1](#many-to-1-inverse-map) mappings. #### 1 to 0 (Ignore Matches) @@ -378,12 +378,12 @@ drawing = ["Drawing (2D)", "Image (Meta Tags)"] video = ["Animation (2D)", "Animated (Meta Tags)"] ``` -#### Many to 1 (Reverse Map) +#### Many to 1 (Inverse Map) By mapping a key of the name of one of your TagStudio tags to a list of source tags, you can declare a combination of required source tags that result in a wholly new matched TagStudio tag. This is useful if you use a single tag in your TagStudio library that is represented by multiple split tags from your source. ```toml -[newgrounds.tags.reverse_map] +[newgrounds.tags.inverse_map] # TagStudio Tag Name = List of Source Tag Names "Animation (2D)" = ["drawing", "video"] "Animation (3D)" = ["3D", "video"] diff --git a/src/tagstudio/core/macro_parser.py b/src/tagstudio/core/macro_parser.py index 215ae354..ddd69450 100644 --- a/src/tagstudio/core/macro_parser.py +++ b/src/tagstudio/core/macro_parser.py @@ -48,7 +48,7 @@ EXIF = "exif" ID3 = "id3" MAP = "map" -REVERSE_MAP = "reverse_map" +INVERSE_MAP = "inverse_map" class Actions(StrEnum):