1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

remove server fields and calendar macro

This commit is contained in:
buggyj 2014-09-01 23:29:25 +02:00
parent 2299a9f705
commit 7b8de4670c
19 changed files with 0 additions and 245 deletions

View File

@ -1,31 +0,0 @@
created: 20140322080900815
dependents:
description: ckeditor adapter plugin
modified: 20140322080900815
plugin-type: plugin
title: $:/plugins/bj/Calendar
type: application/json
version: 0.0.1
{
"tiddlers": {
"$:/macros/buggyj/Calendar/entry.js": {
"text": "/*\\\ntitle: $:/macros/buggyj/Calendar/entry.js\ntype: application/javascript\nmodule-type: macro\n\n<<diary year month>>\n<<diary year>> - year calendar\n<<diary>> - this month\n\nOptions:$:/macros/diary/options.json\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\nCAL demo\n*/\n\nexports.name = \"calendar\";\n\nexports.params = [\n\t{ name: \"year\" },{ name: \"month\" },{ name: \"opts\" }\n];\n/*\nRun the macro\n*/\n\nexports.run = function(year, month,opts) {\nif (!opts) opts=\"default\";\nvar options = $tw.wiki.getTiddlerData(\"$:/plugins/bj/Calendar/json/config.json\")[opts]||\n\t\t\t\t{lastDayOfWeek:\"6\",formatter:\"\",titlebold:\"\",highlightThisDay:\"\",highlightThisDate:\"\"};\nvar createMonth;\ntry {\n\tcreateMonth = require(options.formatter).createMonth;\n} catch (e) {\n\tcreateMonth= function(mnth,year){\n\t\tvar month=[];\n\t\tfor (var i=1;i < 1+daysInMonth(mnth,year);i++) month[i] = i;\n\t\treturn month;\n\t}\n} \nvar boldtitle=(options.titlebold=='yes')?'!':'';\nvar day_of_week = $tw.config.dateFormats.shortDays;\nvar month_of_year = $tw.config.dateFormats.months; \nvar Calendar = new Date();\nvar thisyear = Calendar.getFullYear(); // year (xxxx)\nvar thismonth = Calendar.getMonth();\t// month (0-11)\nvar thisday = Calendar.getDay(); // day (0-6)\nvar WEEKFIN = parseInt(options.lastDayOfWeek); \nvar MONTHS_IN_YEAR=12;\t\t\t\t\t\n \nvar lf ='\\n';\nvar cal='<div>'+lf+lf; \nvar ayear=thisyear;\nif (!!month) {\n\tif (!!year) {\n\t\tcal+=calendar (month-1,year,options);\n\t} else {\n\t\tcal+=calendar (month-1,thisyear,options);\n\t}\n} else {\n\toptions.seperateYearHeading = 'yes';\n\tcal+=titleOfYear(year); \n\tif (!!year) ayear=year; \n\tfor(var i=0; i<MONTHS_IN_YEAR; i+=2)\n\t\tcal+=splicetable(calendar (i,ayear,options),calendar (i+1,ayear,options));\n}\nreturn cal+lf+lf+'</div>';\n\nfunction calendar (mnth,year,options){\n var month =\tcreateMonth(mnth,year,options);\n var blankdays = (firstDayInMonth(mnth,year)+13-WEEKFIN)%7;\n\treturn titleOfMonth(mnth,year)+createWeekHeading()+\n\t formatAsMonth(month,blankdays);\n}\nfunction titleOfMonth(mth,year) {\n\tif (!!options.seperateYearHeading ) {\n\t\treturn '|>|>|>|'+ centre(boldtitle+ month_of_year[mth]) +'|<|<|<|'+lf;\n\t} else {\n\t\treturn '|>|>|>|'+ centre(boldtitle+ month_of_year[mth] + ' ' + year) +'|<|<|<|'+lf;\n\t}\n}\n\nfunction titleOfYear(year) {\n\t\treturn '|>|>|>|>|>|>|>|'+ centre('!'+year) +'|<|<|<|<|<|<|<|'+lf;\n}\nfunction centre (x){ return ' '+x+' ';}\n\nfunction formatAsMonth(month,blankdays){\t\n\tvar theday,blank=['','|','||','|||','||||','|||||','||||||','|||||||'];\t\n\tvar cal=blank[blankdays];//pad out before first day of month\n\tfor(var i=1; i < month.length;i++){//first '0' month element is not used\n\t\tcal+='|'+month[i];\n\t\ttheday=(i+blankdays-1)%7;\n\t\tif (theday== 6) cal +='|'+lf; \n\t}\n\tcal+=blank[7-theday]+(7-theday>1?lf:'');//pad out rest of week, if no blanks then lf was added in loop\n\treturn cal ;\n}\nfunction createWeekHeading(){\n\t\tvar daystitle=[],weekdays= day_of_week.slice(0);\n\t\t// highlight today's day of week\n\t\tif (options.highlightThisDay=='yes')weekdays[thisday] ='!'+weekdays[thisday];\n\t\tfor (var i=0;i < weekdays.length; i++) daystitle[i] =centre(weekdays[(i+1+WEEKFIN)%7]);\n\t\treturn '|'+daystitle.join('|')+'|'+lf; \n}\nfunction daysInMonth(iMonth, iYear){\n\t\treturn 32 - new Date(iYear, iMonth, 32).getDate();\n\t}\nfunction firstDayInMonth(iMonth, iYear){\n\t\treturn new Date(iYear, iMonth, 1).getDay();\n\t} \nfunction splicetable (a,b) {\n\tvar i,cal='',taba =a.split('\\n'),tabb=b.split('|\\n');\n\tvar limit=(taba.length<tabb.length)?taba.length:tabb.length;//shortest\n\tfor (i=0;i<limit-1;i++) \t\tcal+=taba[i]+tabb[i]+'|'+lf;\t \n\tfor (;i < taba.length-1;i++) \tcal+=taba[i]+\"||||||||\"+lf;\n\tfor (;i < tabb.length-1;i++) \tcal+=\"||||||||\"+tabb[i]+lf;\n\treturn cal;\n}\t\t \n} \n\n})();\n",
"title": "$:/macros/buggyj/Calendar/entry.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/macros/bj/Calendar/journalfmt.js": {
"text": "/*\\\ntitle: $:/macros/bj/Calendar/journalfmt.js\ntype: application/javascript\nmodule-type: global\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\ncalendar demo\n*/\nvar Calendar=new Date();\nvar createMonth= function(mnth,year,options){\n\tvar month=[];\n\tfor (var i=1;i < 1+daysInMonth(mnth,year);i++) month[i] = createDate(i,mnth,year,options);\n\treturn month;\n}\nfunction createDate(i,mnth,year,options){\n\tvar strong='';\n\tvar date=(new Date(year, mnth, i));\n\tif (date.toDateString()===Calendar.toDateString()&&options.highlightThisDate==\"yes\") strong ='!';\n\treturn centre(strong+'[['+i+'|'+date.getDate()+\n\t ' '+$tw.config.dateFormats.months[date.getMonth()]+' '+date.getFullYear()+']]');\n}\nfunction daysInMonth(iMonth, iYear){\n\t\treturn 32 - new Date(iYear, iMonth, 32).getDate();\n\t}\nfunction centre (x){ return ' '+x+' ';}\nexports.createMonth = createMonth;\n})();\n",
"title": "$:/macros/bj/Calendar/journalfmt.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/plugins/bj/Calendar/json/config.json": {
"type": "application/json",
"title": "$:/plugins/bj/Calendar/json/config.json",
"module-type": "library",
"text": "\n{\n\t\"journals\":{\n\t\t\"lastDayOfWeek\":\"1\",\n\t\t\"formatter\":\"$:/macros/bj/Calendar/journalfmt.js\",\n\t\t\"titlebold\":\"no\",\n\t\t\"highlightThisDay\":\"no\",\n\t\t\"highlightThisDate\":\"yes\"\n\t},\n\t\"default\":{\n\t\t\"lastDayOfWeek\":\"2\",\n\t\t\"formatter\":\"\",\n\t\t\"titlebold\":\"yes\",\n\t\t\"highlightThisDay\":\"yes\",\n\t\t\"highlightThisDate\":\"no\"\n\t}\n}\n"
}
}
}

View File

@ -1,19 +1,7 @@
_hash: a671a350dbb8f4917de9ffec36cc184be1fcd69b
created: 20121217004633000
creator: keithb
modified: 20140415164633773
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Basic%20Formatting/1335260:638b0282ddcebd9b6dbdb6f9e51a9f9410c2ad8a"
server.host: http://tiddlywiki.org
server.page.revision: 1335260
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Basic Formatting
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Basic Formatting
type: text/x-tiddlywiki

View File

@ -1,19 +1,7 @@
_hash: 816bced1fe527175bcf3be0fdf7dd2419989ea5e
created: 20110215174227000
creator: pmario
modified: 20140415164659711
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Blockquotes/1335259:2fe415fcc19e5d77f9ae8d000b8d37107c34a8c6"
server.host: http://tiddlywiki.org
server.page.revision: 1335259
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Blockquotes
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Blockquotes
type: text/x-tiddlywiki

View File

@ -1,19 +1,7 @@
_hash: 8e82a50e4e8f727c56f450b0b9a5b935c2d9535f
created: 20130211145116000
creator: tobibeer
modified: 20140415164516606
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/CSS%20Formatting/1335261:a084d915f3bc4e548b5616c5c3e8d8d70712e625"
server.host: http://tiddlywiki.org
server.page.revision: 1335261
server.permissions: read
server.recipe: tiddlywiki_public
server.title: CSS Formatting
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: CSS Formatting
type: text/x-tiddlywiki

View File

@ -1,19 +1,7 @@
_hash: 63711c725b9bd23b197b1569670088ce26dbd898
created: 20130211142734000
creator: tobibeer
modified: 20140901061201603
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Code/1335258:2e39d9422863168f6a71f2b09941cb4261414092"
server.host: http://tiddlywiki.org
server.page.revision: 1335258
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Code
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Code
type: text/x-tiddlywiki

View File

@ -1,19 +1,7 @@
_hash: 78b7216cae18ec47008a6948d404deee68257058
created: 20130213001758000
creator: tobibeer
modified: 20140901061006864
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Comment%20Formatting/1335257:dfac9b4ac6526e0a1625ecf4796601565b189fb7"
server.host: http://tiddlywiki.org
server.page.revision: 1335257
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Comment Formatting
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Comment Formatting
type: text/x-tiddlywiki

View File

@ -1,12 +0,0 @@
created: 20140218170942002
modified: 20140415153433659
title: ExtendableCalendar
type: text/vnd.tiddlywiki
The Calendar macro is configurable via the file [[$:/plugins/bj/Calendar/json/config.json]], and is extendable by plug-in formatter modules, it enable it use with different applications.
!!Default Calendar Format
<<calendar 2014 2>>
!!Calendar Formatter by Journals Extension
<<calendar 2014 "" journals>>

View File

@ -1,19 +1,7 @@
_hash: 32b1f260d97f45ce425e8bcff9a7647972b7a80e
created: 20130204165019000
creator: tobibeer
modified: 20140415164150742
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/HTML%20Entities/1335264:117f829031adc20106ce49a71687b123ec65bb7f"
server.host: http://tiddlywiki.org
server.page.revision: 1335264
server.permissions: read
server.recipe: tiddlywiki_public
server.title: HTML Entities
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: HTML Entities
type: text/x-tiddlywiki

View File

@ -1,18 +1,7 @@
_hash: 1738085855a64048d0d8bb2d3eda1d7f7527e0b5
created: 20130212225913000
creator: tobibeer
modified: 20140415163847476
modifier: andrewstern
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/HTML%20Formatting/1335265:8840437d314e281d82669c312d1129b933760b5a"
server.host: http://tiddlywiki.org
server.page.revision: 1335265
server.permissions: read
server.recipe: tiddlywiki_public
server.title: HTML Formatting
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: HTML Formatting
type: text/x-tiddlywiki

View File

@ -1,19 +1,7 @@
_hash: 53962b59ad3826de5aadf772871de68c230c6a7d
created: 20130211150503000
creator: tobibeer
modified: 20140831113805090
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Headings/1335262:2946827d55b2935db86bfdefab9c8db6a9042fd3"
server.host: http://tiddlywiki.org
server.page.revision: 1335262
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Headings
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Headings
type: text/x-tiddlywiki

View File

@ -1,19 +1,7 @@
_hash: c56cf57df6a5faece40e25bf61e986c6badb0193
created: 20130211150739000
creator: tobibeer
modified: 20140415164242103
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Horizontal%20Rules/1335263:f23eb319f2ed3d3ec848f744a3dbe988f28aca19"
server.host: http://tiddlywiki.org
server.page.revision: 1335263
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Horizontal Rules
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Horizontal Rules
type: text/x-tiddlywiki

View File

@ -1,19 +1,7 @@
_hash: a2a8660d474da9327faeef05b76a1af62ca8155b
created: 20130211151808000
creator: tobibeer
modified: 20140901062342853
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Images/1335266:f72a1a7b1204fff0f413e6873cc55f704bb1b213"
server.host: http://tiddlywiki.org
server.page.revision: 1335266
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Images
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Images
type: text/x-tiddlywiki

View File

@ -1,19 +1,7 @@
_hash: e14e759f83d04b0412db73d1b66b3a64fb07fc83
created: 20130211153646000
creator: tobibeer
modified: 20140415164315536
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Line%20Breaks/1335267:ad5687f1d1741d5e63a783565df6885923752aac"
server.host: http://tiddlywiki.org
server.page.revision: 1335267
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Line Breaks
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Line Breaks
type: text/x-tiddlywiki

View File

@ -1,19 +1,7 @@
_hash: a5a78107a55c570806975b6e35e87dfd0be734c2
created: 20130211154140000
creator: tobibeer
modified: 20140831095524601
modifier: tobibeer
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Links/1078257:0183b2e8bea01e6c5288e6448b8acc87ddd35619"
server.host: http://tiddlywiki.org
server.page.revision: 1078257
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Links
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Links
type: text/x-tiddlywiki

View File

@ -1,20 +1,7 @@
_hash: b6d1718a0af0a2a63318097500958556983bd88d
created: 20120131235950000
creator: sandman619
macro: [[TiddlyWiki Markup]]
modified: 20140415164107038
modifier: tobibeer
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Lists/1076129:4d2b012667f2ca3f082ace3498e736fcb8b3afd6"
server.host: http://tiddlywiki.org
server.page.revision: 1076129
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Lists
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Lists
type: text/x-tiddlywiki

View File

@ -1,18 +1,7 @@
_hash: 0d3b2ef2a0232e9adbc6a5bf3d863ce17e71cb3f
created: 20130205062501000
creator: tobibeer
modified: 20140831153103538
modifier: tobibeer
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Markup/1382679:beaebc99fbe21d8e1007f4e99e2564e8ce51d5f1"
server.host: http://tiddlywiki.org
server.page.revision: 1382679
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Markup
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
title: Markup
type: text/x-tiddlywiki

View File

@ -1,18 +1,7 @@
_hash: 45def774dc01f80083c17e4dc6170000e8c37277
created: 20130213002736000
creator: tobibeer
modified: 20140415163915430
modifier: andrewstern
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Monospaced%20Text/1335271:2940e308e0ee81c6ed021b78cf9a489bb68b4cab"
server.host: http://tiddlywiki.org
server.page.revision: 1335271
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Monospaced Text
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Monospaced Text
type: text/x-tiddlywiki

View File

@ -1,19 +1,7 @@
_hash: 68bc50e6415c23513fafbec11506ae62fe5c8f3b
created: 20130211143136000
creator: tobibeer
modified: 20140415164021461
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Suppressing%20Formatting/1335270:26464606220d84bc638573e59dc71530aa224690"
server.host: http://tiddlywiki.org
server.page.revision: 1335270
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Suppressing Formatting
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Suppressing Formatting
type: text/x-tiddlywiki

View File

@ -1,19 +1,7 @@
_hash: e094b1328d5bc04e2c9fc5b967edc22e1c183729
created: 20130205062438000
creator: tobibeer
modified: 20140901062133767
modifier: andrewstern
more: [[TiddlyWiki Markup]]
server.bag: tiddlywiki_public
server.content-type:
server.etag: "tiddlywiki_public/Tables/1335272:5471c2a5c72db2d46fcbb9091440c4f498f514fd"
server.host: http://tiddlywiki.org
server.page.revision: 1335272
server.permissions: read
server.recipe: tiddlywiki_public
server.title: Tables
server.type: tiddlyweb
server.workspace: bags/tiddlywiki_public
tags: Formatting
title: Tables
type: text/x-tiddlywiki