Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package tui-journal for openSUSE:Factory 
checked in at 2024-09-09 14:44:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tui-journal (Old)
 and      /work/SRC/openSUSE:Factory/.tui-journal.new.10096 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tui-journal"

Mon Sep  9 14:44:37 2024 rev:3 rq:1199490 version:0.11.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/tui-journal/tui-journal.changes  2024-09-04 
13:26:46.523165838 +0200
+++ /work/SRC/openSUSE:Factory/.tui-journal.new.10096/tui-journal.changes       
2024-09-09 14:45:32.129422784 +0200
@@ -1,0 +2,7 @@
+Sun Sep  8 16:13:57 UTC 2024 - Muhammad Akbar Yanuar Mantari <[email protected]>
+
+- Update to version 0.11.0:
+  * Removes MouseCapture
+  * Added: Colored Tags
+
+-------------------------------------------------------------------

Old:
----
  tui-journal-0.10.0.tar.gz

New:
----
  tui-journal-0.11.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tui-journal.spec ++++++
--- /var/tmp/diff_new_pack.06nONU/_old  2024-09-09 14:45:32.885454234 +0200
+++ /var/tmp/diff_new_pack.06nONU/_new  2024-09-09 14:45:32.889454400 +0200
@@ -18,7 +18,7 @@
 
 %bcond_without test
 Name:           tui-journal
-Version:        0.10.0
+Version:        0.11.0
 Release:        0
 Summary:        Write and manage journals/notes from the terminal
 License:        MIT

