Skip to content

Instantly share code, notes, and snippets.

@mi5ty
Last active December 31, 2023 01:02
Show Gist options
  • Save mi5ty/f4c23b801bbd322e0f0b183981977e77 to your computer and use it in GitHub Desktop.
Save mi5ty/f4c23b801bbd322e0f0b183981977e77 to your computer and use it in GitHub Desktop.
Tana Cheat Sheet

%%tana%%

  • Cheat Sheet
    • ✨ Tana Expressions
      • Title #tana-expression
        • Description:: A title expression composes values from the node into a title.
        • Attributes:: Search for Tana "Title" Attributes
      • Search #tana-expression
        • Description:: The search expression consists of a flat list of match-clauses that must be true for a node to match the search.
        • Attributes:: Search for Search Attributes + Search for Search Field Values
    • 🧩 Tana Attributes
      • ${name} #tana-attribute
        • Description:: The existing name of the node
        • Expression:: Title #tana-expression
      • ${cdate} #tana-attribute
        • Description:: Created date
        • Expression:: Title #tana-expression
      • ${ctime} #tana-attribute
        • Description:: Created time
        • Expression:: Title #tana-expression
      • ${mdate} #tana-attribute
        • Description:: Modified date
        • Expression:: Title #tana-expression
      • ${mtime} #tana-attribute
        • Description:: Modified time
        • Expression:: Title #tana-expression
      • ${sys:description} #tana-attribute
        • Description:: Description field
        • Expression:: Title #tana-expression
      • ${sys:createdAt} #tana-attribute
        • Description:: Time of creation
        • Expression:: Title #tana-expression
      • ${sys:lastModifiedAt} #tana-attribute
        • Description:: Time of last edit
        • Expression:: Title #tana-expression
      • ${sys:lastModifiedBy} #tana-attribute
        • Description:: User who last edited the node
        • Expression:: Title #tana-expression
      • ${sys:modifiedBy} #tana-attribute
        • Description:: All users who ever created/modified the node
        • Expression:: Title #tana-expression
      • ${sys:owner} #tana-attribute
        • Description:: Parent node
        • Expression:: Title #tana-expression
      • ${sys:dateFromDayNode} #tana-attribute
        • Description:: The day node this node belongs to (Calendar date system field)
        • Expression:: Title #tana-expression
      • ${sys:doneTime} #tana-attribute
        • Description:: Date and time this node was marked done
        • Expression:: Title #tana-expression
      • PARENTS_DESCENDANTS #tana-attribute
        • Description:: Matches will be limited to nodes that are siblings of the node with the search expression defined. 1 level up.
        • Expression:: Search #tana-expression
      • GRANDPARENTS_DESCENDANTS #tana-attribute
        • Description:: Matches will be limited to the tree below the node above the parent node of the node with the search expression defined. 2 levels up
        • Expression:: Search #tana-expression
      • PARENTS_DESCENDANTS_WITH_REFS #tana-attribute
        • Description:: Same as PARENTS_DESCENDANTS, but also including any references and their children.
          • This makes it possible to define searches on nodes in Supertags, and have the supertag instances get local search behavior.
          • E.g. a Project supertag could have Bugs node with a search defined that would only find Bug-instances withing the scope of the project from which it was run.
        • Expression:: Search #tana-expression
      • SIBLING NAMED (NAME) #tana-attribute
        • Description:: If the search node has a sibling (another node with the same parent) with the name provided, it will limit the search to descendants of that node.
        • Expression:: Search #tana-expression
      • GRANDPARENTS_DESCENDANTS_WITH_REFS #tana-attribute
        • Description:: Same as GRANDPARENTS_DESCENDANTS, but also including any references and their children
        • Expression:: Search #tana-expression
      • HAS_ATTRIBUTE #tana-attribute
        • Description:: Any node that as any field defined will match
        • Expression:: Search #tana-expression
      • IS_TAG #tana-attribute
        • Description:: Any node that is a supertag definition
        • Expression:: Search #tana-expression
      • HAS_TAG #tana-attribute
        • Description:: Any node that is tagged with a supertag (but is not a supertag def itself)
        • Expression:: Search #tana-expression
      • CREATED LAST DAYS #tana-attribute
        • Description:: Any node that has been created the last N days
        • Expression:: Search #tana-expression
      • TODO #tana-attribute
        • Description:: Nodes that have a checkbox, regardless if is is checked or not
        • Expression:: Search #tana-expression
      • DONE #tana-attribute
        • Description:: Only nodes that have been marked as done
        • Expression:: Search #tana-expression
      • DONE LAST DAYS #tana-attribute
        • Description:: Any node that has been marked as done (using keyboard action) the last N days
        • Expression:: Search #tana-expression
      • NOT DONE #tana-attribute
        • Description:: Only nodes that have not been marked as done
        • Expression:: Search #tana-expression
      • OVERDUE #tana-attribute
        • Description:: Only nodes with the system field Due date, which are overdue
        • Expression:: Search #tana-expression
      • MODIFIED BY (USER EMAIL) LAST (NUMBER) DAYS #tana-attribute
        • Description:: Any nodes modified by the user with the user email, within the last N days.
        • Expression:: Search #tana-expression
      • MODIFIED BY (USER EMAIL) ANYTIME #tana-attribute
        • Description:: Any nodes modified by the user with the user email at any timer
        • Expression:: Search #tana-expression
      • DONE LAST (NUMBER) DAYS #tana-attribute
        • Description:: Marked as done in the last n days
        • Expression:: Search #tana-expression
      • EDITED LAST (NUMBER) DAYS #tana-attribute
        • Description:: Edited in the last n days
        • Expression:: Search #tana-expression
      • FOR DATE YYYY-MM-DD #tana-attribute
        • Description:: Node has an inline ref to the date specified
        • Expression:: Search #tana-expression
      • FOR RELATIVE DATE (Today|Tomorrow) #tana-attribute
        • Description:: Find nodes with an inline ref to the Today/Tomorrow
        • Expression:: Search #tana-expression
      • OR #tana-field-value
        • Description:: Any of the clauses in the field values should match
        • Expression:: Search #tana-expression
      • NOT #tana-field-value
        • Description:: negates a single clause (if you want to negate multiple, you need multiple NOT statements)
        • Expression:: Search #tana-expression
      • AND #tana-field-value
        • Description:: combines multiple clauses (is implied at the top level)
        • Expression:: Search #tana-expression
      • LT #tana-field-value
        • Description:: the field value should be a field, with a value - finds nodes that have a value less than the value provided. Also works with dates.
        • Expression:: Search #tana-expression
      • GT #tana-field-value
        • Description:: the field value should be a field, with a value - finds nodes that have a value greater than than the value provided. Also works with dates.
        • Expression:: Search #tana-expression
      • LINKS_TO #tana-field-value
        • Description:: Matches all nodes that have inline refs or are linked nodes of the node in the value field.
          • This makes it possible to define searches on nodes in Supertags, and have the supertag instances get local search behavior.
          • Yous can also use parent and grandparent to find all nodes that link to the parent / grandparent node.
        • Expression:: Search #tana-expression
      • CHILD_OF #tana-field-value
        • Description:: Matches nodes that are children of any of the given nodes
        • Expression:: Search #tana-expression
      • OWNED_BY #tana-field-value
        • Description:: Matches nodes that are owned by any of the given nodes
        • Expression:: Search #tana-expression
@dianedef
Copy link

Did Tana Paste change in the time ? I'm trying to paste this Cheat Sheet it doesnt work for me...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment