Capitalize Joplin Tags

27 March 2024 · 1 min read · Joplin, SQL, Tags

Contents

While the official approach in Joplin is to lowercase all tags to avoid collisions I like to have my tags capitalized. To automatically update all tags in the Joplin database follow these steps:

  1. Close Joplin completely
  2. Using your favorite SQLite client run the following query (update the list ('iOS', 'eBPF') to whatever tags you don’t want to be modified):
1
2
3
4
5
6
UPDATE tags
   SET title = upper(substr(title, 1, 1)) || substr(title, 2),
       updated_time = updated_time + 1,
       user_updated_time = user_updated_time + 1
 WHERE title REGEXP '^[a-z].*$' AND
       title NOT IN ('iOS', 'eBPF');
  1. Restart Joplin