Script Summary: A script to restructure the tag cloud in Remember the Milk. Based off of masnare's Tag Cloud Colorizer script, jgallen23's RememberTheMilkEnhanced script, and ideas in the Tag Cloud post in the RTM forums.
Based on masnare's Tag Cloud Colorizer script (http://userscripts.org/scripts/show/25046) and jgallen23's RememberTheMilkEnhanced (http://userscripts.org/scripts/show/26057), as well as ideas from the Tag Cloud post in the Remember the Milk forums (http://www.rememberthemilk.com/forums/tips/2943/).
This script provides a fairly general framework for restructuring the items in the tag cloud in Remember the Milk. Specifically, one can:
- Group related lists, locations, and tags by prefix
- Generate a hierarchy of tags dynamically, to arbitrary depth
- Give a single tag its own section
- Rename individual tags anywhere in the tag cloud (ex: 'P' to 'Personal')
- Recolor tag sections
- Reorder sections arbitrarily
- Hide ordinary list tabs
Here's an example of what the script can produce (the full list of tags, lists, and locations generating it is below):
(To turn on the cloud, go to Settings, then General, and check the Task Cloud box.)
The script also includes some stylistic tweaks, such as removing the cow graphic from the RTM page and fixing the sidebar at the top of the page (which becomes crucial if the tag cloud is long enough to scroll past the bottom of the page). These can easily be commented out if they are not desired.
The hierarchy-style section in particular makes it easy to have projects with subprojects, as these can be stored in their own individual lists. This also reduces the tagging and list redundancy, as long as the user is willing to partition their tasks between project lists.
It is likely that other users will need to adjust the default configuration to their own needs. Changes should be made to the Configuration section of the script, at the top of the Tag Cloud Restructurer section. In that part of the script, users can change the global preferences for the script and define their tag sections with their per-section preferences. Full details of the section types are given below, in 'Section Types and Preferences'.
If users are familiar with masnare's script, this script differs from it in several ways:
- masnare's sections are now the sectionFlat objects.
- No additional "system" tags (such as @__context) are needed, as the header tags are created by the script itself.
- There is now a dictionary-based system for global and per-section preferences.
Tags, Lists, and Locations for Example Tag Cloud
Here are the active lists, locations, and tags that generate the example tag cloud above:
- -P/Computer/RTM Tag Cloud
Tags (each of which is associated to at least one active task, so that it is displayed in the cloud):
Locations (as with tags, associated to at least one active task):
Section Types and Preferences
sectionSingle section matches a single tag in the cloud and renames it. The original tag can also be displayed in the header if desired.
sectionSingle section groups all tags starting with the specified prefix together in a single section, prefaced by the specified header text. The tags can be displayed run-in, as in the Contexts section, or as a block, as in the Miscellaneous section. Other options control how to resize tags, whether to keep the prefix in the tags or to display it in the header, and whether to convert underscores to spaces and to capitalize the words in the tags.
sectionSingle section groups all tags starting with the specified prefix together in a tree-like hierarchy, as in a file system. In the example above, the
- prefix acts like the root of the file system (e.g., C:\ on Windows or / on Linux or Mac OS X), and the words between the separators act like the folder names. The character
/ is a good choice for a separator in list names, but is not allowed in tags, for which
- are better options.
globalprefs dictionary to set global preferences for the scripts, including whether to show borders around sections, which tags to hide or rename, and whether to match case when identifying tags to hide or rename.
In addition to the
renameTags dictionary, you can rename a list 'on the fly' by appending the desired name to the list name in double square brackets. For example, changing 'Lent/Borrowed' to 'Lent/Borrowed [[Library]]' causes the item to 'library' (lowercased because of RTM's tag processing). To circumvent the lowercasing, use an HTML entity (e.g., '[[Library]]' gives 'Library').
Changes in Version 1.1
- Fixed: Hierarchy section with
depth: 2now displays correctly
displayOrderpreference now orders sections correctly
sectionFlatheader search now searches for lists with spaces correctly
- Changed: Renamed
sectionRenamesection type to
- Changed: Moved section definitions to right after global preferences
- Changed: Renamed
- New: Global dictionary (
renameTags) of tags to rename
- New: Global preference (
matchTagCase) for case sensitivity when matching tags to rename or hide
minChildSize) to set lower limit for tag size
runinText) to display flat section as HEADER: tag tag ...
- New: Default color preferences for all sections
- New: Hovering over flat section header displays section prefix