++++++ tui-journal-0.10.0.tar.gz -> tui-journal-0.11.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tui-journal-0.10.0/.version 
new/tui-journal-0.11.0/.version
--- old/tui-journal-0.10.0/.version     2024-09-01 11:09:58.000000000 +0200
+++ new/tui-journal-0.11.0/.version     2024-09-08 13:51:39.000000000 +0200
@@ -1 +1 @@
-0.10.0
+0.11.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tui-journal-0.10.0/CHANGELOG.ron 
new/tui-journal-0.11.0/CHANGELOG.ron
--- old/tui-journal-0.10.0/CHANGELOG.ron        2024-09-01 11:09:58.000000000 
+0200
+++ new/tui-journal-0.11.0/CHANGELOG.ron        2024-09-08 13:51:39.000000000 
+0200
@@ -8,6 +8,24 @@
       references: {},
       version: (
         major: 0,
+        minor: 11,
+        patch: 0,
+      ),
+      released: "2024-09-08T11:49:56.679586845Z",
+      introduction: None,
+      changes: (
+        references: {},
+        changes: {
+          "Added": [
+            "Colored Tags to Journals, generated and assigned automatically",
+          ],
+        },
+      ),
+    ),
+    (
+      references: {},
+      version: (
+        major: 0,
         minor: 10,
         patch: 0,
       ),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tui-journal-0.10.0/CITATION.cff 
new/tui-journal-0.11.0/CITATION.cff
--- old/tui-journal-0.10.0/CITATION.cff 2024-09-01 11:09:58.000000000 +0200
+++ new/tui-journal-0.11.0/CITATION.cff 2024-09-08 13:51:39.000000000 +0200
@@ -3,8 +3,8 @@
 message: Please cite this software using these information.
 
 # Version information.
-date-released: 2024-09-01
-version: 0.10.0
+date-released: 2024-09-08
+version: 0.11.0
 
 # Project information.
 abstract: Your journal app if you live in a terminl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tui-journal-0.10.0/Cargo.lock 
new/tui-journal-0.11.0/Cargo.lock
--- old/tui-journal-0.10.0/Cargo.lock   2024-09-01 11:09:58.000000000 +0200
+++ new/tui-journal-0.11.0/Cargo.lock   2024-09-08 13:51:39.000000000 +0200
@@ -101,9 +101,9 @@
 
 [[package]]
 name = "anyhow"
-version = "1.0.86"
+version = "1.0.87"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
+checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8"
 
 [[package]]
 name = "arboard"
@@ -165,12 +165,6 @@
 
 [[package]]
 name = "bitflags"
-version = "1.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
-
-[[package]]
-name = "bitflags"
 version = "2.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
@@ -231,9 +225,9 @@
 
 [[package]]
 name = "cc"
-version = "1.1.15"
+version = "1.1.18"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6"
+checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476"
 dependencies = [
  "jobserver",
  "libc",
@@ -269,9 +263,9 @@
 
 [[package]]
 name = "clap"
-version = "4.5.16"
+version = "4.5.17"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019"
+checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac"
 dependencies = [
  "clap_builder",
  "clap_derive",
@@ -279,9 +273,9 @@
 
 [[package]]
 name = "clap_builder"
-version = "4.5.15"
+version = "4.5.17"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6"
+checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73"
 dependencies = [
  "anstream",
  "anstyle",
@@ -369,9 +363,9 @@
 
 [[package]]
 name = "cpufeatures"
-version = "0.2.13"
+version = "0.2.14"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad"
+checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0"
 dependencies = [
  "libc",
 ]
@@ -431,7 +425,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "crossterm_winapi",
  "futures-core",
  "mio",
@@ -776,7 +770,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "libc",
  "libgit2-sys",
  "log",
@@ -988,7 +982,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "libc",
 ]
 
@@ -1113,7 +1107,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "cfg-if",
  "cfg_aliases",
  "libc",
@@ -1213,7 +1207,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "block2",
  "libc",
  "objc2",
@@ -1229,7 +1223,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "block2",
  "objc2",
  "objc2-foundation",
@@ -1259,7 +1253,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "block2",
  "libc",
  "objc2",
@@ -1271,7 +1265,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "block2",
  "objc2",
  "objc2-foundation",
@@ -1283,7 +1277,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "block2",
  "objc2",
  "objc2-foundation",
@@ -1311,7 +1305,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "cfg-if",
  "foreign-types",
  "libc",
@@ -1367,9 +1361,9 @@
 
 [[package]]
 name = "parking"
-version = "2.2.0"
+version = "2.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae"
+checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
 
 [[package]]
 name = "parking_lot"
@@ -1389,7 +1383,7 @@
 dependencies = [
  "cfg-if",
  "libc",
- "redox_syscall 0.5.3",
+ "redox_syscall",
  "smallvec",
  "windows-targets 0.52.6",
 ]
@@ -1508,9 +1502,9 @@
 
 [[package]]
 name = "quick-xml"
-version = "0.34.0"
+version = "0.36.1"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4"
+checksum = "96a05e2e8efddfa51a84ca47cec303fac86c8541b686d37cac5efc0e094417bc"
 dependencies = [
  "memchr",
 ]
@@ -1560,7 +1554,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "fdef7f9be5c0122f890d58bdf4d964349ba6a6161f705907526d891efabba57d"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "cassowary",
  "compact_str",
  "crossterm",
@@ -1598,20 +1592,11 @@
 
 [[package]]
 name = "redox_syscall"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
-dependencies = [
- "bitflags 1.3.2",
-]
-
-[[package]]
-name = "redox_syscall"
 version = "0.5.3"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
 ]
 
 [[package]]
@@ -1653,11 +1638,11 @@
 
 [[package]]
 name = "rustix"
-version = "0.38.35"
+version = "0.38.36"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f"
+checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "errno",
  "libc",
  "linux-raw-sys",
@@ -1678,11 +1663,11 @@
 
 [[package]]
 name = "schannel"
-version = "0.1.23"
+version = "0.1.24"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"
+checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b"
 dependencies = [
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
 ]
 
 [[package]]
@@ -1703,7 +1688,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "core-foundation",
  "core-foundation-sys",
  "libc",
@@ -1722,18 +1707,18 @@
 
 [[package]]
 name = "serde"
-version = "1.0.209"
+version = "1.0.210"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
+checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
 dependencies = [
  "serde_derive",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.209"
+version = "1.0.210"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
+checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1742,9 +1727,9 @@
 
 [[package]]
 name = "serde_json"
-version = "1.0.127"
+version = "1.0.128"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
+checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8"
 dependencies = [
  "itoa",
  "memchr",
@@ -1907,9 +1892,9 @@
 
 [[package]]
 name = "sqlformat"
-version = "0.2.4"
+version = "0.2.6"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f"
+checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790"
 dependencies = [
  "nom",
  "unicode_categories",
@@ -1917,9 +1902,9 @@
 
 [[package]]
 name = "sqlx"
-version = "0.8.1"
+version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "fcfa89bea9500db4a0d038513d7a060566bfc51d46d1c014847049a45cce85e8"
+checksum = "93334716a037193fac19df402f8571269c84a00852f6a7066b5d2616dcd64d3e"
 dependencies = [
  "sqlx-core",
  "sqlx-macros",
@@ -1930,9 +1915,9 @@
 
 [[package]]
 name = "sqlx-core"
-version = "0.8.1"
+version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "d06e2f2bd861719b1f3f0c7dbe1d80c30bf59e76cf019f07d9014ed7eefb8e08"
+checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e"
 dependencies = [
  "atoi",
  "byteorder",
@@ -1971,9 +1956,9 @@
 
 [[package]]
 name = "sqlx-macros"
-version = "0.8.1"
+version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "2f998a9defdbd48ed005a89362bd40dd2117502f15294f61c8d47034107dbbdc"
+checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1984,9 +1969,9 @@
 
 [[package]]
 name = "sqlx-macros-core"
-version = "0.8.1"
+version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "3d100558134176a2629d46cec0c8891ba0be8910f7896abfdb75ef4ab6f4e7ce"
+checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5"
 dependencies = [
  "dotenvy",
  "either",
@@ -2010,13 +1995,13 @@
 
 [[package]]
 name = "sqlx-mysql"
-version = "0.8.1"
+version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "936cac0ab331b14cb3921c62156d913e4c15b74fb6ec0f3146bd4ef6e4fb3c12"
+checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a"
 dependencies = [
  "atoi",
  "base64",
- "bitflags 2.6.0",
+ "bitflags",
  "byteorder",
  "bytes",
  "chrono",
@@ -2053,13 +2038,13 @@
 
 [[package]]
 name = "sqlx-postgres"
-version = "0.8.1"
+version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "9734dbce698c67ecf67c442f768a5e90a49b2a4d61a9f1d59f73874bd4cf0710"
+checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8"
 dependencies = [
  "atoi",
  "base64",
- "bitflags 2.6.0",
+ "bitflags",
  "byteorder",
  "chrono",
  "crc",
@@ -2092,9 +2077,9 @@
 
 [[package]]
 name = "sqlx-sqlite"
-version = "0.8.1"
+version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "a75b419c3c1b1697833dd927bdc4c6545a620bc1bbafabd44e1efbe9afcd337e"
+checksum = "d5b2cf34a45953bfd3daaf3db0f7a7878ab9b7a6b91b422d24a7a9e4c857b680"
 dependencies = [
  "atoi",
  "chrono",
@@ -2318,9 +2303,9 @@
 
 [[package]]
 name = "tokio-stream"
-version = "0.1.15"
+version = "0.1.16"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af"
+checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1"
 dependencies = [
  "futures-core",
  "pin-project-lite",
@@ -2409,7 +2394,7 @@
 
 [[package]]
 name = "tui-journal"
-version = "0.10.0"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "arboard",
@@ -2613,9 +2598,9 @@
 
 [[package]]
 name = "wayland-backend"
-version = "0.3.6"
+version = "0.3.7"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "f90e11ce2ca99c97b940ee83edbae9da2d56a08f9ea8158550fd77fa31722993"
+checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6"
 dependencies = [
  "cc",
  "downcast-rs",
@@ -2627,11 +2612,11 @@
 
 [[package]]
 name = "wayland-client"
-version = "0.31.5"
+version = "0.31.6"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "7e321577a0a165911bdcfb39cf029302479d7527b517ee58ab0f6ad09edf0943"
+checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "rustix",
  "wayland-backend",
  "wayland-scanner",
@@ -2643,7 +2628,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "wayland-backend",
  "wayland-client",
  "wayland-scanner",
@@ -2655,7 +2640,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6"
 dependencies = [
- "bitflags 2.6.0",
+ "bitflags",
  "wayland-backend",
  "wayland-client",
  "wayland-protocols",
@@ -2664,9 +2649,9 @@
 
 [[package]]
 name = "wayland-scanner"
-version = "0.31.4"
+version = "0.31.5"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "d7b56f89937f1cf2ee1f1259cf2936a17a1f45d8f0aa1019fae6d470d304cfa6"
+checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3"
 dependencies = [
  "proc-macro2",
  "quick-xml",
@@ -2675,9 +2660,9 @@
 
 [[package]]
 name = "wayland-sys"
-version = "0.31.4"
+version = "0.31.5"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "43676fe2daf68754ecf1d72026e4e6c15483198b5d24e888b74d3f22f887a148"
+checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09"
 dependencies = [
  "dlib",
  "log",
@@ -2686,11 +2671,11 @@
 
 [[package]]
 name = "whoami"
-version = "1.5.1"
+version = "1.5.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9"
+checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d"
 dependencies = [
- "redox_syscall 0.4.1",
+ "redox_syscall",
  "wasite",
 ]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tui-journal-0.10.0/Cargo.toml 
new/tui-journal-0.11.0/Cargo.toml
--- old/tui-journal-0.10.0/Cargo.toml   2024-09-01 11:09:58.000000000 +0200
+++ new/tui-journal-0.11.0/Cargo.toml   2024-09-08 13:51:39.000000000 +0200
@@ -1,6 +1,6 @@
 [package]
 name = "tui-journal"
-version = "0.10.0"
+version = "0.11.0"
 edition = "2021"
 authors = ["Ammar Abou Zor"]
 license = "MIT"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tui-journal-0.10.0/README.md 
new/tui-journal-0.11.0/README.md
--- old/tui-journal-0.10.0/README.md    2024-09-01 11:09:58.000000000 +0200
+++ new/tui-journal-0.11.0/README.md    2024-09-08 13:51:39.000000000 +0200
@@ -61,7 +61,7 @@
 - Intuitive, responsive and user-friendly text-based user interface (TUI).
 - Create, edit, and delete entries easily.
 - Edit journal content with the built-in editor or use your favourite terminal 
text editor from within the app.
-- Add custom tags to the journals and use them in the built-in filter.
+- Add custom colored tags to the journals and use them in the built-in filter.
 - Fuzzy Finder: Locate your desired journal with lightning-fast speed.
 - Search functions for journals title and content in the built-in filter.
 - Sort the journals based on their date, priority and title.
@@ -219,6 +219,8 @@
 
 history_limit = 10  # Sets the maximum changes limit for the undo & redo 
stacks. Use 0 to disable it.
 
+colored_tags = true   # Sets if automatically coloring for tags is enabled.
+
 [export]
 default_path = "<Absolute_path_to_export_directory>"   # Optional default path 
to export multiple journals or a single journal's content. Falls back to the 
current directory if not specified.
 show_confirmation = true   # Show confirmation after successful export.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tui-journal-0.10.0/src/app/colored_tags.rs 
new/tui-journal-0.11.0/src/app/colored_tags.rs
--- old/tui-journal-0.10.0/src/app/colored_tags.rs      1970-01-01 
01:00:00.000000000 +0100
+++ new/tui-journal-0.11.0/src/app/colored_tags.rs      2024-09-08 
13:51:39.000000000 +0200
@@ -0,0 +1,142 @@
+use std::collections::HashMap;
+
+use ratatui::style::Color;
+
+/// Hard coded colors for the tags.
+/// Note: the order to pick the colors is from bottom to top because we are 
popping the colors from
+/// the end of the stack.
+const TAG_COLORS: &[TagColors] = &[
+    TagColors::new(Color::Black, Color::LightMagenta),
+    TagColors::new(Color::Red, Color::Cyan),
+    TagColors::new(Color::Yellow, Color::Blue),
+    TagColors::new(Color::Reset, Color::Red),
+    TagColors::new(Color::Black, Color::LightYellow),
+    TagColors::new(Color::Reset, Color::DarkGray),
+    TagColors::new(Color::Black, Color::LightGreen),
+    TagColors::new(Color::Black, Color::LightRed),
+    TagColors::new(Color::Black, Color::LightCyan),
+];
+
+#[derive(Debug, Clone)]
+/// Manages assigning colors to the tags, keeping track on the assigned colors 
and providing
+/// functions to updating them.
+pub struct ColoredTagsManager {
+    tag_colors_map: HashMap<String, TagColors>,
+    available_colors: Vec<TagColors>,
+}
+
+impl ColoredTagsManager {
+    pub fn new() -> Self {
+        let available_colors = TAG_COLORS.to_vec();
+
+        Self {
+            tag_colors_map: HashMap::new(),
+            available_colors,
+        }
+    }
+
+    /// Updates the tag_color map with the provided tags, removing the not 
existing tags and
+    /// assigning colors to the newly added ones.
+    pub fn update_tags(&mut self, current_tags: Vec<String>) {
+        // First: Clear the non-existing anymore tags.
+        let tags_to_remove: Vec<_> = self
+            .tag_colors_map
+            .keys()
+            .filter(|t| !current_tags.contains(t))
+            .cloned()
+            .collect();
+
+        for tag in tags_to_remove {
+            let color = self.tag_colors_map.remove(&tag).unwrap();
+            self.available_colors.push(color)
+        }
+
+        // Second: Add the new tags to the map
+        for tag in current_tags {
+            match self.tag_colors_map.entry(tag) {
+                std::collections::hash_map::Entry::Occupied(_) => {}
+                std::collections::hash_map::Entry::Vacant(vacant_entry) => {
+                    let color = 
self.available_colors.pop().unwrap_or_default();
+                    vacant_entry.insert(color);
+                }
+            }
+        }
+    }
+
+    /// Gets the matching color for the giving tag if tag exists.
+    pub fn get_tag_color(&self, tag: &str) -> Option<TagColors> {
+        self.tag_colors_map.get(tag).copied()
+    }
+}
+
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
+/// Represents the needed colors for a colored tag
+pub struct TagColors {
+    pub foreground: Color,
+    pub background: Color,
+}
+
+impl TagColors {
+    pub const fn new(foreground: Color, background: Color) -> Self {
+        Self {
+            foreground,
+            background,
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+
+    use super::*;
+
+    #[test]
+    fn test_colored_tags() {
+        const TAG_ONE: &str = "Tag 1";
+        const TAG_TWO: &str = "Tag 2";
+        const ADDED_TAG: &str = "Added Tag";
+
+        let mut tags = vec![
+            String::from(TAG_ONE),
+            String::from(TAG_TWO),
+            String::from("Tag 3"),
+            String::from("Tag 4"),
+        ];
+
+        let mut manager = ColoredTagsManager::new();
+        manager.update_tags(tags.clone());
+
+        // Ensure all tags have colors.
+        for tag in tags.iter() {
+            assert!(manager.get_tag_color(tag).is_some());
+        }
+
+        // Ensure non existing tags are none
+        assert!(manager.get_tag_color("Non Existing Tag").is_none());
+
+        // Keep track on colors before updating.
+        let tag_one_color = manager.get_tag_color(TAG_ONE).unwrap();
+        let tag_two_color = manager.get_tag_color(TAG_TWO).unwrap();
+
+        // Remove Tag one with changing the order of the tags.
+        assert_eq!(tags.swap_remove(0), TAG_ONE);
+
+        tags.push(ADDED_TAG.into());
+
+        manager.update_tags(tags.clone());
+
+        // Ensure all current tags have colors.
+        for tag in tags.iter() {
+            assert!(manager.get_tag_color(tag).is_some());
+        }
+
+        // Tag one should have no color after remove.
+        assert!(manager.get_tag_color(TAG_ONE).is_none());
+
+        // Tag two color must remain the same after update.
+        assert_eq!(manager.get_tag_color(TAG_TWO).unwrap(), tag_two_color);
+
+        // Added tag should take the color of tag one because we removed it 
then added the new tag.
+        assert_eq!(manager.get_tag_color(ADDED_TAG).unwrap(), tag_one_color);
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tui-journal-0.10.0/src/app/mod.rs 
new/tui-journal-0.11.0/src/app/mod.rs
--- old/tui-journal-0.10.0/src/app/mod.rs       2024-09-01 11:09:58.000000000 
+0200
+++ new/tui-journal-0.11.0/src/app/mod.rs       2024-09-08 13:51:39.000000000 
+0200
@@ -7,6 +7,7 @@
 use anyhow::{anyhow, bail, Context};
 use backend::{DataProvider, EntriesDTO, Entry, EntryDraft};
 use chrono::{DateTime, Utc};
+use colored_tags::ColoredTagsManager;
 use history::{Change, HistoryManager, HistoryStack};
 use rayon::prelude::*;
 use std::{
@@ -15,6 +16,7 @@
     path::PathBuf,
 };
 
+mod colored_tags;
 mod external_editor;
 mod filter;
 mod history;
@@ -30,6 +32,8 @@
 pub use runner::HandleInputReturnType;
 pub use ui::UIComponents;
 
+pub use colored_tags::TagColors;
+
 pub struct App<D>
 where
     D: DataProvider,
@@ -47,6 +51,7 @@
     state: AppState,
     /// Keeps history of the changes on entries, enabling undo & redo 
operations
     history: HistoryManager,
+    colored_tags: Option<ColoredTagsManager>,
 }
 
 impl<D> App<D>
@@ -58,6 +63,8 @@
         let selected_entries = HashSet::new();
         let filtered_out_entries = HashSet::new();
         let history = HistoryManager::new(settings.history_limit);
+        let colored_tags = settings.colored_tags.then(ColoredTagsManager::new);
+
         Self {
             data_provide,
             entries,
@@ -69,6 +76,7 @@
             filter: None,
             state: Default::default(),
             history,
+            colored_tags,
         }
     }
 
@@ -122,6 +130,8 @@
 
         self.update_filtered_out_entries();
 
+        self.update_colored_tags();
+
         Ok(())
     }
 
@@ -163,6 +173,7 @@
 
         self.sort_entries();
         self.update_filtered_out_entries();
+        self.update_colored_tags();
 
         Ok(entry_id)
     }
@@ -221,6 +232,7 @@
 
         self.update_filter();
         self.update_filtered_out_entries();
+        self.update_colored_tags();
 
         Ok(())
     }
@@ -286,6 +298,7 @@
 
         self.update_filter();
         self.update_filtered_out_entries();
+        self.update_colored_tags();
 
         Ok(())
     }
@@ -385,6 +398,26 @@
         }
     }
 
+    /// Updates the colors tags mapping, assigning colors to new one and 
removing the non existing
+    /// tags from the colors map.
+    fn update_colored_tags(&mut self) {
+        if self.colored_tags.is_none() {
+            return;
+        }
+
+        let tags = { self.get_all_tags() };
+        if let Some(colored_tags) = self.colored_tags.as_mut() {
+            colored_tags.update_tags(tags);
+        }
+    }
+
+    /// Gets the matching color for the giving tag if colored tags are enabled 
and tag exists.
+    pub fn get_color_for_tag(&self, tag: &str) -> Option<TagColors> {
+        self.colored_tags
+            .as_ref()
+            .and_then(|c| c.get_tag_color(tag))
+    }
+
     /// Assigns priority to all entries that don't have a priority assigned to
     async fn assign_priority_to_entries(&self, priority: u32) -> 
anyhow::Result<()> {
         self.data_provide
@@ -429,7 +462,7 @@
     /// Apply undo on entries returning the id of the effected entry.
     pub async fn undo(&mut self) -> anyhow::Result<Option<u32>> {
         match self.history.pop_undo() {
-            Some(change) => self.apply_change(change, 
HistoryStack::Redo).await,
+            Some(change) => self.apply_history_change(change, 
HistoryStack::Redo).await,
             None => Ok(None),
         }
     }
@@ -437,12 +470,12 @@
     /// Apply redo on entries returning the id of the effected entry.
     pub async fn redo(&mut self) -> anyhow::Result<Option<u32>> {
         match self.history.pop_redo() {
-            Some(change) => self.apply_change(change, 
HistoryStack::Undo).await,
+            Some(change) => self.apply_history_change(change, 
HistoryStack::Undo).await,
             None => Ok(None),
         }
     }
 
-    async fn apply_change(
+    async fn apply_history_change(
         &mut self,
         change: Change,
         history_target: HistoryStack,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tui-journal-0.10.0/src/app/ui/entries_list/mod.rs 
new/tui-journal-0.11.0/src/app/ui/entries_list/mod.rs
--- old/tui-journal-0.10.0/src/app/ui/entries_list/mod.rs       2024-09-01 
11:09:58.000000000 +0200
+++ new/tui-journal-0.11.0/src/app/ui/entries_list/mod.rs       2024-09-08 
13:51:39.000000000 +0200
@@ -131,26 +131,42 @@
 
                 // *** Tags ***
                 if !entry.tags.is_empty() {
-                    let tags: Vec<String> = 
entry.tags.iter().map(String::from).collect();
-                    let tag_line = tags.join(" | ");
+                    const TAGS_SEPARATOR: &str = " | ";
+                    let tags_default_style: Style = Style::default()
+                        .fg(Color::LightCyan)
+                        .add_modifier(Modifier::DIM);
 
-                    // Text wrapping
-                    let tag_line =
-                        textwrap::wrap(&tag_line, area.width as usize - 
LIST_INNER_MARGIN);
-
-                    lines_count += tag_line.len();
-
-                    tag_line
-                        .into_iter()
-                        .map(|line| {
-                            Line::from(Span::styled(
-                                line.to_string(),
-                                Style::default()
-                                    .fg(Color::LightCyan)
-                                    .add_modifier(Modifier::DIM),
-                            ))
-                        })
-                        .for_each(|span| spans.push(span));
+                    let mut added_lines = 1;
+                    spans.push(Line::default());
+
+                    for tag in entry.tags.iter() {
+                        let mut last_line = spans.last_mut().unwrap();
+                        let allowd_width = area.width as usize - 
LIST_INNER_MARGIN;
+                        if !last_line.spans.is_empty() {
+                            if last_line.width() + TAGS_SEPARATOR.len() > 
allowd_width {
+                                added_lines += 1;
+                                spans.push(Line::default());
+                                last_line = spans.last_mut().unwrap();
+                            }
+                            last_line.push_span(Span::styled(TAGS_SEPARATOR, 
tags_default_style))
+                        }
+
+                        let style = app
+                            .get_color_for_tag(tag)
+                            .map(|c| 
Style::default().bg(c.background).fg(c.foreground))
+                            .unwrap_or(tags_default_style);
+                        let span_to_add = Span::styled(tag.to_owned(), style);
+
+                        if last_line.width() + tag.len() < allowd_width {
+                            last_line.push_span(span_to_add);
+                        } else {
+                            added_lines += 1;
+                            let line = Line::from(span_to_add);
+                            spans.push(line);
+                        }
+                    }
+
+                    lines_count += added_lines;
                 }
 
                 ListItem::new(spans)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tui-journal-0.10.0/src/main.rs 
new/tui-journal-0.11.0/src/main.rs
--- old/tui-journal-0.10.0/src/main.rs  2024-09-01 11:09:58.000000000 +0200
+++ new/tui-journal-0.11.0/src/main.rs  2024-09-08 13:51:39.000000000 +0200
@@ -3,7 +3,6 @@
 use anyhow::Result;
 use clap::Parser;
 use crossterm::{
-    event::{DisableMouseCapture, EnableMouseCapture},
     execute,
     terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, 
LeaveAlternateScreen},
 };
@@ -31,7 +30,7 @@
 
     enable_raw_mode()?;
     let mut stdout = io::stdout();
-    execute!(stdout, EnterAlternateScreen, EnableMouseCapture)?;
+    execute!(stdout, EnterAlternateScreen)?;
     let backend = CrosstermBackend::new(stdout);
     let mut terminal = Terminal::new(backend)?;
 
@@ -46,11 +45,7 @@
 
     // restore terminal
     disable_raw_mode()?;
-    execute!(
-        terminal.backend_mut(),
-        LeaveAlternateScreen,
-        DisableMouseCapture
-    )?;
+    execute!(terminal.backend_mut(), LeaveAlternateScreen,)?;
     terminal.show_cursor()?;
 
     Ok(())
@@ -62,7 +57,7 @@
 
     std::panic::set_hook(Box::new(move |panic| {
         disable_raw_mode().unwrap();
-        execute!(io::stdout(), LeaveAlternateScreen, 
DisableMouseCapture).unwrap();
+        execute!(io::stdout(), LeaveAlternateScreen).unwrap();
         original_hook(panic);
     }));
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tui-journal-0.10.0/src/settings/mod.rs 
new/tui-journal-0.11.0/src/settings/mod.rs
--- old/tui-journal-0.10.0/src/settings/mod.rs  2024-09-01 11:09:58.000000000 
+0200
+++ new/tui-journal-0.11.0/src/settings/mod.rs  2024-09-08 13:51:39.000000000 
+0200
@@ -47,6 +47,8 @@
     #[serde(default = "default_history_limit")]
     /// Set the maximum size of the history stacks (undo & redo) size.
     pub history_limit: usize,
+    #[serde(default = "default_colored_tags")]
+    pub colored_tags: bool,
 }
 
 impl Default for Settings {
@@ -63,6 +65,7 @@
             scroll_per_page: Default::default(),
             sync_os_clipboard: Default::default(),
             history_limit: default_history_limit(),
+            colored_tags: default_colored_tags(),
         }
     }
 }
@@ -79,6 +82,10 @@
     10
 }
 
+const fn default_colored_tags() -> bool {
+    true
+}
+
 impl Settings {
     pub async fn new() -> anyhow::Result<Self> {
         let settings_path = get_settings_path()?;
@@ -131,6 +138,7 @@
             scroll_per_page: _,
             sync_os_clipboard: _,
             history_limit: _,
+            colored_tags: _,
         } = self;
 
         if self.backend_type.is_none() {

Reply via email to