Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
Calls to make, or tasks that require a phone.
Items that require a computer, or computer related tasks.
Items that can be done at home.
Items that require internet access.
Items that can be done at work.
|>|>| !Selectors |
| ''Selector'' | ''Sample'' | ''Description'' |
| tag | H1 { color: blue ; } |Selects all of the specified HTML tags |
| class | .myClass { color: blue; } |Selects all HTML tags with the attribute class="myClass" specified |
| ID | #tag56 { color: blue; } |Selects the single HTML tag with the attibute ID="tag56" specified |
| Grouping | H1, H2, H3 { color: blue ; } | selects all specified selectors (tags, class, or ID can be specified) |
| Contextual | H1 B { color: red; } |selects all 'B' tags in H1. Context selectors can be tag, class, or ID selectors |
|>|>|>| !Units |
| ''Type'' | ''Unit'' | ''Description'' |
| Length | mm, cm, in |millimeters, centimeters, inches |
|~| pt, pc |point size, pica |
|~| em, ex |relative to the point size of the font, relative to x-height of the font |
|~| px |pixel (device dependent) |
| Percentage | % |calculated as a percentage of their default size used in context |
| Keywords | .. | ... |
| Color | <name> |Color names ex: green see: ColorNames |
|~| rgb() |specify number or percengate rgb(100%, 0, 100%) |
|~| <hex value> |specify hex RGB number of color ex: #00FF00 see: ColorChart |
|>|>|>| !Font Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| font-family |[font name or type] | font-family: Verdana, Arial; | Y |
| font-style |normal, italic | font-style:italic; | Y |
| font-variant |normal, small-cap | font-variant:small-caps; | Y |
| font-weight |normal, bold | font-weight:bold; | Y |
| font-size |[ xx-large, x-large, large, medium, small, x-small, xx-small ], [ larger, smaller ], \\percentage'\\, //length// | font-size:12pt; | Y |
| font |[//font-style// / //font-variant// / //font-weight//] ? //font-size// [//line-height//] ? //font-family// | font: bold 12pt Arial; | Y |
|>|>|>| !Color and Background Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| color |//color // | color: red | Y |
| background-color |//color//, transparent | background-color: yellow | N* |
| background-image |//url//, none | background-image: url(house.jpg)| N* |
| background-repeat |repeat, repeat-x, repeat-y, no-repeat | background-repeat: no-repeat | N* |
| background-attachment |scroll, fixed | background-attachment: fixed | N* |
| background-position |[ //position// , //length// ], {1,2}, [ top, center, bottom ] -or- [ left, center, right ] | background-position: top center | N* |
| background |transparent, //color// -or- //url// -or- repeat -or- scroll -or- //position// | background: silver url(house.jpg) repeat-y | N* |
|>|>|>| !*Starting in CSS2, these properties are inherited. |
|>|>|>| !Text Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| letter-spacing |normal, //length// | letter-spacing:5pt | Y |
| text-decoration |none, underline, overline, line-through | text-decoration:underline | N |
| vertical-align |sub, super, | vertical-align:sub | N |
| text-transform |capitalize, uppercase, lowercase, none | text-transform:lowercase | N |
| text-align |left, right, center, justify | text-align:center | N |
| text-indent |//length//, //percentage// | text-indent:25px | N |
| line-height |normal, //number//, //length//, //percentage// | line-height:15pt | N |
''The //CSS Box//''
<html>
<div style="color:black;background-color:#FFFFCC;padding:1em;border:thin solid black;text-align:center;width=30%">margin
<div style="color:white;background-color:black;padding:1em;border:thin solid black;text-align:center;width=100%">border
<div style="color:black;background-color:#FFCC99;padding:1em;border:thin solid black;text-align:center;width=100%">padding
<div style="color:black;background-color:white;border:thin solid black;text-align:center;width=100%">content<br/>
<div style="float:left"><-</div><div style="float:right">-></div>CSS 'width'
</div>
</div>
</div>
</div>
</html>
|>|>|>| !Box Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| margin-top |//length//, //percentage//, auto | margin-top:5px | N |
| margin-right |//length//, //percentage//, auto | margin-right:5px | N |
| margin-bottom |//length//, //percentage//, auto | margin-bottom:1em | N |
| margin-left |//length//, //percentage//, auto | margin-left:5pt | N |
| margin |//length//, //percentage//, auto {1,4}| margin: 10px 5px 10px 5px | N |
| padding-top |//length//, //percentage// | padding-top:10%| N |
| padding-right |//length//, //percentage// | padding-right:15px | N |
| padding-bottom |//length//, //percentage// | padding-bottom:1.2em | N |
| padding-left |//length//, //percentage// | padding-left:10pt; } | N |
| padding |//length//, //percentage// {1,4}| padding: 10px 10px 10px 15px | N |
| border-top-width |thin, medium, thick, //length// | border-top-width:thin | N |
| border-right-width |thin, medium, thick, //length// | border-right-width:medium | N |
| border-bottom-width |thin, medium, thick, //length// | border-bottom-width:thick | N |
| border-left-width |thin, medium, thick, //length// | border-left-width:15px | N |
| border-width |thin, medium, thick, //length// {1,4}| border-width: 3px 5px 3px 5px | N |
| border-top-color |//color // | border-top-color:navajowhite | N |
| border-right-color |//color// | border-right-color:whitesmoke | N |
| border-bottom-color |//color// | border-bottom-color:black | N |
| border-left-color |//color// | border-left-color:#C0C0C0 | N |
| border-color |//color// {1,4} | border-color: green red white blue; } | N |
| border-top-style |none, solid, double, groove, ridge, inset, outset | border-top-style:solid | N |
| border-right-style |none, solid, double, groove, ridge, inset, outset | border-right-style:double | N |
| border-bottom-style |none, solid, double, groove, ridge, inset, outset | border-bottom-style:groove | N |
| border-left-style |none, solid, double, groove, ridge, inset, outset | border-left-style:none | N |
| border-style |none, solid, double, groove, ridge, inset, outset | border-style:ridge; }| N |
| border-top |//border-width//, //border-style//, //border-color// | border-top: medium outset red | N |
| border-right |//border-width//, //border-style//, //border-color// | border-right: thick inset maroon | N |
| border-bottom |//border-width//, //border-style//, //border-color// | border-bottom: 10px ridge gray | N |
| border-left |//border-width//, //border-style//, //border-color// | border-left: 1px groove red | N |
| border |//border-width//, //border-style//, //border-color// | border: thin solid blue | N |
| float |none, left, right | float:none | N |
| clear |none, left, right, both | clear:left | N |
|>|>|>| !Classification Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| display |none, block, inline, list-item | display:none | N |
| list-style-type |disk, circle, square, decimal, lower-roman, upper-roman, lower-alpha, upper-alpha, none | list-style-type:upper-alpha | Y |
| list-style-image |//url//, none | list-style-image:url(icFile.gif) | Y |
| list-style-position |inside, outside | list-style-position:inside | Y |
| list-style |//keyword// -or- //position// -or- //url// | list-style: square outside url(icFolder.gif) | Y |
|>|>|>| !Positioning Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Applies Too'' | ''Inherited?'' |
| clip |//shape//, auto | clip:rect(0px 200px 200px 0px) | all element | N |
| height |//length//, auto | height:200px | DIV, SPAN and replaced element | N |
| left |//length//, //percentage//, auto | left:0px | absolutely and relatively positioned element | N |
| overflow |visible, hidden, scroll, auto | overflow:scroll | all element | N |
| position |absolute, relative, static | position:absolute | all element | N |
| top |//length//, //percentage//, auto | top:0px | absolutely and relatively positioned element | N |
| visibility |visible, hidden, inherit | visibility:visible | all element | N |
| width |//length//, //percentage//, auto | width:80%| DIV, SPAN and replaced element | N |
| z-index |auto, //integer// | z-index:-1| absolutely and relatively positioned element | N |
|>|>|>| !Printing Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| page-break-before |auto, always -or- left, right | page-break-before:alway | N |
| page-break-after |auto, always -or- left, right | page-break-before:auto | N |
|>|>|>| !Pseudo Classes |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| cursor |auto, crosshair, default, hand, move, e-resize, ne-resize, nw-resize, n-resize, se-resize, sw-resize, s-resize, w-resize, text, wait, help | { cursor:hand; } | Y |
| active, hover, link, visited | n/a | a:hover { color:red; } | Y |
| first-letter, first-line |any font manipulating declaration | p:first-letter{ float:left;color:blue } | N |
/***
|''Name:''|CalendarMakerPlugin |
|''Version:''|$Revision: 1 $ |
|''Source:''|http://thePettersons.org/tiddlywiki.html#CalendarMakerPlugin |
|''Author:''|[[Paul Petterson]] |
|''Type:''|Macro Extension |
|''Requires:''|TiddlyWiki 1.2.33 or higher and the newerTiddler macro |
!Description
Builds a simple calendar that can be used to access tiddlers with date formatted names.
!Syntax
* {{{<<calendarMaker>>}}} - generates a calendar for this month
* {{{<<calendarMaker 2005 10>>}}} - generates a calendar for a particular month/year
!Sample Output
<<calendarMaker>>
!Sample Small Calendar (my target)
| !< |>|>|>|>| !October 2005 | !> |
| !Mon | !Tue | !Wed | !Thu | !Fri | !Sat | !Sun |
|>|>|>|>|bgcolor(gray): | 01 | 02 |
| 03 | 04 | 05 | 06 | 07 | 08 | 09 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |>|>|>|>|>|bgcolor(gray): |
!Known issues
* Must have the new wikifier introduced in version 1.2.33, won't work at all in older version of TW...
!Notes
* cleanup the dowIndex stuff - you don't really need it...
* Current Limitations (Stuff I plan on implementing)
** You can't set the first day of the week for display
** You can't change the size of the calendar
** You can't //browse// the calendar
** You can't change the button features
!Revision history
$History: CalendarMakerPlugin.js $
*
* ***************** Version 1 *****************
* User: paulpet Date: 2/26/06 Time: 7:44p
* Created in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* dusted it off!
v0.1 - October 4th, 2005 - initial public release (beta)
!Code
***/
//{{{
config.macros.calendarMaker = {
days:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
shortDays:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
months:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
shortMonths:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec"],
makeButton: function( d ) {
var y = d.getFullYear() ;
var m = d.getMonth() ;
var date = d.getDate();
var dateString = y + "/" + (m+1) + "/" + date ;
return "<<newerTiddler button:\"" + date + "\" name:\"Inbox " + dateString + "\" tags:\"[[My Inbox]] [[" + dateString + "]]\" text:\"!Today: " + d + "\">>" ;
},
handler: function(place,macroName,params) {
var dateNow = new Date() ;
var year = params[0] ? params[0] : dateNow.getFullYear() ;
var month = params[1] ? params[1] - 1 : dateNow.getMonth() ;
// validation
// if ( year < 100 ) year += 1900 ;
var start = null ;
try {
start = new Date( year, month, 1 ) ;
} catch(e) {
displayMessage( "Invalid Date year:" + year + " month:" + month ) ;
displayMessage( "Date Error: " + e ) ;
}
if ( start == null ) throw "Invalid Date Error" ;
var calendarOutput = "| !< |>|>|>|>| !" + config.macros.calendarMaker.months[ month ] + ", " + year + " | !> |\n"
calendarOutput += "|" ;
for( var i=0; i<config.macros.calendarMaker.shortDays.length; i++ )
calendarOutput += " !" + config.macros.calendarMaker.shortDays[i] + " |" ;
calendarOutput += "\n"
// skip weekdays until the 1st of the month
var dowIndex = 0 ;
if ( start.getDay() > 0 ) {
calendarOutput += "|" ;
while( ++dowIndex <= start.getDay()-1 )
calendarOutput += ">|" ;
calendarOutput += "bgcolor(gray): | " ;
}
while( start.getMonth() == month ) {
// if we start a new week, open up the table...
if ( dowIndex == 0 )
calendarOutput += "|" ;
// append the date to the calendar, increment the date, increment the day of the week index
calendarOutput += " " + this.makeButton( start ) + " |" ;
start.setDate( start.getDate() + 1 ) ;
dowIndex++ ;
// if we finished the week, close it off...
if ( dowIndex > 6 ) {
calendarOutput += "\n" ;
dowIndex = 0 ;
}
}
// fill in the unused weekdays of the last week
if ( dowIndex != 0 ) {
while( dowIndex++ < 6 )
calendarOutput += ">|" ;
calendarOutput += "bgcolor(gray): |\n" ;
}
wikify( calendarOutput, place, null, null ) ;
}}
//}}}
/***
This plugin is released under the [[Creative Commons Attribution 2.5 License|http://creativecommons.org/licenses/by/2.5/]]
***/
!Palette
| !Name | !Color & Usage |
|Background |bgcolor(#fff): [[ColorPalette::Background]] #fff |
|Foreground |bgcolor(#000): [[ColorPalette::Foreground]] #000 |
|PrimaryPale |bgcolor(#8cf): [[ColorPalette::PrimaryPale]] #8cf |
|PrimaryLight |bgcolor(#18f): [[ColorPalette::PrimaryLight]] #18f |
|PrimaryMid |bgcolor(#04b): [[ColorPalette::PrimaryMid]] #04b |
|PrimaryDark |bgcolor(#014): [[ColorPalette::PrimaryDark]] #014 |
|SecondaryPale |bgcolor(#ffc): [[ColorPalette::SecondaryPale]] #ffc |
|SecondaryLight |bgcolor(#fe8): [[ColorPalette::SecondaryLight]] #fe8 |
|SecondaryMid |bgcolor(#db4): [[ColorPalette::SecondaryMid]] #db4 |
|SecondaryDark |bgcolor(#841): [[ColorPalette::SecondaryDark]] #841 |
|TertiaryPale |bgcolor(#eee): [[ColorPalette::TertiaryPale]] #eee |
|TertiaryLight |bgcolor(#ccc): [[ColorPalette::TertiaryLight]] #ccc |
|TertiaryMid |bgcolor(#999): [[ColorPalette::TertiaryMid]] #999 |
|TertiaryDark |bgcolor(#666): [[ColorPalette::TertiaryDark]] #666 |
|Error |bgcolor(#f88): [[ColorPalette::Error]] #f88 |
!ColorCard
|>|>|bgcolor(#FFFFFF): @@color(#000000):Primary@@ |
|bgcolor(#006699): ~PrimaryPale |bgcolor(#6699CC): ~PrimaryMid |bgcolor(#99CCFF): ~PrimaryDark |
|bgcolor(#006699): #006699 |bgcolor(#6699CC): #6699CC |bgcolor(#99CCFF): #99CCFF |
|>|>|bgcolor(#000000): @@color(#FFFFFF):Secondary@@ |
|bgcolor(#FFFFFF):FFF FFF |bgcolor(#CCCCCC):CCC CCC |bgcolor(#999999):999 999 |bgcolor(#666666):@@color(white):666 666@@ |bgcolor(#333333):@@color(white):333 333@@ |bgcolor(#000000):@@color(white):000 000@@ |bgcolor(#FFCC00):FFC C00 |bgcolor(#FF9900):~FF9 900 |bgcolor(#FF6600):@@color(white):~FF6 600@@ |bgcolor(#FF3300):@@color(white):~FF3 300@@ |>|>|>|>|>| |
|bgcolor(#99CC00):99C C00 |>|>|>| |bgcolor(#CC9900):~CC9 900 |bgcolor(#FFCC33):FFC C33 |bgcolor(#FFCC66):FFC C66 |bgcolor(#FF9966):~FF9 966 |bgcolor(#FF6633):@@color(white):~FF6 633@@ |bgcolor(#CC3300):@@color(white):~CC3 300@@ |>|>|>| |bgcolor(#CC0033):@@color(white):~CC0 033@@ |
|bgcolor(#CCFF00):CCF F00 |bgcolor(#CCFF33):CCF F33 |bgcolor(#333300):@@color(white):333 300@@ |bgcolor(#666600):@@color(white):666 600@@ |bgcolor(#999900):999 900 |bgcolor(#CCCC00):CCC C00 |bgcolor(#FFFF00):FFF F00 |bgcolor(#CC9933):~CC9 933 |bgcolor(#CC6633):@@color(white):~CC6 633@@ |bgcolor(#330000):@@color(white):330 000@@ |bgcolor(#660000):@@color(white):660 000@@ |bgcolor(#990000):@@color(white):990 000@@ |bgcolor(#CC0000):@@color(white):~CC0 000@@ |bgcolor(#FF0000):@@color(white):~FF0 000@@ |bgcolor(#FF3366):@@color(white):~FF3 366@@ |bgcolor(#FF0033):@@color(white):~FF0 033@@ |
|bgcolor(#99FF00):99F F00 |bgcolor(#CCFF66):CCF F66 |bgcolor(#99CC33):99C C33 |bgcolor(#666633):@@color(white):666 633@@ |bgcolor(#999933):999 933 |bgcolor(#CCCC33):CCC C33 |bgcolor(#FFFF33):FFF F33 |bgcolor(#996600):@@color(white):996 600@@ |bgcolor(#993300):@@color(white):993 300@@ |bgcolor(#663333):@@color(white):663 333@@ |bgcolor(#993333):@@color(white):993 333@@ |bgcolor(#CC3333):@@color(white):~CC3 333@@ |bgcolor(#FF3333):@@color(white):~FF3 333@@ |bgcolor(#CC3366):@@color(white):~CC3 366@@ |bgcolor(#FF6699):@@color(white):~FF6 699@@ |bgcolor(#FF0066):@@color(white):~FF0 066@@ |
|bgcolor(#66FF00):66F F00 |bgcolor(#99FF66):99F F66 |bgcolor(#66CC33):66C C33 |bgcolor(#669900):669 900 |bgcolor(#999966):999 966 |bgcolor(#CCCC66):CCC C66 |bgcolor(#FFFF66):FFF F66 |bgcolor(#996633):@@color(white):996 633@@ |bgcolor(#663300):@@color(white):663 300@@ |bgcolor(#996666):@@color(white):996 666@@ |bgcolor(#CC6666):@@color(white):~CC6 666@@ |bgcolor(#FF6666):@@color(white):~FF6 666@@ |bgcolor(#990033):@@color(white):990 033@@ |bgcolor(#CC3399):@@color(white):~CC3 399@@ |bgcolor(#FF66CC):@@color(white):~FF6 6CC@@ |bgcolor(#FF0099):@@color(white):~FF0 099@@ |
|bgcolor(#33FF00):33F F00 |bgcolor(#66FF33):66F F33 |bgcolor(#339900):339 900 |bgcolor(#66CC00):66C C00 |bgcolor(#99FF33):99F F33 |bgcolor(#CCCC99):CCC C99 |bgcolor(#FFFF99):FFF F99 |bgcolor(#CC9966):~CC9 966 |bgcolor(#CC6600):@@color(white):~CC6 600@@ |bgcolor(#CC9999):~CC9 999 |bgcolor(#FF9999):~FF9 999 |bgcolor(#FF3399):@@color(white):~FF3 399@@ |bgcolor(#CC0066):@@color(white):~CC0 066@@ |bgcolor(#990066):@@color(white):990 066@@ |bgcolor(#FF33CC):@@color(white):~FF3 3CC@@ |bgcolor(#FF00CC):@@color(white):~FF0 0CC@@ |
|bgcolor(#00CC00):00C C00 |bgcolor(#33CC00):33C C00 |bgcolor(#336600):@@color(white):336 600@@ |bgcolor(#669933):669 933 |bgcolor(#99CC66):99C C66 |bgcolor(#CCFF99):CCF F99 |bgcolor(#FFFFCC):FFF FCC |bgcolor(#FFCC99):FFC C99 |bgcolor(#FF9933):~FF9 933 |bgcolor(#FFCCCC):FFC CCC |bgcolor(#FF99CC):~FF9 9CC |bgcolor(#CC6699):@@color(white):~CC6 699@@ |bgcolor(#993366):@@color(white):993 366@@ |bgcolor(#660033):@@color(white):660 033@@ |bgcolor(#CC0099):@@color(white):~CC0 099@@ |bgcolor(#330033):@@color(white):330 033@@ |
|bgcolor(#33CC33):33C C33 |bgcolor(#66CC66):66C C66 |bgcolor(#00FF00):00F F00 |bgcolor(#33FF33):33F F33 |bgcolor(#66FF66):66F F66 |bgcolor(#99FF99):99F F99 |bgcolor(#CCFFCC):CCF FCC |>|>| |bgcolor(#CC99CC):~CC9 9CC |bgcolor(#996699):@@color(white):996 699@@ |bgcolor(#993399):@@color(white):993 399@@ |bgcolor(#990099):@@color(white):990 099@@ |bgcolor(#663366):@@color(white):663 366@@ |bgcolor(#660066):@@color(white):660 066@@ |
|bgcolor(#006600):@@color(white):006 600@@ |bgcolor(#336633):@@color(white):336 633@@ |bgcolor(#009900):009 900 |bgcolor(#339933):339 933 |bgcolor(#669966):669 966 |bgcolor(#99CC99):99C C99 |>|>| |bgcolor(#FFCCFF):FFC CFF |bgcolor(#FF99FF):~FF9 9FF |bgcolor(#FF66FF):@@color(white):~FF6 6FF@@ |bgcolor(#FF33FF):@@color(white):~FF3 3FF@@ |bgcolor(#FF00FF):@@color(white):~FF0 0FF@@ |bgcolor(#CC66CC):@@color(white):~CC6 6CC@@ |bgcolor(#CC33CC):@@color(white):~CC3 3CC@@ |
|bgcolor(#003300):@@color(white):003 300@@ |bgcolor(#00CC33):00C C33 |bgcolor(#006633):@@color(white):006 633@@ |bgcolor(#339966):339 966 |bgcolor(#66CC99):66C C99 |bgcolor(#99FFCC):99F FCC |bgcolor(#CCFFFF):CCF FFF |bgcolor(#3399FF):339 9FF |bgcolor(#99CCFF):99C CFF |bgcolor(#CCCCFF):CCC CFF |bgcolor(#CC99FF):~CC9 9FF |bgcolor(#9966CC):@@color(white):996 6CC@@ |bgcolor(#663399):@@color(white):663 399@@ |bgcolor(#330066):@@color(white):330 066@@ |bgcolor(#9900CC):@@color(white):990 0CC@@ |bgcolor(#CC00CC):@@color(white):~CC0 0CC@@ |
|bgcolor(#00FF33):00F F33 |bgcolor(#33FF66):33F F66 |bgcolor(#009933):009 933 |bgcolor(#00CC66):00C C66 |bgcolor(#33FF99):33F F99 |bgcolor(#99FFFF):99F FFF |bgcolor(#99CCCC):99C CCC |bgcolor(#0066CC):@@color(white):006 6CC@@ |bgcolor(#6699CC):669 9CC |bgcolor(#9999FF):999 9FF |bgcolor(#9999CC):999 9CC |bgcolor(#9933FF):@@color(white):993 3FF@@ |bgcolor(#6600CC):@@color(white):660 0CC@@ |bgcolor(#660099):@@color(white):660 099@@ |bgcolor(#CC33FF):@@color(white):~CC3 3FF@@ |bgcolor(#CC00FF):@@color(white):~CC0 0FF@@ |
|bgcolor(#00FF66):00F F66 |bgcolor(#66FF99):66F F99 |bgcolor(#33CC66):33C C66 |bgcolor(#009966):009 966 |bgcolor(#66FFFF):66F FFF |bgcolor(#66CCCC):66C CCC |bgcolor(#669999):669 999 |bgcolor(#003366):@@color(white):003 366@@ |bgcolor(#336699):@@color(white):336 699@@ |bgcolor(#6666FF):@@color(white):666 6FF@@ |bgcolor(#6666CC):@@color(white):666 6CC@@ |bgcolor(#666699):@@color(white):666 699@@ |bgcolor(#330099):@@color(white):330 099@@ |bgcolor(#9933CC):@@color(white):993 3CC@@ |bgcolor(#CC66FF):@@color(white):~CC6 6FF@@ |bgcolor(#9900FF):@@color(white):990 0FF@@ |
|bgcolor(#00FF99):00F F99 |bgcolor(#66FFCC):66F FCC |bgcolor(#33CC99):33C C99 |bgcolor(#33FFFF):33F FFF |bgcolor(#33CCCC):33C CCC |bgcolor(#339999):339 999 |bgcolor(#336666):@@color(white):336 666@@ |bgcolor(#006699):@@color(white):006 699@@ |bgcolor(#003399):@@color(white):003 399@@ |bgcolor(#3333FF):@@color(white):333 3FF@@ |bgcolor(#3333CC):@@color(white):333 3CC@@ |bgcolor(#333399):@@color(white):333 399@@ |bgcolor(#333366):@@color(white):333 366@@ |bgcolor(#6633CC):@@color(white):663 3CC@@ |bgcolor(#9966FF):@@color(white):996 6FF@@ |bgcolor(#6600FF):@@color(white):660 0FF@@ |
|bgcolor(#00FFCC):00F FCC |bgcolor(#33FFCC):33F FCC |bgcolor(#00FFFF):00F FFF |bgcolor(#00CCCC):00C CCC |bgcolor(#009999):009 999 |bgcolor(#006666):@@color(white):006 666@@ |bgcolor(#003333):@@color(white):003 333@@ |bgcolor(#3399CC):339 9CC |bgcolor(#3366CC):@@color(white):336 6CC@@ |bgcolor(#0000FF):@@color(white):000 0FF@@ |bgcolor(#0000CC):@@color(white):000 0CC@@ |bgcolor(#000099):@@color(white):000 099@@ |bgcolor(#000066):@@color(white):000 066@@ |bgcolor(#000033):@@color(white):000 033@@ |bgcolor(#6633FF):@@color(white):663 3FF@@ |bgcolor(#3300FF):@@color(white):330 0FF@@ |
|bgcolor(#00CC99):00C C99 |>|>|>| |bgcolor(#0099CC):009 9CC |bgcolor(#33CCFF):33C CFF |bgcolor(#66CCFF):66C CFF |bgcolor(#6699FF):669 9FF |bgcolor(#3366FF):@@color(white):336 6FF@@ |bgcolor(#0033CC):@@color(white):003 3CC@@ |>|>|>| |bgcolor(#3300CC):@@color(white):330 0CC@@ |
|>|>|>|>|>| |bgcolor(#00CCFF):00C CFF |bgcolor(#0099FF):009 9FF |bgcolor(#0066FF):@@color(white):006 6FF@@ |bgcolor(#0033FF):@@color(white):003 3FF@@ |>|>|>|>|>| |
!Activities <<newActivity>>
<<list activities>>
!GTD Dashboard
<<GTDDashboard>>
See Also: [[My Projects]] and [[My Activities]]
PaulsNotepad PaulsPlugins Sandbox
|''Type:''|file|
|''URL:''|file://C:\Users\Paul\Documents\Visual Studio 2005\Projects\PaulsNotepad3.0.root\PaulsNotepad3.0\PaulsNotepad.html|
|''Workspace:''|(default)|
This tiddler was automatically created to record the details of this server
!Overview
''{{{<<forEach}}}''
//{{{listquery}}}// - what tiddlers you want to display
//{{{[listquery-parameters...]}}}// - the parameters, if any, required by the list function
//{{{[output]}}}// - a template to display output with *see output formatting
//{{{[forEach...]}}}// - a nested foreach statement which runs for each element in the previous list.
''{{{>>}}}''
# {{{listquery}}} - what tiddlers you want to display
#* {{{this}}} - the current tiddler only
#* any valid list function (all, missing, orphans, shadowed, touched, withTag, withTags, search)
#* //{{{[[tiddlerName]]}}} - the named tiddler//
#* //{{{[[tiddler::slice]]}}} - the tiddler referenced by the slice name//
# {{{listquery-parameter}}} - the parameters, if any, required by the list function
#* {{{literal-parameter}}} - any parameters are passed directly to the list query
#* //{{{[[tiddlerName]]}}} - the value of the named tiddler is passed as the parameter//
#* //{{{[[tiddler::slice]]}}} - the value of the slice is passed as the parameter//
#* {{{$variable}}} - any of the predefined forEach variables
# {{{output}}} - a template to display output with *see output formatting
#* //{{{NULL}}} - don't output anything//
#* {{{literal-output-string}}} - the literal string value is used as the template for the output. The literal output string can contain
#** {{{$variables}}} - any of the defined $variables
#** //{{{[[tiddler::slice]]}}} - the value of the slice//
#** //{{{[[$variable::slice]]}}} - the value of the slice of the tiddler referenced by the $variable (typically $title)//
#* //{{{[[tiddlerName]]}}} - the value of the named tiddler is used as the template for the output//
#* //{{{[[tiddler::slice]]}}} - the value of the slice is used as the template for the output//
# {{{[foreach...]}}} - a nested foreach statement, using the already defined formats to run for each element in the previous list.
!!Output Formatting
After forEach gets the list of tiddlers to process it starts to loop through them. For each tiddler it has, it will output one {{{output}}} formatted line of text to the wikifier for display. This {{{output}}} line can have $variables, slices, or """$variable:slices""" in it which will be substituted with values from the current (or upper) tiddler.
!!$variables
There are special variables that take on the value of the currently displaying tiddler content, they take on values from the currently listing tiddler. Note the '$$' variable - this is a special variable that's used when nesting forEach calls to display the attributes of 'deeper' listed tiddlers.
| !name | !description |
| $title |The title of the tiddler |
| $text |The Body of the tiddler |
| $modifier |Who last modified the tiddler |
| $modified |When the tiddler was last modified |
| $tags |The tags of the tiddler |
| $size |The size in characters of the body of the tiddler |
| $n |inserts a carrage return |
| $$ |inserts a $ |
!Using different list queries
# {{{<<forEach touched "* \"\"\"[[$title]]\"\"\" ">>}}} - Simple query displays the locally modified tiddlers
# {{{<<forEach search 'named tiddler' "* [[$title]]">>}}} - lists all tiddlers that contain the phrase 'named tiddler'
# {{{<<forEach this "| !\"\"\"$title\"\"\" |">>}}} - displays ''//this//'' tiddler as a table header
!Nesting forEach
!!Nesting Samples
# Simple Nesting - this lists all tiddlers tagged with ''systemConfig'' and then for each one of those, lists all the tiddlers that mention the title of this tiddler.
{{{
<<forEach withTags systemConfig "# [[$title]]"
forEach search $title "#* [[$$title]]"
>>
}}}
Notice that on the inner list, we use ''$title'' as a parameter to the search query and then ''$$title'' in the output. The single-$ $title refers to the first level tiddler title - in this case, the title of the tiddler with the systemConfig tag. The double-$ $$title refers to the second level tiddler title - in this example that is the title of the tiddler that contains the name of the tiddler that has the systemConfig tag.
# Nesting using ''//this//'' - you can use the ''//this//'' keyword as shown above in Using different list queries as the starting point for //taggly tagging// like queries.
//example to follow//
!Fancy Formatting
!!Creating Nested lists
!!Creating Tables
Here's a handy table that shows my task list:
{{{
<<forEach withTag Context "| !\"\"\"$title\"\"\" | \<\<newerTiddler button:'new' name:'New Task $title'\>\> |
|>|$text |"
forEach withTags [[$title]] AND NOT Complete "|[[$$title]] |\<\<newerTiddler button:'edit' name:'$$title'\>\> |"
>>
}}}
Each of my tasks is tagged with where I can or what I need to do the task, for example: @Calls - means I need a phone, @Work - means I do this at work, etc... I've created these different task 'contexts' an tagged them all with the tag Context. This way if I ned a new place or tool - I can easily create a new context - just create a new tiddler!
This sample displays each context title & description, along with a 'new' button to create a new task for that context. Then for each context, lists all the tasks that are also not tagged with 'Complete' - each task has an associated 'edit' button so I can easily open it (click on the title) or edit it (click on the button)
!!Nested Stuff in Tables - //this shouldn't be possible!//
Here's a fun one - we embed a second call to forEach as a macro-call in a table cell. This lets us put a list inside a table cell. Cool huh? //Becareful not to put a stace at the end of the output formattn lines for the tables - it will break TW's table formating.//
{{{
<<forEach withTag PaulsPlugins "| [[$title]] | $tags | $modified | $modifier | $size |
|>|>|>|>| children of $title |
|>|>|>|>|\<\<forEach withTag [[$title]] '* [[$$title]] '\>\>|">>
}}}
/***
|''Name:''|ForEachPlugin |
|''Version:''|$Revision: 8 $ |
|''Source:''|http://thePettersons.org/PaulsNotepad.html#ForEachPlugin |
|''Author:''|[[Paul Petterson]] |
|''Type:''|Macro Extension |
|''Requires:''|TiddlyWiki 1.2.36 or higher |
!Description
!!Syntax
''{{{<<forEach}}}''
//{{{listquery}}}// - what tiddlers you want to display
//{{{[listquery-parameters...]}}}// - the parameters, if any, required by the list function
//{{{[output]}}}// - a template to display output with *see output formatting
//{{{[forEach...]}}}// - a nested foreach statement which runs for each element in the previous list.
''{{{>>}}}''
''Special fields:''
| !name | !description |
| $title |The title of the tiddler |
| $text |The Body of the tiddler |
| $modifier |Who last modified the tiddler |
| $modified |When the tiddler was last modified |
| $tags |The tags of the tiddler |
| $size |The size in characters of the body of the tiddler |
| $n |inserts a carrage return |
| $$ |inserts a {{{$}}} |
To insert < and > characters, //quote// them like this: \< \>
!!Samples
{{{<<forEach>>}}}
{{{<<forEach orphans>>}}}
{{{<<forEach orphans "# [[$title]], $modified, $size">>}}}
{{{<<forEach withTag systemTiddlers "| $title | $tags | $modified | $modifier | $size |$n|$)|$)|$)|$)|$text |">>}}}
''Note:'' it is possible to call macros from within forEach by using \<\<macro\>\> more complicated examples available on the ForEachPluginTests page.
See [[ForEachDocumentation]] for more information
!Todo
<<projectTemplate>>
!Revision history
$History: ForEachPlugin.js $
*
* ***************** Version 8 *****************
* User: paulpet Date: 7/08/07 Time: 5:48p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* removed un-needed newlines when nothing is output - now nesting looks
* nicer.
*
* ***************** Version 7 *****************
* User: paulpet Date: 3/03/06 Time: 1:13p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* removed need for all them $n's
*
* ***************** Version 6 *****************
* User: paulpet Date: 2/28/06 Time: 1:49p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* fixed this bug referencing inner most tiddler instead of outer most
* tiddler...
*
* ***************** Version 5 *****************
* User: paulpet Date: 2/27/06 Time: 4:47p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* added some better documentation.
*
* ***************** Version 4 *****************
* User: paulpet Date: 2/27/06 Time: 4:02p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* added THIS support
*
* ***************** Version 3 *****************
* User: paulpet Date: 2/27/06 Time: 3:57p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* added self recursion (not wikifier recursion)
*
* ***************** Version 2 *****************
* User: paulpet Date: 2/26/06 Time: 1:49p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* ported to TW 2.0
v0.1 - October 28th 2005 - it works so far...
!Code
***/
//{{{
// Code...
config.macros.forEach = {
parser: function( params ) {
var res = new Object() ;
res.listTypeName = params[0]?params[0]:"all";
var next = params.length-1 ;
if ( params.length > 1 )
for( var i=0; i<params.length; i++ )
if ( params[i].toUpperCase() == "FOREACH" ) {
next = i-1;
break;
}
res.listTypeParams = (( next > 0 )?params.slice( 0, next ):[]) ;
res.formatter = (next>0)?params[next]:"* [[$title]]" ;
res.next = (next<(params.length-1))?params.slice(next+2):[]
return res ;
},
displayFieldValue: function( t, p ) {
try {
if (typeof(t) == "string" ) {
var t1 = store.tiddlers[t] ;
if ( t1 == null ) return p+":"+t ;
if ( p == "size" ) return t1.text.length ;
return t1[p] ;
} else {
if ( p == "size" ) return t.text.length ;
return t[p] ;
}
} catch( e ) {
displayMessage("Error while displaying tiddler: " + e.description ) ;
return "//error on " + t + "[" + p + "]//" ;
}
},
specialCharacters: function( d, t, str, p1 ) {
var r = "?" ;
switch( p1 ) {
case "title":
case "text":
case "modified":
case "modifier":
case "size":
case "tags": r = d( t, p1 ) ; break ;
case "(": r = "<" ; break ;
case ")": r = ">" ; break ;
case "n": r = "\n" ; break ;
case "$": r = "$" ; break ;
default:
r = p1 ;
}
return r ;
},
formatter: function( t, fmt ) {
var result = fmt.replace(/([^\\])|\\([\\]*[^nr])/ig, "$1$2");
var d = this.displayFieldValue;
var sc = this.specialCharacters;
result = result.replace( /\$([\$]*(?:title|text|modified|modifier|size|tags|\(|\)|n|\$))/ig, function(s,p1) { return sc( d, t, s, p1 ); });
return result ;
},
fixupParams: function( t, next ) {
var newNext = new Array();
for( var i=0; i<next.length; i++ )
newNext.push( this.formatter( t, next[i] ));
return newNext ;
},
runner: function( params, tiddler ) {
var outStr = "", sep = "" ;
var p = this.parser( params ) ;
var results;
if ( p.listTypeName.toUpperCase() == "THIS" ) {
results = [ tiddler ] ;
} else {
if ( config.macros.list[ p.listTypeName ] )
results = config.macros.list[ p.listTypeName ].handler( p.listTypeParams ) ;
}
if ( results )
for ( var ti = 0; ti < results.length; ti++) {
var t = results[ti] ;
var o = this.formatter( t, p.formatter ) ;
// var lc = outStr.substring(outStr.length-1)
if ( o != null && o.length > 0 ) {
outStr += sep + o ;
sep = "\n" ;
}
if ( p.next.length > 0 ) {
var subResults = this.runner( this.fixupParams( t, p.next ), t );
if ( subResults != null && subResults.length > 0 )
outStr += sep + subResults ;
sep = "\n" ;
}
}
return outStr ;
},
handler: function( place, macroName, params, wikifier,paramString,tiddler ) {
var t = story.findContainingTiddler( place ) ;
var name = (t?t.id.substr(story.idPrefix.length):"NA") ;
var realTiddler = store.fetchTiddler( name ) ;
if ( realTiddler == null )
realTiddler = tiddler ;
var outStr = this.runner( params, realTiddler ) ;
wikify( outStr, place ) ;
}}
//}}}
/***
This plugin is released under the [[Creative Commons Attribution 2.5 License|http://creativecommons.org/licenses/by/2.5/]]
***/
!Simple
<<forEach withTag systemConfig "| [[$title]] | $modified | $size |">>
!Complex Nested List
<<forEach withTag PaulsPlugins "| [[$title]] | $tags | $modified | $modifier | $size |
|$)|$)|$)|$)| children of $title |
|$)|$)|$)|$)|\<\<forEach withTag [[$title]] '| [[$$title]] | $$tags | $$modified | $$modifier | $$size |'\>\>|">>
!Recursive Test 1
<<forEach withTag PaulsPlugins "|>| ![[$title]] | $tags | $modified |$n|\>|\>|\>| children of $title |"
foreach withTag [[$title]] "| [[$title]] | [[$$title]] | $$tags | $$modified |">>
!THIS test
<<forEach this "Name: $title$nSize: $size$nModified: $modified">>
Note: it is possible to call macros from within forEach by using $($(macro$)$) more complicated examples available on the ForEachPluginTests page.
!Wacky one for the GTD plugin...
{{{<<forEach withTag [[My Activities]] "|>|![[$title]] |$n|$($(forEach withTags Test1 AND $title '|| [[$$title]] |'$)$)|">>}}}
!New Ideas...
{{{
<<foreach this "|>|>| !Project: $title |\n"
forEach withTag [[My Activities]] "|>| Activity: $title | Created |\n"
forEach withTag $title "|$title |$$title |$$created |$n">>
}}}
For Each parser:
* Searches for a single nested ''forEach'' - saves it's position in 'nextThing' or sets it too params.length
* Builds call to list handler
** If handler is THIS
*** return something special to signify we're not using list, like NULL
** Else
*** everything from 'handler' to nextThing -1 (or -2... not sure) becomes handler parameters array
*** params[0] == "list", params[1] == "handler", params[2]... handler parameters
* saves 'next thing' -1 as the output string
* Saves 'next thing' and on as parameters array ot next call
For Each Runner:
* call the for each parser with parameters
* if we're running list
** executes list handler getting results array
* else
** create an array with 'tiddler' in it (from handler() parameters)
* for each item in results array
** perform parameter substitution on the output string, append it to the output string
** if next thing exists
*** perform parameter subsititution on the 'next thing' array elements
*** recursively call For Each Runner with the new 'next thing' array as parameters.
**** append it's results to the output string
* finally - return the output string.
For Each:
* call For Each Runnier with parameters, tiddler, place, etc...
* get return string and call wikify() on it.
!Simple
{{{
<<forEach withTag systemConfig "| [[$title]] | $modified | $size |">>
}}}
!Complex Nested List
{{{
<<forEach withTag PaulsPlugins "| [[$title]] | $tags | $modified | $modifier | $size |
|$)|$)|$)|$)| children of $title |
|$)|$)|$)|$)|\<\<forEach withTag [[$title]] '| [[$$title]] | $$tags | $$modified | $$modifier | $$size |'\>\>|">>
}}}
!Recursive Test 1
{{{
<<forEach withTag PaulsPlugins "|>| ![[$title]] | $tags | $modified |$n|\>|\>|\>| children of $title |"
foreach withTag [[$title]] "| [[$title]] | [[$$title]] | $$tags | $$modified |">>
}}}
!THIS test
{{{<<forEach this "Name: $title$nSize: $size$nModified: $modified">>}}}
Note: it is possible to call macros from within forEach by using $($(macro$)$) more complicated examples available on the ForEachPluginTests page.
!Wacky one for the GTD plugin...
{{{<<forEach withTag [[My Activities]] "|>|![[$title]] |$n|$($(forEach withTags Test1 AND $title '|| [[$$title]] |'$)$)|">>}}}
The center of my organizing world... that's GTD - this project is all about writing some simple TW things to do just that!
Plugin: GettingThingsDonePlugin
Tests: GettingThingsDoneTests & GTDTests1
<<projectTemplate>>
----
{{{<<GTDDashboard>>}}}
<<GTDDashboard>>
{{{<<projectTemplate>>}}}
<<projectTemplate>>
{{{<<quickActions>>}}}
<<quickActions>>
{{{<<quickActions foo1>>}}}
<<quickActions foo1>>
/***
|''Name:''|GettingThingsDonePlugin |
|''Version:''|$Revision: 4 $ |
|''Source:''|http://thePettersons.org/tiddlywiki.html#GettingThingsDonePlugin |
|''Author:''|[[Paul Petterson]] |
|''Type:''|TiddlyWiki Application Package |
|''Requires:''|TiddlyWiki 2.2.X or higher, NewerTiddler Plugin, and ListWithTagsPlugin |
!Description
Getting Things Done - my way of managing the workload.
A Project is any tiddler tagged with 'My Projects' (or whatever you have set
as your project tag).
Contexts - or task types are any tags that are themselves tiddlers with the
'Context' tag associated with them.
An activity is any tiddler that is assigned a Context tag. If an activity
also has a Project tag, then it's an activity assigned to a project - otherwise
it's a global/project-less activity.
If an activity is assigned the tag 'NA' then it becomes the 'next action' this
is the thing you should do next.
!Todo
See: GTDProject
!Revision history
$History: GettingThingsDonePlugin.js $
*
* ***************** Version 4 *****************
* User: paulpet Date: 7/13/07 Time: 9:33p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/GTD/systemConfig
* Removed all the un-needed macros, now most GTD stuff is done in forEach
* and stored in shadow tiddlers. Reference data is not done yet. Found a
* weird bug in ListWithTags.
*
* ***************** Version 3 *****************
* User: paulpet Date: 7/08/07 Time: 6:09p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/GTD/systemConfig
* GTD Checkpoint - project templates all converted over to forEach macro,
* nice looking stuff! :)
*
* ***************** Version 2 *****************
* User: paulpet Date: 3/06/06 Time: 7:20a
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/GTD/systemConfig
*
* ***************** Version 1 *****************
* User: paulpet Date: 2/26/06 Time: 9:53p
* Created in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/GTD/systemConfig
* checkpoint
! Your GTD Configuration
Edit these to match the way you think - if you call a Project something else,
like 'Job' then rename the project related settings to be Job centric. When you
reload you TW you'll be using the new settings. If you have customized any
shadow tiddlers, then you will have to re-customize them again.
***/
//{{{
config.GTD = {
ed:"edit",
projectHeader: "!My Projects",
projectsTag: "My Projects",
newProjectButton: "New Project",
contextHeader: "!Contexts",
contextTag: "Context",
newContextButton: "New Context",
inboxHeader: "!Inbox",
newInboxButton: "Edit Today",
inboxTiddlerName: "$title - Inbox for MMM DD, YYYY",
dashboardInboxTiddlerName: "Inbox for MMM DD, YYYY",
inboxTag: "Inbox",
additionalGlobalInboxTags: "OR [[Journal]] OR [[TiddlySnip]]",
nextActionHeader: "!Next Actions",
actionHeader: "!Actions",
nextActionTag: "NA",
completeHeader: "!Complete Actions",
completeTag: "Complete",
quickActionLabel: "New Activity: ",
txtNew: "New ",
txtNewAction: "All Actions should be physical in nature (ie: you must DO something) and can be completed in 1 sitting."
};
//}}}
/***
----
! Shadow Tiddlers
These shadow tiddlers are really the heart & soul of this GTD implementation. They all use the ForEachPlugin to show the appropriate information and functions. To customize these, don't edit them here but edit the shadow tiddler itself in you TW. That way if you mess it up, you can just delete it and get the working version back.
***/
//{{{
config.GTD.shadowTiddlers = {
MyProjectsShadow: [
"<<forEach this ",
" \"" + config.GTD.projectHeader + " - \\<\\<newerTiddler button:'" + config.GTD.newProjectButton + "' tags:'[[$title]]' template:'DefaultProjectTemplate'\\>\\>\" ",
" foreach withTag [[$title]] \"* [[$$title]] \\<\\<newerTiddler button:'" + config.GTD.ed + "' name:'$$title'\\>\\>\" ",
">>"
].join("\n"),
ContextShadow: [
"<<forEach this ",
" \"" + config.GTD.contextHeader + " - \\<\\<newerTiddler button:'" + config.GTD.newContextButton + "' tags:'[[$title]]'\\>\\>\" ",
" foreach withTag [[$title]] \"* [[$$title]] \\<\\<newerTiddler button:'" + config.GTD.ed + "' name:'$$title'\\>\\>\" ",
">>"
].join("\n"),
ProjectDashboard: [
"<<forEach this \"\\<\\<tabs 'tab$title' ",
" 'Inbox' 'Items to be processed for this project' ProjectTemplateInbox ",
" 'Next Actions' 'Next Actions for this project' ProjectTemplateActions ",
" 'Reference' 'Reference materials for this project' ProjectTemplateReferences ",
" 'Completed' 'Completed Actions for this project' ProjectTemplateComplete\\>\\>\" ",
">>"
].join("\n"),
GTDDashboard:[
"<<tabs tabDashboard ",
" 'Projects' 'All Projects' DashboardTemplateProjects ",
" 'Inbox' 'All Items to be processed' DashboardTemplateInbox ",
" 'Next Actions' 'All Next Actions' DashboardTemplateActions ",
" 'Reference' 'All Reference Materials' DashboardTemplateReferences ",
" 'Completed' 'All Completed Actions' DashboardTemplateComplete",
">>"
].join("\n"),
DefaultProjectTemplate: [
"Describe Project Here...",
"----",
"<<projectTemplate>>"
].join("\n"),
ProjectTemplateInbox: [
"<<forEach this ",
" \"" + config.GTD.inboxHeader + " - \\<\\<newerTiddler button:'" + config.GTD.newInboxButton + "' name:'" + config.GTD.inboxTiddlerName + "' tags:'" + config.GTD.inboxTag + " [[$title]]'\\>\\>\"",
" forEach withTags [[$title]] and " + config.GTD.inboxTag + " \"* [[$$title]] \\<\\<newerTiddler button:'" + config.GTD.ed + "' name:'$$title'\\>\\>\"",
">>"
].join("\n"),
ProjectTemplateActions:[
"<<forEach this \"" + config.GTD.nextActionHeader + "\" forEach withTag [[" + config.GTD.contextTag + "]] \"\"",
" forEach withTags [[$title]] and [[$$title]] and [[" + config.GTD.nextActionTag + "]] and not [[" + config.GTD.completeTag + "]]",
" \"* $$title - [[$$$title]] \\<\\<newerTiddler button:'" + config.GTD.ed + "' name:'$$$title'\\>\\>\"",
">>",
"<<forEach this \"" + config.GTD.actionHeader + "$n\\<\\<quickActions [[$title]]\\>\\>\"",
" forEach withTag [[" + config.GTD.contextTag + "]] \"\" ",
" forEach withTags [[$title]] and [[$$title]] and not [[" + config.GTD.nextActionTag + "]] and not [[" + config.GTD.completeTag + "]]",
" \"|[[$$title]] |[[$$$title]] |\\<\\<newerTiddler button:'" + config.GTD.ed + "' name:'$$$title'\\>\\> |\"",
">>"
].join("\n"),
ProjectTemplateComplete:[
"<<forEach this \"" + config.GTD.completeHeader + "\" ",
" forEach withTag [[" + config.GTD.contextTag + "]] \"\" ",
" forEach withTags [[$title]] and [[$$title]] and [[" + config.GTD.completeTag + "]]",
" \"|$$title |[[$$$title]] | \\<\\<newerTiddler button:'edit' name:'$$$title'\\>\\> |\"",
">>"
].join("\n"),
ProjectTemplateReferences:[
""
].join("\n"),
DashboardTemplateProjects:[
"<<forEach this \"" + config.GTD.projectHeader + " - \\<\\<newerTiddler button:'" + config.GTD.newProjectButton + "' tags:'[[" + config.GTD.projectsTag + "]]' template:'DefaultProjectTemplate'\\>\\>\"",
" foreach withTag [[" + config.GTD.projectsTag + "]] \"* [[$$title]] \\<\\<newerTiddler button:'edit' name:'$$title'\\>\\>\"",
">>"
].join("\n"),
DashboardTemplateInbox:[
"<<forEach this \"" + config.GTD.inboxHeader + " - \\<\\<newerTiddler button:'" + config.GTD.newInboxButton + "' name:'" + config.GTD.dashboardInboxTiddlerName + "' tags:'[[" + config.GTD.inboxTag + "]]'\\>\\>\" ",
" forEach withTags [[" + config.GTD.inboxTag + "]] " + config.GTD.additionalGlobalInboxTags,
" \"* [[$$title]] \\<\\<newerTiddler button:'" + config.GTD.ed + "' name:'$$title'\\>\\>\"",
">>"
].join("\n"),
DashboardTemplateActions:[
config.GTD.nextActionHeader,
"<<forEach withTag [[" + config.GTD.contextTag + "]] \"\" ",
" forEach withTags [[$title]] and [[" + config.GTD.nextActionTag + "]] and not [[" + config.GTD.completeTag + "]]",
" \"* $title - [[$$title]] \\<\\<newerTiddler button:'" + config.GTD.ed + "' name:'$$title'\\>\\>\"",
">>",
config.GTD.actionHeader,
"<<quickActions>>",
"<<forEach withTag [[" + config.GTD.contextTag + "]] \"\" ",
" forEach withTags [[$title]] and not [[" + config.GTD.completeTag + "]] and not [[" + config.GTD.nextActionTag + "]] \"|[[$title]] |[[$$title]] |\\<\\<newerTiddler button:'" + config.GTD.ed + "' name:'$$title'\\>\\> |\"",
">>"
].join("\n"),
DashboardTemplateComplete:[
config.GTD.completeHeader,
"<<forEach withTag [[" + config.GTD.contextTag + "]] \"\" ",
" forEach withTags [[$title]] and [[" + config.GTD.completeTag + "]]",
" \"|$title |[[$$title]] | \\<\\<newerTiddler button:'" + config.GTD.ed + "' name:'$$title'\\>\\> |\"",
">>"
].join("\n"),
DashboardTemplateReferences:[
""
].join("\n")
};
// now bootstrap the shadow tiddlers
merge( config.shadowTiddlers, config.GTD.shadowTiddlers );
// shadow tiddlers for the special tags - "My Projects" and "Context" - copy them from the default shadow tiddlers
config.GTD.shadowTiddlers[config.GTD.projectsTag] = config.GTD.shadowTiddlers.MyProjectsShadow ;
config.GTD.shadowTiddlers[config.GTD.contextTag] = config.GTD.shadowTiddlers.ContextShadow;
//}}}
/***
----
|''Name:''|quickActions |
|''Type:''|Macro Extension |
|''Requires:''|TiddlyWiki 1.2.36 or higher |
!Description
Creates a set of buttons, one for each activity type, which in turn create a new tiddler tagged appropriately to be a new action of the specified type for the specified project.
!!Parameters
(optional) the name of the project to add as a tag.
!!Samples
{{{<<quickActions>>}}}
{{{<<quickActions someProject>>}}}
!!Code
***/
//{{{
config.macros.quickActions= {
handler: function(place,macroName,params) {
var project = params[0] ;
var wikiText = config.GTD.quickActionLabel ;
var button = "<<newerTiddler button:\"%0\" name:\"%1\" tags:\"%2\" text:\"%3\">>" ;
var actions = store.getTaggedTiddlers(config.GTD.contextTag) ;
//for( var action in actions ) {
for (var a = 0; a < actions.length; a++) {
var action = actions[a] ;
if ( action instanceof Tiddler ) {
var buttonText = config.GTD.txtNew + action.title ;
var defaultText = config.GTD.txtNewAction ;
var tags = (project?(String.encodeTiddlyLink(project)+" "+String.encodeTiddlyLink(action.title)):String.encodeTiddlyLink(action.title)) ;
var b = button.format( [buttonText, buttonText, tags, defaultText] );
wikiText += b ;
}
}
wikify( wikiText, place ) ;
}} ;
//}}}
/***
----
|''Name:''|GTD Dashboard |
|''Type:''|Macro Extension |
|''Requires:''|TiddlyWiki 1.2.36 or higher |
!Description
Shows the GTD Dashboard, which is a set of tabs containing your projects, inbox, actions, reference marerial, and accomplishments.
The dashboard is stored in the shadow tiddler [[GTDDashboard]] - edit this to customize your dashboard
!!Samples
{{{<<GTDDashboard>>}}}
!!Code
***/
//{{{
config.macros.GTDDashboard = {
handler: function(place, macroName, params) {
var wikiText = "<<tiddler GTDDashboard>>";
wikify( wikiText, place ) ;
}} ;
//}}}
/***
----
|''Name:''|Project Template |
|''Type:''|Macro Extension |
|''Requires:''|TiddlyWiki 1.2.36 or higher |
!Description
Shows a project specific Dashboard.
The dashboard is stored in the shadow tiddler ProjectDashboard - edit this to customize your dashboard.
!!Samples
{{{<<projectTemplate>>}}}
!!Code
***/
//{{{
config.macros.projectTemplate= {
handler: function(place, macroName, params) {
var wikiText = "<<tiddler ProjectDashboard>>" ;
wikify( wikiText, place ) ;
}} ;
//}}}
/***
This plugin is released under the [[Creative Commons Attribution 2.5 License|http://creativecommons.org/licenses/by/2.5/]]
***/
//{{{
! TBD
So how do you test a tagging system?
Beats me...
|>|>| !Greek Letters |
| !Symbol | !upper-case | !lower-case |
| Alpha | Α | α |
| Beta | Β | β |
| Gamma | Γ | γ |
| Delta | Δ | δ |
| Epsilon | Ε | ε |
| Zeta | Ζ | ζ |
| Eta | Η | η |
| Theta | Θ | θ |
| Thetasym | ϑ | |
| Iota | Ι | ι |
| Kappa | Κ | κ |
| Lambda | Λ | λ |
| Mu | Μ | μ |
| Nu | Ν | ν |
| Xi | Ξ | ξ |
| Omicron | Ο | ο |
| Pi | Π | π |
| Pi | π | |
| Rho | Ρ | ρ |
| Sigma | Σ | σ |
| Tau | Τ | τ |
| Upsilon | Υ | υ |
| Upsilon | ϒ | |
| Phi | Φ | φ |
| Chi | Χ | χ |
| Psi | Ψ | ψ |
| Omega | Ω | ω |
/***
|''Name:''|HorizontalMainMenuStyleSheet |
|''Version:''|$Revision: 2 $ |
|''Source:''|http://thePettersons.org/PaulsNotepad.html#HorizontalMainMenuStyleSheet |
|''Author:''|[[Paul Petterson]] |
|''Type:''|Style Sheet Extension |
|''Requires:''|TiddlyWiki 2.0.0 or higher |
!Description
Styles used to in support of a modified PageTemplate that moves the
main menu into the header of the page and makes it's horizontal instead
of vertical.
!Revision history
$History: HorizontalMainMenuStyleSheet.css $
*
* ***************** Version 2 *****************
* User: paulpet Date: 12/10/06 Time: 9:44p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsNotepad/excludeLists
* checkpoint
*
* ***************** Version 1 *****************
* User: paulpet Date: 12/09/06 Time: 9:43p
* Created in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsNotepad/excludeLists
* checkpoint
*
* ***************** Version 2 *****************
* User: paulpet Date: 2/22/06 Time: 12:33p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsNotepad
* look and feel beginning to take shape!
!Rules
***/
/*{{{*/
#mainMenu {
padding: 2px;
position: static;
width: auto;
text-align: left;
}
#mainMenu a, #mainMenu .button {
text-decoration: none;
line-height: 100%;
margin: 0;
padding: 0;
}
#mainMenu ul {
margin: .25em;
}
#mainMenu li {
display: inline;
list-style-type: none;
margin: 0em .5em 0em .5em;
line-height: 100%;
}
#mainMenu br {
display: none;
}
/* resize the display area to allow for no left column */
#displayArea {
margin: .5em 19em 0 1em;
}
/* Widen up the right column */
#sidebar {
position: absolute;
right: 3px;
width: 20em;
font-size: .9em;
}
/*
#sidebarOptions {
padding-top: 0.3em;
}
#sidebarOptions a {
margin: 0em 0.2em;
padding: 0.2em 0.3em;
display: block;
}
#sidebarOptions input {
margin: 0.4em 0.5em;
}
#sidebarOptions .sliderPanel {
margin-left: 1em;
padding: 0.5em;
font-size: .85em;
}
#sidebarOptions .sliderPanel a {
font-weight: bold;
display: inline;
padding: 0;
}
#sidebarOptions .sliderPanel input {
margin: 0 0 .3em 0;
}
*/
#sidebarTabs .tabContents {
width: 19em;
overflow: hidden;
}
/*}}}*/
|>|>| !Whitespace |
| !Symbol | !Character | !Description |
| nbsp | |non-breaking space |
| ensp |   |en space |
| emsp |   |em space |
| thinsp |   |thin space |
| zwnj | ‌ |zero width non-joiner |
| zwj | ‍ |zero width joiner |
| lrm | ‎ |left-to-right mark |
| rlm | ‏ |right-to-left mark |
| shy | ­ |soft hyphen |
|>|>| !Money |
| !Symbol | !Character | !Description |
| cent | ¢ |cent sign |
| pound | £ |pound sign |
| curren | ¤ |currency sign |
| yen | ¥ |yen sign |
| euro | € |euro sign |
|>|>| !Symbols |
| !Symbol | !Character | !Description |
| copy | © |copyright sign |
| reg | ® |registered trade mark |
| trade | ™ |trade mark sign |
| ordm | º |masculine ordinal indicator |
| ordf | ª |feminine ordinal indicator |
| dagger | † |dagger |
| Dagger | ‡ |double dagger |
| bull | • |bullet |
| spades | ♠ |spade |
| clubs | ♣ |club |
| hearts | ♥ |heart |
| diams | ♦ |diamond |
|>|>| !Lines |
| !Symbol | !Character | !Description |
| macr | ¯ |overline |
| brvbar | ¦ |broken vertical bar |
| ndash | – |en dash |
| mdash | — |em dash |
| oline | ‾ |overline |
| lceil | ⌈ |left ceiling |
| rceil | ⌉ |right ceiling |
| lfloor | ⌊ |left floor |
| rfloor | ⌋ |right floor |
|>|>| !Arrows |
| !Symbol | !Character | !Description |
| larr | ← |left arrow |
| uarr | ↑ |up arrow |
| rarr | → |right arrow |
| darr | ↓ |down arrow |
| harr | ↔ |left right arrow |
| crarr | ↵ |down arrow with corner leftwards / carriage return |
| lArr | ⇐ |left double arrow |
| uArr | ⇑ |up double arrow |
| rArr | ⇒ |right double arrow |
| dArr | ⇓ |down double arrow |
| hArr | ⇔ |left right double arrow |
|>|>| !Punctuation |
| !Symbol | !Character | !Description |
| iexcl | ¡ |inverted exclamation mark |
| iquest | ¿ |inverted question mark |
| uml | ¨ |diaeresis |
| acute | ´ |acute accent |
| para | ¶ |paragraph sign |
| sect | § |section sign |
| cedil | ¸ |cedilla |
| amp | & |ampersand |
| apos | ' |apostrophe mark |
| circ | ˆ |circumflex accent |
| tilde | ˜ |small tilde |
| hellip | … |horizontal ellipsis |
|>|>| !Quotations |
| !Symbol | !Character | !Description |
| quot | " |quotation mark |
| raquo | » |right double angle quotation mark |
| laquo | « |left double angle quotation mark |
| lsquo | ‘ |left single quotation mark |
| rsquo | ’ |right single quotation mark |
| sbquo | ‚ |single low-9 quotation mark |
| ldquo | “ |left double quotation mark |
| rdquo | ” |right double quotation mark |
| bdquo | „ |double low-9 quotation mark |
| lsaquo | ‹ |single left-pointing angle quotation mark |
| rsaquo | › |single right-pointing angle quotation mark |
<<forEach this "!Journal Entries - \<\<newJournal 'DD MMM YYYY' [[$title]]\>\>$n"
foreach withTag [[$title]] OR [[Inbox]]"* [[$$title]] last updated: $modified by $modifier$n">>
|>|>| !Latin Letters |
| !Symbol | !upper-case | !lower-case |
| Agrave | À | à |
| Aacute | Á | á |
| Acirc | Â | â |
| Atilde | Ã | ã |
| Auml | Ä | ä |
| Aring | Å | å |
| ~AElig | Æ | æ |
| Ccedil | Ç | ç |
| Egrave | È | è |
| Eacute | É | é |
| Ecirc | Ê | ê |
| Euml | Ë | ë |
| Igrave | Ì | ì |
| Iacute | Í | í |
| Icirc | Î | î |
| Iuml | Ï | ï |
| ETH | Ð | ð |
| Ntilde | Ñ | ñ |
| Ograve | Ò | ò |
| Oacute | Ó | ó |
| Ocirc | Ô | ô |
| Otilde | Õ | õ |
| Ouml | Ö | ö |
| Oslash | Ø | ø |
| Ugrave | Ù | ù |
| Uacute | Ú | ú |
| Ucirc | Û | û |
| Uuml | Ü | ü |
| Yacute | Ý | ý |
| THORN | Þ | þ |
| Yuml | Ÿ | ÿ |
| ~OElig | Œ | œ |
| Scaron | Š | š |
| szlig | ß | |
[img[http://creativecommons.org/images/public/somerights20.png][http://creativecommons.org/licenses/by/2.5/]]
This work is licensed under a [[Creative Commons Attribution 2.5 License|http://creativecommons.org/licenses/by/2.5/]]
Like life, the [[plugins|PaulsPlugins]] in this TiddlyWiki come with no guarantees, use at your own risk.
----
Also available here is code contributed by the following people:
TiddlyWiki is Copyright (c) [[Osmosoft Limited|http://www.osmosoft.com]] 2004-2006 and released under the BSD license (available in the source)
<html><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Work rdf:about=""><license rdf:resource="http://creativecommons.org/licenses/by/2.5/" /><dc:type rdf:resource="http://purl.org/dc/dcmitype/InteractiveResource" /></Work><License rdf:about="http://creativecommons.org/licenses/by/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/></License></rdf:RDF> --></html>
/***
|''Name:''|ListSearchPlugin |
|''Version:''|$Revision: 2 $ |
|''Source:''|http://thePettersons.org/tiddlywiki.html#ListWithTagsPlugin |
|''Author:''|[[Paul Petterson]] |
|''Type:''|List Macro Extension |
|''Requires:''|TiddlyWiki 2.0.0 or higher |
!Description
Extends the TiddlyWiki ''list'' macro by adding the capability to list tiddlers that have a word or phrase in them.
!Syntax
* {{{<<list search foo>>}}}
* {{{<<list search "and or">>}}}
!Sample Output
* {{{<<list search paul>>}}}
<<list search paul>>
!Revision history
$History: ListSearchPlugin.js $
*
* ***************** Version 2 *****************
* User: paulpet Date: 2/25/06 Time: 7:33p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* ported to TW 2.0
*
* ***************** Version 1 *****************
* User: paulpet Date: 2/24/06 Time: 1:40p
* Created in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
v0.0.1 - October 19th 2005 - oneliner 'lookie this' release.
!Code
***/
//{{{
config.macros.list.search = {
handler: function(params) {
return store.search( params[1], "title", "excludeSearch");
}}
//}}}
/***
This plugin is released under the [[Creative Commons Attribution 2.5 License|http://creativecommons.org/licenses/by/2.5/]]
***/
/***
|''Name:''|ListWithTagPlugin |
|''Version:''|$Revision: 2 $ |
|''Source:''|http://thePettersons.org/tiddlywiki.html#ListWithTagPlugin |
|''Author:''|[[Paul Petterson]] |
|''Type:''|List Macro Extension |
|''Requires:''|TiddlyWiki 1.2.32 or higher |
!Description
Extends the TiddlyWiki ''list'' macro by adding the capability to list all tiddlers with a given tag.
!Syntax
{{{<<list withTag systemConfig>>}}}
!Sample Output
<<list withTag systemConfig>>
!Known issues
!Notes
!Revision history
$History: ListWithTagPlugin.js $
*
* ***************** Version 2 *****************
* User: paulpet Date: 2/22/06 Time: 11:10a
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
!Code
***/
//{{{
config.macros.list.withTag = {
handler: function(params) {
return store.getTaggedTiddlers(params[1]);
}}
//}}}
/***
This plugin is released under the [[Creative Commons Attribution 2.5 License|http://creativecommons.org/licenses/by/2.5/]]
***/
/***
|''Name:''|ListWithTagsPlugin |
|''Version:''|$Revision: 7 $ |
|''Source:''|http://thePettersons.org/tiddlywiki.html#ListWithTagsPlugin |
|''Author:''|[[Paul Petterson]] |
|''Type:''|List Macro Extension |
|''Requires:''|TiddlyWiki 1.2.32 or higher |
!Description
Extends the TiddlyWiki ''list'' macro by adding the capability to list tiddlers that have a tag, a set of tags, or a complex criteria of tags. You can use tags, AND, OR, NOT (or && for AND, || for OR, and ! for NOT) as well as paranthese when building your expression.
!Syntax
* {{{<<list withTags Projects and Todo and not done>>}}}
* {{{<<list withTags Tasks and (Urgent or Important)>>}}}
!Sample Output
''Example:'' lists all systemConfig that aren't also tagged with system (tests shorter/longer bug) and aren't also tagged with a big ugly non-existant tag. - so it should list systemTiddlers only!
{{{<<list withTags systemConfig and not OIJDSFOIJSDFOIJSDFOIJSDF and not system>>}}}
<<list withTags systemConfig and not OIJDSFOIJSDFOIJSDFOIJSDF and not system>>
!Known Issues
* Any tags that contain a logical keyword (and, or, not) aren't recognized as tags.
!Revision history
$History: ListWithTagsPlugin.js $
*
* ***************** Version 7 *****************
* User: paulpet Date: 7/08/07 Time: 5:52p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* fixed special character bug & bug when removing some unknown words at
* EOL or BOL from the query
*
* ***************** Version 6 *****************
* User: paulpet Date: 7/03/07 Time: 10:05p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* added twRunner support - fixed documentation
*
* ***************** Version 5 *****************
* User: paulpet Date: 7/03/07 Time: 6:21p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* fixed space in non-existant tag (ala: withTags no such tag and
* systemConfig) - fixed longer/shorter tag bug
*
* ***************** Version 4 *****************
* User: paulpet Date: 7/02/07 Time: 7:14a
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* still broke :(
*
* ***************** Version 3 *****************
* User: paulpet Date: 2/26/06 Time: 1:49p
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
* ported to TW 2.0
*
* ***************** Version 2 *****************
* User: paulpet Date: 2/26/06 Time: 8:47a
* Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
*
!Older Revision History
v1.0.2 November 5th 2005 - fixed bugs arounding handling non-existing tags sometimes screwing up the expression.
v1.0.1 October 12th 2005 - fixed bugs with single char tags, and tags with symbols in them showing up as non-existant tags.
v1.0 October 11th, 2005 - Fixed all known bugs!
<<<
''Fixed:''
* If a tag used in the expression doesn't exist (no tiddlers have that tag) then nothing will get listed.
* If a tag //contains// another tag, then using the shorter tag will list results from the shorter and longer tags. For example if you have the tags ''test'' and ''testing'' and use ''test'' in an expression it will match tiddlers with both ''test'' and ''testing'' tags.
* {{{<<list withTags not systemConfig>>}}} doesn't work but {{{<<list withTags !systemConfig>>}}} does.
<<<
v0.8 first public release (on purpose!)
v0.7.5 fixed some bugs relating to non-existant tags throwing exceptions (simple comment block)
v0.7 first accidental public release (no comment block on that one)
!Unit Tests
See: ListWithTagsTests
<<twRunner ListWithTagsTests>>
!Code
***/
//{{{
version.extensions.ListWithTags = {
major: 1,
minor: 0,
revision: new Number( '$Revision: 7 $'.match( /\$[^\d]+([\d]+)[^\$]*\$/im )[1] ) ,
date: new Date( '$JustDate: 7/08/07 $'.match( /\$[^\d]+([\d\/\/]+)[^\$]*\$/im )[1].replace(/(\d+\/\d+\/)(\d+)/img, "$120$2") )
};
config.macros.list.withTags = {
makeTagRegexp: function() {
// build us a regex of all our tags as a big-old regex that
// OR's the tags together (tag1|tag2|tag3...) in length order
var tgs = store.getTags();
if ( tgs.length == 0 ) return null ;
var tags = tgs.sort( function(a,b) { return (a[0].length < b[0].length) - (a[0].length > b[0].length) ; } );
var tags2 = [];
for( var i=0; i<tags.length; i++ )
tags2[i] = tags[i][0].replace( /\s/g, "\\\\s" );
var exp = "(\\s|^)(" + tags2.join("|") + ")(\\s|$)" ; // use tag with space or BOL/EOL on either side.
exp = exp.replace( /(,[\d]+)/g, "" ) ;
return new RegExp( exp, "ig" );
},
newCleaner: function( params, cond ) {
var tags = config.macros.list.withTags.makeTagRegexp() ;
var step0 = params.slice(1).join(" ");
var step1 = step0.replace( tags, "$1|$3" ) ;
var step2 = step1.replace( /(?:^|\s|\||\(|\))(?:and)(?:\s|\||\(|\))/gi, "|" ) ;
var step2 = step2.replace( /(?:^|\s|\||\(|\))(?:or)(?:\s|\||\(|\))/gi, "|" ) ;
var step2 = step2.replace( /(?:^|\s|\||\(|\))(?:not)(?:\s|\||\(|\))/gi, "|" ) ;
var step3 = "|" + step2.replace( /[\(\)]+|[&\|]{2}|[!]{1}|[\s]+/gi, "|" ) + "|" ;
var step4 = step3.replace( /\|{2,}/g, "|" ) ;
var step5 ;
if (step4.length > 1 ) {
step5 = "(\\(|\\)|\\!|\\s|^)" + step4.substr(1, step4.length - 2) + "(\\(|\\)|\\!|\\s|\\n|$)" ;
} else {
step5 = null ;
}
var removedBadTags = cond.replace( new RegExp( step5, "g" ), "$1false$2" ) ;
return removedBadTags.replace( /(false\s?){2,}(\s?)/gi, "$1$2" );
},
regexpBuilder: function(params) {
var regex = this.makeTagRegexp() ;
// build us string such that an expression that looks like this:
// "tag1 AND tag2 OR NOT tag3" turns into :
// /tag1/.test(...) && /tag2/.test(...) || ! /tag2/.test(...)
var cond = params.slice(1).join(" ");
cond = cond.replace( regex, "$1/$2\\|/.test(tiddlerTags)$3" );
cond = cond.replace( /\sand\s/ig, " && " ) ;
cond = cond.replace( /\sor\s/ig, " || " ) ;
cond = cond.replace( /\s?not\s/ig, " ! " ) ;
return cond ;
},
handler: function(params) {
var results = [];
if ( !params || !params[1] ) return config.macros.list.all.handler( params );
var cond = this.newCleaner( params, this.regexpBuilder( params )) ;
if ( cond == null ) return results ;
// look through the tiddlers, make a string of the tags in the tiddler
// and eval the 'cond' string we made against that string -
// if it's TRUE then the tiddler qualifies!
store.forEachTiddler( function( title, tiddler ) {
var tiddlerTags = (tiddler.tags?tiddler.tags.join("|"):"")+"|" ;
try {
if ( eval( cond ) ) results.push( tiddler );
} catch( e ) {
//if ( this[twd-logger] ) this[twd-logger].logMsg( "exception on eval()=" + e.description ) ;
//displayMessage( "Exception = '" + e + "'" ) ;
}
});
return results.sort(function (a,b) { return (a[0] > b[0]) - (a[0] < b[0]); });
}}
//}}}
/***
This plugin is released under the [[Creative Commons Attribution 2.5 License|http://creativecommons.org/licenses/by/2.5/]]
***/
/***
| !Tests Round 1 |
| !not first |
|{{{<<list withTags not systemConfig>>}}} |
|<<dumpCondition withTags not systemConfig>> |
| !not nontag first |
|{{{<<list withTags not notatag>>}}} |
|<<dumpCondition withTags not notatag>> |
| !tag vs subtag |
|{{{<<list withTags systemConfig and not system>>}}} |
|<<dumpCondition withTags systemConfig and not system>> |
| !@symbols |
|{{{<<list withTags @Call and not Complete>>}}} |
|<<dumpCondition withTags @Call and not Complete>> |
| !nontags |
|{{{<<list withTags notatag and not Complete>>}}} |
|<<dumpCondition withTags notatag and not Complete>> |
| !paranthese #1 |
|{{{<<list withTags (@Call and not Complete)>>}}} |
|<<dumpCondition withTags (@Call and not Complete)>> |
| !paranthese #2 |
|{{{<<list withTags @Call and (not Complete)>>}}} |
|<<dumpCondition withTags @Call and (not Complete)>> |
| !paranthese #3 |
|{{{<<list withTags (@Call) and not (Complete)>>}}} |
|<<dumpCondition withTags (@Call) and not (Complete)>> |
| !paranthese & nontag #1 |
|{{{<<list withTags (notatag and not Complete)>>}}} |
|<<dumpCondition withTags (notatag and not Complete)>> |
| !paranthese & nontag #2 |
|{{{<<list withTags @Call and (not notatag)>>}}} |
|<<dumpCondition withTags @Call and (not notatag)>> |
| !paranthese & nontag #3 |
|{{{<<list withTags (notatag) and not (Complete)>>}}} |
|<<dumpCondition withTags (notatag) and not (Complete)>> |
| !spaces in tags |
|{{{<<list withTags My Projects>>}}} |
|<<dumpCondition withTags My Projects>> |
| !spaces in non-tags |
|{{{<<list withTags Big Dog>>}}} |
|<<dumpCondition withTags Big Dog>> |
| !Honken Big'un |
|{{{<<list withTags GTDPluginSampleOutput and ( (!@Agenda) and (!@Call) and (!@Computer) and (!@Errand) and (!@Home) and (!@Someday) and (!@Waiting) and (!@Work) )>>}}} |
|<<dumpCondition withTags GTDPluginSampleOutput and ( (!@Agenda) and (!@Call) and (!@Computer) and (!@Errand) and (!@Home) and (!@Someday) and (!@Waiting) and (!@Work) )>> |
|{{{<<list withTags GTDPluginSampleOutput and ((!@Agenda) and (!@Call) and (!@Computer) and (!@Errand) and (!@Home) and (!@Someday) and (!@Waiting) and (!@Work))>>}}} |
|<<dumpCondition withTags GTDPluginSampleOutput and ((!@Agenda) and (!@Call) and (!@Computer) and (!@Errand) and (!@Home) and (!@Someday) and (!@Waiting) and (!@Work))>> |
|{{{<<list withTags GTDPluginSampleOutput and (!@Agenda and !@Call and !@Computer and !@Errand and !@Home and !@Someday and !@Waiting and !@Work)>>}}} |
|<<dumpCondition withTags GTDPluginSampleOutput and (!@Agenda and !@Call and !@Computer and !@Errand and !@Home and !@Someday and !@Waiting and !@Work)>> |
|{{{<<list withTags GTDPluginSampleOutput and not (@Agenda or @Call or @Computer or @Errand or @Home or @Someday or @Waiting or @Work)>>}}} |
|<<dumpCondition withTags GTDPluginSampleOutput and not (@Agenda or @Call or @Computer or @Errand or @Home or @Someday or @Waiting or @Work)>> |
|{{{<<list withTags GTDPluginSampleOutput and not ( @Agenda or @Call or @Computer or @Errand or @Home or @Someday or @Waiting or @Work )>>}}} |
|<<dumpCondition withTags GTDPluginSampleOutput and not ( @Agenda or @Call or @Computer or @Errand or @Home or @Someday or @Waiting or @Work )>> |
!Test Code
***/
//{{{
config.macros.dumpCondition = {
handler: function( place, macroName, params ) {
var cond = params.slice(1).join(" ")
var tags = config.macros.list.withTags.makeTagRegexp().toString() ;
var preClean = config.macros.list.withTags.regexpBuilder( params ) ;
var postClean = config.macros.list.withTags.newCleaner(cond, preClean ) ;
tags=tags.replace(/\|/g, "| ");
var ol = createTiddlyElement( place, "ol", null, null, null ) ;
createTiddlyElement( ol, "li", null, null, "Condition: " + cond ) ;
createTiddlyElement( ol, "li", null, null, "Tags: " + tags ) ;
createTiddlyElement( ol, "li", null, null, "PreClean: " + preClean ) ;
createTiddlyElement( ol, "li", null, null, "PostClean: " + postClean ) ;
// var newCleaner = new RegExp( config.macros.lwtTry.makeCleaner( ol, cond ), "g" ) ;
// var newClean = preClean.replace( newCleaner, "$1false$2" ) ;
// createTiddlyElement( ol, "li", null, null, "NewCleaner: '" + newCleaner + "'" ) ;
// createTiddlyElement( ol, "li", null, null, "NewClean: '" + newClean + "'" ) ;
}
}
//}}}
!List withTags Testing
!!Simple Single Condition Parsing Tests
<<twUnit "single existing tag"
var paramStr = "withTags systemConfig";
var params = paramStr.readMacroParams();
var expected = '/systemConfig\\|/.test(tiddlerTags)' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "single non-existing tag"
var paramStr = "withTags somethingNotATag" ;
var params = paramStr.readMacroParams();
var expected = 'false' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "single quoted non-existing tag"
var paramStr = "withTags [[somethingNotATag]]" ;
var params = paramStr.readMacroParams();
var expected = 'false' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "negated single existing tag"
var paramStr = "withTags not systemConfig" ;
var params = paramStr.readMacroParams();
var expected = ' ! /systemConfig\\|/.test(tiddlerTags)' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "negated single non-existing tag"
var paramStr = "withTags not somethingNotATag" ;
var params = paramStr.readMacroParams();
var expected = ' ! false' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "single non-existing tag with space"
var paramStr = "withTags big dog" ;
var params = paramStr.readMacroParams();
var expected = 'false' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "single non-existing quoted tag with space"
var paramStr = "withTags [[big dog]]" ;
var params = paramStr.readMacroParams();
var expected = 'false' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
!!Two Term Condition Parsing Tests
<<twUnit "two tags AND"
var paramStr = "withTags PaulsPlugins and systemConfig" ;
var params = paramStr.readMacroParams();
var expected = '/PaulsPlugins\\|/.test(tiddlerTags) && /systemConfig\\|/.test(tiddlerTags)' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "two tags NOT AND"
var paramStr = "withTags not PaulsPlugins and systemConfig" ;
var params = paramStr.readMacroParams();
var expected = ' ! /PaulsPlugins\\|/.test(tiddlerTags) && /systemConfig\\|/.test(tiddlerTags)' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "two tags (one doesn't exist) NOT AND"
var paramStr = "withTags not PauliesPlugins and systemConfig" ;
var params = paramStr.readMacroParams();
var expected = ' ! false && /systemConfig\\|/.test(tiddlerTags)' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "two tags (one with space doesn't exist) AND"
var paramStr = "withTags big dog and systemConfig" ;
var params = paramStr.readMacroParams();
var expected = 'false && /systemConfig\\|/.test(tiddlerTags)' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "two non-existant tags (one with space) OR"
var paramStr = "withTags big dog OR blahblah" ;
var params = paramStr.readMacroParams();
var expected = 'false || false' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "two non-existing multi-word tags"
var paramStr = "withTags big dog OR blah blah blah OR yadda yadda yadda blah blah blah" ;
var params = paramStr.readMacroParams();
var expected = 'false || false || false' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
!shorter/longer tag bug
<<twUnit "short parameter longer tag bug"
var paramStr = "withTags system" ;
var params = paramStr.readMacroParams();
var expected = 'false' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "longer parameter shorter tag bug"
var paramStr = "withTags systemConfiguration" ;
var params = paramStr.readMacroParams();
var expected = 'false' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
!! not tag bug
<<twUnit "not tag bug"
var paramStr = "withTags not systemConfig" ;
var params = paramStr.readMacroParams();
var expected = ' ! /systemConfig\\|/.test(tiddlerTags)' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
!! special characters bug
<<twUnit "special characters bug"
var paramStr = "withTags @Work AND NOT something OR @Calls" ;
var params = paramStr.readMacroParams();
var expected = '/@Work\\|/.test(tiddlerTags) && ! false || /@Calls\\|/.test(tiddlerTags)' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "specialized withtags test"
var paramStr = "withTags @Calls OR @Home OR @Work and not Complete and not NA"
var params = paramStr.readMacroParams();
var expected = 'false || false || /@Work\\|/.test(tiddlerTags) && ! false && ! false' ;
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
<<twUnit "my projects bug?"
var paramStr = "withTags My Projects"
var params = paramStr.readMacroParams();
var expected = '/My Projects\\|/.test(tiddlerTags)';
var rx = config.macros.list.withTags.regexpBuilder( params );
var actual = config.macros.list.withTags.newCleaner( params , rx );
this.AssertSame( expected, actual, "Parse Failure." );
>>
* [[Home|PaulsNotepad]]
* [[Dashboard]]
* <<tag [[My Projects]]>>
* <<tag Context>>
* [[Journal]]
* [[Sandbox]]
* PaulsPlugins
* WorkInProgress
* <<newTiddler>>
* <<newJournal "DD MMM YYYY" Journal>>
* v<<version>>
|>|>| !Math |
| !Symbol | !Character | !Description |
| deg | ° |degree sign |
| plusmn | ± |plus or minus sign |
| times | × |multiplication sign |
| divide | ÷ |division sign |
| lt | < |less-than sign |
| gt | > |greater-than sign |
| lang | ⟨ |left angle bracket |
| rang | ⟩ |right angle bracket |
| not | ¬ |not sign |
| sup1 | ¹ |superscript one |
| sup2 | ² |superscript two |
| sup3 | ³ |superscript three |
| middot | · |middle dot |
| frac14 | ¼ |one quarter |
| frac12 | ½ |one half |
| frac34 | ¾ |three quarters |
| permil | ‰ |per mille sign |
| fnof | ƒ |latin small f with hook (function) |
| prime | ′ |prime / minutes / feet |
| Prime | ″ |double prime / seconds / inches |
| frasl | ⁄ |fraction slash |
| weierp | ℘ |script capital P |
| image | ℑ |bold I / imaginary part |
| real | ℜ |bold R / real part |
| alefsym | ℵ |first transfinite cardinal |
| micro | µ |micro sign |
| forall | ∀ |for all |
| part | ∂ |partial differential |
| exist | ∃ |there exists |
| empty | ∅ |empty set / diameter |
| nabla | ∇ |backward difference |
| isin | ∈ |element of |
| notin | ∉ |not an element of |
| ni | ∋ |contains as member |
| prod | ∏ |product sign |
| sum | ∑ |n-ary sumation |
| minus | − |minus sign |
| lowast | ∗ |asterisk operator |
| radic | √ |square root / radical |
| prop | ∝ |proportional to |
| infin | ∞ |infinity |
| ang | ∠ |angle |
| and | ∧ |logical and |
| or | ∨ |logical or |
| cap | ∩ |intersection |
| cup | ∪ |union |
| int | ∫ |integral |
| there4 | ∴ |therefore |
| sim | ∼ |similar to |
| cong | ≅ |approximately equal to |
| asymp | ≈ |almost equal to |
| ne | ≠ |not equal to |
| equiv | ≡ |identical to |
| le | ≤ |less-than or equal to |
| ge | ≥ |greater-than or equal to |
| sub | ⊂ |subset of |
| sup | ⊃ |superset of |
| nsub | ⊄ |not a subset of |
| sube | ⊆ |subset of or equal to |
| supe | ⊇ |superset of or equal to |
| oplus | ⊕ |direct sum |
| otimes | ⊗ |vector product |
| perp | ⊥ |orthogonal to / perpendicular |
| sdot | ⋅ |dot operator |
Using this you click on a special "bookmark" then you can move your mouse over any element and see details on it, its parents and children. You can also modify your page's DOM interactively. Very handy for tweaking your StyleSheet.
http://slayeroffice.com/tools/modi/v2.0/modi_help.html
!Activities <<newActivity>>
<<list activities>>
!Projects <<newProject>>
<<list projects>>
/***
|''Name:''|NewerTiddlerPlugin|
|''Version:''|$Revision: 2 $ |
|''Source:''|http://thePettersons.org/tiddlywiki.html#NewerTiddlerPlugin |
|''Author:''|[[Paul Petterson]] |
|''Type:''|Macro Extension |
|''Requires:''|TiddlyWiki 1.2.33 or higher |
!Description
Create a 'new tiddler' button with lots more options! Specify the text to show on the button, the name of the new tiddler (with date macro expansion), one or more tags for the new tiddlers, and what text if any to include in the new tiddler body! Uses a named parameter format, simalar to the reminder plugin.
Also - if the tiddler already exists it won't replace any of it's existing data (like tags).
!Syntax
* {{{<<newerTiddler button:"Inbox" name:"Inbox YYYY/MM/DD" tags:"Journal, inbox" text:"New stuff for today:">>}}}
* {{{<<newerTiddler button:"@Action" name:"Action: what" tags:"@Action" text:"Add project and describe action">>}}}
* {{{<<newerTiddler button:"New Project" name:"Project Name?" tags:"My Projects, My Inbox, Journal" template:"MyTemplate">>}}}
!!Parameters
* name:"Name of Tiddler"
* tags:"Tag1, Tag2, Tag3" - tags for new tiddler, comma seperated //don't use square brackets //({{{[[}}})// for tags!//
* button:"name for button" - the name to display instead of "new tiddler"
* body:"what to put in the tiddler body"
* template:"Name of a tiddler containing the text to use as the body of the new tiddler"
''Note:'' if you sepecify both body and template parameters, then template parameter will be used and the body parameter overridden.
!Sample Output
* <<newerTiddler button:"Inbox" name:"Inbox YYYY/MM/DD" tags:"Journal inbox" text:"New stuff for today:">>
* <<newerTiddler button:"@Action" name:"Action: what" tags:"@Action" text:"Add project and describe action">>
* <<newerTiddler button:"New Project" name:"Project Name?" tags:"[[My Projects]] [[My