tiddlywiki_cp 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. data/COPYING +674 -0
  2. data/History.txt +4 -0
  3. data/Manifest.txt +68 -0
  4. data/README.txt +3 -0
  5. data/Rakefile +123 -0
  6. data/bin/tiddlywiki_cp +13 -0
  7. data/lib/tiddlywiki_cp/converters.rb +36 -0
  8. data/lib/tiddlywiki_cp/file2file.rb +32 -0
  9. data/lib/tiddlywiki_cp/file2tiddler.rb +42 -0
  10. data/lib/tiddlywiki_cp/r4tw.rb +763 -0
  11. data/lib/tiddlywiki_cp/tiddler2directory.rb +27 -0
  12. data/lib/tiddlywiki_cp/tiddler2file.rb +41 -0
  13. data/lib/tiddlywiki_cp/tiddler2tiddlywiki.rb +29 -0
  14. data/lib/tiddlywiki_cp/tiddler_css.rb +39 -0
  15. data/lib/tiddlywiki_cp/tiddler_html.rb +39 -0
  16. data/lib/tiddlywiki_cp/tiddler_js.rb +39 -0
  17. data/lib/tiddlywiki_cp/tiddlywiki2file.rb +29 -0
  18. data/lib/tiddlywiki_cp/version.rb +24 -0
  19. data/lib/tiddlywiki_cp.rb +378 -0
  20. data/scripts/txt2html +67 -0
  21. data/setup.rb +1585 -0
  22. data/test/content/a +0 -0
  23. data/test/content/a.div +0 -0
  24. data/test/content/b +0 -0
  25. data/test/content/e +3 -0
  26. data/test/content/e.div +1 -0
  27. data/test/content/html_entities.html +6 -0
  28. data/test/content/test_fetch.html +6 -0
  29. data/test/content/universe.html +10522 -0
  30. data/test/r4tw/addtag.rb +93 -0
  31. data/test/r4tw/all.rb +29 -0
  32. data/test/r4tw/createfrom.rb +62 -0
  33. data/test/r4tw/empties/2.1.3.html +7087 -0
  34. data/test/r4tw/empties/2.2.0.beta5.html +8726 -0
  35. data/test/r4tw/fromremote.rb +19 -0
  36. data/test/r4tw/fromurl.rb +28 -0
  37. data/test/r4tw/shadows.rb +27 -0
  38. data/test/r4tw/tiddler.rb +70 -0
  39. data/test/r4tw/tiddlerfromurl.rb +23 -0
  40. data/test/r4tw/tiddlywiki.rb +66 -0
  41. data/test/r4tw/utils.rb +55 -0
  42. data/test/r4tw/withcontent/2.2.0.beta5.html +8739 -0
  43. data/test/r4tw/withcontent/22b5index.html +13523 -0
  44. data/test/r4tw/withcontent/empty2.html +7084 -0
  45. data/test/r4tw/withcontent/nothing.js +1 -0
  46. data/test/r4tw/write_all_tiddlers_to.rb +62 -0
  47. data/test/test_all.rb +8 -0
  48. data/test/test_helper.rb +36 -0
  49. data/test/test_tiddler_css.rb +55 -0
  50. data/test/test_tiddler_html.rb +54 -0
  51. data/test/test_tiddler_js.rb +56 -0
  52. data/test/test_tiddlywiki_cp.rb +341 -0
  53. data/website/files/DefaultTiddlers.tiddler +2 -0
  54. data/website/files/DefaultTiddlers.tiddler.div +1 -0
  55. data/website/files/Introduction.tiddler +12 -0
  56. data/website/files/Introduction.tiddler.div +1 -0
  57. data/website/files/MainMenu.tiddler +1 -0
  58. data/website/files/MainMenu.tiddler.div +1 -0
  59. data/website/files/SiteSubtitle.tiddler +1 -0
  60. data/website/files/SiteSubtitle.tiddler.div +1 -0
  61. data/website/files/SiteTitle.tiddler +1 -0
  62. data/website/files/SiteTitle.tiddler.div +1 -0
  63. data/website/files/Usage.tiddler +55 -0
  64. data/website/files/Usage.tiddler.div +1 -0
  65. data/website/files/WebDAVSavingPlugin.js +234 -0
  66. data/website/files/WebDAVSavingPlugin.js.div +1 -0
  67. data/website/index.html +9144 -0
  68. data/website/index.xml +336 -0
  69. metadata +116 -0
data/website/index.xml ADDED
@@ -0,0 +1,336 @@
1
+ <?xml version="1.0"?>
2
+ <rss version="2.0">
3
+ <channel>
4
+ <title>tiddlywiki_cp</title>
5
+ <link>http://www.tiddlywiki.com/</link>
6
+ <description>copy tiddlers to files and vice versa</description>
7
+ <language>en-us</language>
8
+ <copyright>Copyright 2007 loic</copyright>
9
+ <pubDate>Sat, 21 Jul 2007 16:48:05 GMT</pubDate>
10
+ <lastBuildDate>Sat, 21 Jul 2007 16:48:05 GMT</lastBuildDate>
11
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
12
+ <generator>TiddlyWiki 2.2.4</generator>
13
+ <item>
14
+ <title>Introduction</title>
15
+ <description>a ruby gem (&lt;a target=&quot;_blank&quot; title=&quot;External link to http://rubyforge.org/projects/tiddlywikicp/&quot; href=&quot;http://rubyforge.org/projects/tiddlywikicp/&quot; class=&quot;externalLink&quot;&gt;http://rubyforge.org/projects/tiddlywikicp/&lt;/a&gt;) providing a library and a command line interface to copy &lt;a target=&quot;_blank&quot; title=&quot;External link to http://tiddlywiki.com/&quot; href=&quot;http://tiddlywiki.com/&quot; class=&quot;externalLink&quot;&gt;tiddlywiki&lt;/a&gt; tiddlers to files and vice versa.&lt;br&gt;&lt;br&gt;Development is discussed at irc.freenode.net#tiddlywiki &lt;br&gt;&lt;br&gt;This tiddlywiki was created using the following commands:&lt;br&gt;&lt;pre&gt;tiddlywiki_cp 'http://tiddlylab.bidix.info/#WebDAVSavingPlugin' website/index.html
16
+ tiddlywiki_cp -a website/index.html website/files
17
+ ( echo '{{''{' ; RUBYLIB=lib ruby bin/tiddlywiki_cp --help ; echo '}}''}' ) &amp;gt; website/files/Usage
18
+ tiddlywiki_cp -a website/files website/index.html
19
+ &lt;/pre&gt;Loic Dachary &amp;lt;&lt;a target=&quot;_blank&quot; title=&quot;External link to mailto:loic@dachary.org&quot; href=&quot;mailto:loic@dachary.org&quot; class=&quot;externalLink&quot;&gt;mailto:loic@dachary.org&lt;/a&gt;&amp;gt;&lt;br&gt;</description>
20
+ <link>http://www.tiddlywiki.com/#Introduction</link>
21
+ <pubDate>Sat, 21 Jul 2007 16:47:55 GMT</pubDate>
22
+ </item>
23
+ <item>
24
+ <title>DefaultTiddlers</title>
25
+ <description>Introduction&lt;br&gt;Usage</description>
26
+ <link>http://www.tiddlywiki.com/#DefaultTiddlers</link>
27
+ <pubDate>Sat, 21 Jul 2007 16:43:20 GMT</pubDate>
28
+ </item>
29
+ <item>
30
+ <title>SiteTitle</title>
31
+ <description>tiddlywiki_cp</description>
32
+ <link>http://www.tiddlywiki.com/#SiteTitle</link>
33
+ <pubDate>Sat, 21 Jul 2007 16:23:00 GMT</pubDate>
34
+ </item>
35
+ <item>
36
+ <title>Usage</title>
37
+ <description>&lt;pre&gt;Usage: tiddlywiki_cp [options] FROM [FROM ...] TO|-
38
+
39
+ -r, --[no-]recursive recurse into directories and tiddlywikies
40
+ -t, --[no-]times preserve modification time
41
+ -a, --all implies -rt
42
+ -i, --include REGEX all files,directories or tiddlers must match regex.
43
+ If specified multiple times,
44
+ must match at least one of the regex.
45
+ Includes are tested after excludes.
46
+ --exclude REGEX all files,directories or tiddlers must NOT match regex.
47
+ If specified multiple times,
48
+ exclude if matches at least one of the regex.
49
+ Includes are tested after excludes.
50
+ -v, --[no-]verbose run verbosely
51
+ -n, --[no-]dry-run show what would have been transferred
52
+ --version show version
53
+ --help show command usage
54
+
55
+ Examples:
56
+
57
+ mkdir /tmp/a ; tiddlywiki_cp -a http://tiddlywiki.com/index.html /tmp/a
58
+ copies index.html tiddlers in separate files and preserve times.
59
+ For each tiddler, a .div file contains the meta information.
60
+ The files are named after their content:
61
+ /tmp/a/HelloThere.tiddler
62
+ /tmp/a/HelloThere.tiddler.div
63
+ /tmp/a/Plugin.js
64
+ /tmp/a/Plugin.js.div
65
+ /tmp/a/OwnStyle.css
66
+ /tmp/a/OwnStyle.css.div
67
+ ...
68
+
69
+ tiddlywiki_cp 'http://tiddlylab.bidix.info/#WebDAVSavingPlugin' tiddlywiki.html
70
+ copies the WebDAVSavingPlugin tiddler in the existing tiddlywiki.html
71
+
72
+ tiddlywiki_cp http://tiddlywiki.com/index.html /tmp/i.html
73
+ copies to a local file
74
+
75
+ tiddlywiki_cp -t myplugin.js tiddlywiki.html
76
+ copies the tiddler in the existing tiddlywiki.html tiddlywiki
77
+ and use file system modification time
78
+
79
+ tiddlywiki_cp 'http://tiddlylab.bidix.info/#WebDAVSavingPlugin' WebDAVSavingPlugin.js
80
+ get a local copy of the WebDAVSavingPlugin tiddler
81
+
82
+ mkdir A ; tiddlywiki_cp -a --include 'WebDAV' --include 'RSS' 'http://tiddlylab.bidix.info/' A
83
+ copy all tiddlers with WebDAV or RSS in the url
84
+
85
+ mkdir A ; tiddlywiki_cp -a --exclude 'SEX' 'http://tiddlylab.bidix.info/' A
86
+ copy all tiddlers except those with SEX in the url
87
+
88
+ tiddlywiki_cp -a A B C tiddlywiki.html
89
+ copy all tiddlers found in the A B and C directories to tiddlywiki.html
90
+ &lt;/pre&gt;</description>
91
+ <link>http://www.tiddlywiki.com/#Usage</link>
92
+ <pubDate>Sat, 21 Jul 2007 16:23:00 GMT</pubDate>
93
+ </item>
94
+ <item>
95
+ <title>SiteSubtitle</title>
96
+ <description>copy tiddlers to files and vice versa</description>
97
+ <link>http://www.tiddlywiki.com/#SiteSubtitle</link>
98
+ <pubDate>Sat, 21 Jul 2007 16:23:00 GMT</pubDate>
99
+ </item>
100
+ <item>
101
+ <title>MainMenu</title>
102
+ <description>&lt;a tiddlylink=&quot;Usage&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to http://www.tiddlywiki.com/#Usage&quot; href=&quot;http://www.tiddlywiki.com/#Usage&quot; class=&quot;externalLink&quot;&gt;Usage&lt;/a&gt;</description>
103
+ <link>http://www.tiddlywiki.com/#MainMenu</link>
104
+ <pubDate>Sat, 21 Jul 2007 16:21:00 GMT</pubDate>
105
+ </item>
106
+ <item>
107
+ <title>WebDAVSavingPlugin</title>
108
+ <description>&lt;table class=&quot;twtable&quot;&gt;&lt;tbody&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;&lt;strong&gt;Name:&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;WebDAVSavingPlugin&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Saves on a WebDAV server without the need of any ServerSide script.&lt;br&gt;When TiddlyWiki is accessed over http, this plugin permits to save back to the server, using http PUT.&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;&lt;strong&gt;Version:&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;0.2.1&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td&gt;&lt;strong&gt;Date:&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Apr 21, 2007&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;&lt;strong&gt;Source:&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;a target=&quot;_blank&quot; title=&quot;External link to http://tiddlywiki.bidix.info/#WebDAVSavingPlugin&quot; href=&quot;http://tiddlywiki.bidix.info/#WebDAVSavingPlugin&quot; class=&quot;externalLink&quot;&gt;http://tiddlywiki.bidix.info/#WebDAVSavingPlugin&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td&gt;&lt;strong&gt;Author:&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;BidiX (BidiX (at) bidix (dot) info)&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;&lt;strong&gt;License:&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;a target=&quot;_blank&quot; title=&quot;External link to http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D &quot; href=&quot;http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D%20&quot; class=&quot;externalLink&quot;&gt;BSD open source license&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td&gt;&lt;strong&gt;CoreVersion:&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;2.2.0 (Beta 5)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;pre&gt;version.extensions.WebDAVSavingPlugin = {
109
+ major: 0, minor: 2, revision: 1,
110
+ date: new Date(&quot;Apr 21, 2007&quot;),
111
+ source: 'http://tiddlywiki.bidix.info/#WebDAVSavingPlugin',
112
+ author: 'BidiX (BidiX (at) bidix (dot) info',
113
+ license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
114
+ coreVersion: '2.2.0 (Beta 5)'
115
+ };
116
+
117
+ if (!window.bidix) window.bidix = {};
118
+ bidix.WebDAVSaving = {
119
+ orig_saveChanges: saveChanges,
120
+ defaultFilename: 'index.html',
121
+ messages: {
122
+ loadOriginalHttpDavError: &quot;Original file can't be loaded&quot;,
123
+ optionsMethodError: &quot;The OPTIONS method can't be used on this ressource : %0&quot;,
124
+ webDavNotEnabled: &quot;WebDAV is not enabled on this ressource : %0&quot;,
125
+ notHTTPUrlError: &quot;WebDAV saving can be used for http viewed TiddlyWiki only&quot;,
126
+ aboutToSaveOnHttpDav: 'About to save on %0 ...' ,
127
+ folderCreated: &quot;Remote folder '%0' created&quot;
128
+ }
129
+ };
130
+
131
+ // Save this tiddlywiki with the pending changes
132
+ saveChanges = function(onlyIfDirty,tiddlers)
133
+ {
134
+ var originalPath = document.location.toString();
135
+ if (originalPath.substr(0,5) == &quot;file:&quot;)
136
+ return bidix.WebDAVSaving.orig_saveChanges(onlyIfDirty,tiddlers);
137
+ else
138
+ return bidix.WebDAVSaving.saveChanges(onlyIfDirty,tiddlers);
139
+ }
140
+
141
+ bidix.WebDAVSaving.saveChanges = function(onlyIfDirty,tiddlers)
142
+ {
143
+ var callback = function(status,params,original,url,xhr) {
144
+ url = (url.indexOf(&quot;nocache=&quot;) &amp;lt; 0 ? url : url.substring(0,url.indexOf(&quot;nocache=&quot;)-1));
145
+ if (!status)
146
+ displayMessage(bidix.WebDAVSaving.messages.optionsMethodError.format([url]));
147
+ else {
148
+ if (!xhr.getResponseHeader(&quot;DAV&quot;))
149
+ alert(bidix.WebDAVSaving.messages.webDavNotEnabled.format([url]));
150
+ else
151
+ bidix.WebDAVSaving.doSaveChanges();
152
+ }
153
+ }
154
+ if(onlyIfDirty &amp;amp;&amp;amp; !store.isDirty())
155
+ return;
156
+ clearMessage();
157
+ var originalPath = document.location.toString();
158
+ // Check we were loaded from a HTTP or HTTPS URL
159
+ if(originalPath.substr(0,4) != &quot;http&quot;) {
160
+ alert(bidix.WebDAVSaving.messages.notHTTPUrlError);
161
+ return;
162
+ }
163
+ // is the server WebDAV enabled ?
164
+ var r = doHttp(&quot;OPTIONS&quot;,originalPath,null,null,null,null,callback,null,null);
165
+ if (typeof r == &quot;string&quot;)
166
+ alert(r);
167
+ }
168
+
169
+ bidix.WebDAVSaving.doSaveChanges = function()
170
+ {
171
+ var callback = function(status,params,original,url,xhr) {
172
+ if (!status) {
173
+ alert(config.messages.loadOriginalHttpDavError);
174
+ return;
175
+ }
176
+ url = (url.indexOf(&quot;nocache=&quot;) &amp;lt; 0 ? url : url.substring(0,url.indexOf(&quot;nocache=&quot;)-1));
177
+ // Locate the storeArea div's
178
+ var posDiv = locateStoreArea(original);
179
+ if((posDiv[0] == -1) || (posDiv[1] == -1)) {
180
+ alert(config.messages.invalidFileError.format([localPath]));
181
+ return;
182
+ }
183
+ bidix.WebDAVSaving.mkbackupfolder(null,null,params,original,posDiv);
184
+ };
185
+ // get original
186
+ var originalPath = document.location.toString();
187
+ if (originalPath.charAt(originalPath.length-1) == &quot;/&quot;)
188
+ originalPath = originalPath + bidix.WebDAVSaving.defaultFilename;
189
+ displayMessage(bidix.WebDAVSaving.messages.aboutToSaveOnHttpDav.format([originalPath]));
190
+ doHttp(&quot;GET&quot;,originalPath,null,null,null,null,callback,originalPath,null);
191
+ };
192
+
193
+ bidix.WebDAVSaving.mkbackupfolder = function(root,dirs,url,original,posDiv) {
194
+ if (!root || !dirs) {
195
+ root = bidix.dirname(url);
196
+ if (config.options.txtBackupFolder == &quot;&quot;)
197
+ dirs = null;
198
+ else
199
+ dirs = config.options.txtBackupFolder.split('/');
200
+ }
201
+ if (config.options.chkSaveBackups &amp;amp;&amp;amp; dirs &amp;amp;&amp;amp; (dirs.length &amp;gt; 0))
202
+ bidix.WebDAVSaving.mkdir(root,dirs.shift(),dirs,url,original,posDiv);
203
+ else
204
+ bidix.WebDAVSaving.saveBackup(url,original,posDiv);
205
+ };
206
+
207
+ bidix.WebDAVSaving.saveBackup = function(url,original,posDiv)
208
+ {
209
+ var callback = function(status,params,responseText,url,xhr) {
210
+ if (!status) {
211
+ alert(config.messages.backupFailed);
212
+ return;
213
+ }
214
+ url = (url.indexOf(&quot;nocache=&quot;) &amp;lt; 0 ? url : url.substring(0,url.indexOf(&quot;nocache=&quot;)-1));
215
+ displayMessage(config.messages.backupSaved,url);
216
+ bidix.WebDAVSaving.saveRss(params[0],params[1],params[2]);
217
+ };
218
+ if(config.options.chkSaveBackups) {
219
+ var backupPath = getBackupPath(url);
220
+ bidix.httpPut(backupPath,original,callback,Array(url,original,posDiv));
221
+ } else {
222
+ bidix.WebDAVSaving.saveRss(url,original,posDiv);
223
+ }
224
+ }
225
+
226
+ bidix.WebDAVSaving.saveRss = function(url,original,posDiv)
227
+ {
228
+ var callback = function(status,params,responseText,url,xhr) {
229
+ if (!status) {
230
+ alert(config.messages.rssFailed);
231
+ return;
232
+ }
233
+ url = (url.indexOf(&quot;nocache=&quot;) &amp;lt; 0 ? url : url.substring(0,url.indexOf(&quot;nocache=&quot;)-1));
234
+ displayMessage(config.messages.rssSaved,url);
235
+ bidix.WebDAVSaving.saveEmpty(params[0],params[1],params[2]);
236
+ };
237
+ if(config.options.chkGenerateAnRssFeed) {
238
+ var rssPath = url.substr(0,url.lastIndexOf(&quot;.&quot;)) + &quot;.xml&quot;;
239
+ bidix.httpPut(rssPath,convertUnicodeToUTF8(generateRss()),callback,Array(url,original,posDiv));
240
+ } else {
241
+ bidix.WebDAVSaving.saveEmpty(url,original,posDiv);
242
+ }
243
+ }
244
+
245
+ bidix.WebDAVSaving.saveEmpty = function(url,original,posDiv)
246
+ {
247
+ var callback = function(status,params,responseText,url,xhr) {
248
+ if (!status) {
249
+ alert(config.messages.emptyFailed);
250
+ return;
251
+ }
252
+ url = (url.indexOf(&quot;nocache=&quot;) &amp;lt; 0 ? url : url.substring(0,url.indexOf(&quot;nocache=&quot;)-1));
253
+ displayMessage(config.messages.emptySaved,url);
254
+ bidix.WebDAVSaving.saveMain(params[0],params[1],params[2]);
255
+ };
256
+ if(config.options.chkSaveEmptyTemplate) {
257
+ var emptyPath,p;
258
+ if((p = url.lastIndexOf(&quot;/&quot;)) != -1)
259
+ emptyPath = url.substr(0,p) + &quot;/empty.html&quot;;
260
+ else
261
+ emptyPath = url + &quot;.empty.html&quot;;
262
+ var empty = original.substr(0,posDiv[0] + startSaveArea.length) + original.substr(posDiv[1]);
263
+ bidix.httpPut(emptyPath,empty,callback,Array(url,original,posDiv));
264
+ } else {
265
+ bidix.WebDAVSaving.saveMain(url,original,posDiv);
266
+ }
267
+ }
268
+
269
+ bidix.WebDAVSaving.saveMain = function(url,original,posDiv)
270
+ {
271
+ var callback = function(status,params,responseText,url,xhr) {
272
+ if(status) {
273
+ url = (url.indexOf(&quot;nocache=&quot;) &amp;lt; 0 ? url : url.substring(0,url.indexOf(&quot;nocache=&quot;)-1));
274
+ displayMessage(config.messages.mainSaved,url);
275
+ store.setDirty(false);
276
+ } else
277
+ alert(config.messages.mainFailed);
278
+ };
279
+ // Save new file
280
+ var revised = updateOriginal(original,posDiv);
281
+ bidix.httpPut(url,revised,callback,null);
282
+ }
283
+
284
+ // asynchronous mkdir
285
+ bidix.WebDAVSaving.mkdir = function(root,dir,dirs,url,original,posDiv) {
286
+ var callback = function(status,params,responseText,url,xhr) {
287
+ url = (url.indexOf(&quot;nocache=&quot;) &amp;lt; 0 ? url : url.substring(0,url.indexOf(&quot;nocache=&quot;)-1));
288
+ if (status == null) {
289
+ alert(&quot;Error in mkdir&quot;);
290
+ return;
291
+ }
292
+ if (xhr.status == httpStatus.ContentCreated) {
293
+ displayMessage(bidix.WebDAVSaving.messages.folderCreated.format([url]),url);
294
+ bidix.WebDAVSaving.mkbackupfolder(url,params[1],params[2],params[3],params[4]);
295
+ } else {
296
+ if (xhr.status == httpStatus.NotFound)
297
+ bidix.http('MKCOL',url,null,callback,params);
298
+ else
299
+ bidix.WebDAVSaving.mkbackupfolder(url,params[1],params[2],params[3],params[4]);
300
+ }
301
+ };
302
+ if (root.charAt(root.length) != '/')
303
+ root = root +'/';
304
+ bidix.http('HEAD',root+dir,null,callback,Array(root,dirs,url,original,posDiv));
305
+ }
306
+
307
+ bidix.httpPut = function(url,data,callback,params)
308
+ {
309
+ return bidix.http(&quot;PUT&quot;,url,data,callback,params);
310
+ }
311
+
312
+ bidix.http = function(type,url,data,callback,params)
313
+ {
314
+ var r = doHttp(type,url,data,null,null,null,callback,params,null);
315
+ if (typeof r == &quot;string&quot;)
316
+ alert(r);
317
+ return r;
318
+ }
319
+
320
+ bidix.dirname = function (filePath) {
321
+ if (!filePath)
322
+ return;
323
+ var lastpos;
324
+ if ((lastpos = filePath.lastIndexOf(&quot;/&quot;)) != -1) {
325
+ return filePath.substring(0, lastpos);
326
+ } else {
327
+ return filePath.substring(0, filePath.lastIndexOf(&quot;\\&quot;));
328
+ }
329
+ };
330
+ &lt;/pre&gt;</description>
331
+ <category>systemConfig</category>
332
+ <link>http://www.tiddlywiki.com/#WebDAVSavingPlugin</link>
333
+ <pubDate>Sat, 21 Apr 2007 22:08:00 GMT</pubDate>
334
+ </item>
335
+ </channel>
336
+ </rss>
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.0
3
+ specification_version: 1
4
+ name: tiddlywiki_cp
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.0.1
7
+ date: 2007-07-21 00:00:00 +02:00
8
+ summary: copy tiddlers to files and vice versa
9
+ require_paths:
10
+ - lib
11
+ email: loic@dachary.org
12
+ homepage: http://tiddlywikicp.rubyforge.org
13
+ rubyforge_project: tiddlywikicp
14
+ description: copy tiddlers to files and vice versa
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - Loic Dachary
31
+ files:
32
+ - COPYING
33
+ - History.txt
34
+ - Manifest.txt
35
+ - README.txt
36
+ - Rakefile
37
+ - bin/tiddlywiki_cp
38
+ - lib/tiddlywiki_cp.rb
39
+ - lib/tiddlywiki_cp/converters.rb
40
+ - lib/tiddlywiki_cp/file2file.rb
41
+ - lib/tiddlywiki_cp/file2tiddler.rb
42
+ - lib/tiddlywiki_cp/r4tw.rb
43
+ - lib/tiddlywiki_cp/tiddler2directory.rb
44
+ - lib/tiddlywiki_cp/tiddler2file.rb
45
+ - lib/tiddlywiki_cp/tiddler2tiddlywiki.rb
46
+ - lib/tiddlywiki_cp/tiddler_css.rb
47
+ - lib/tiddlywiki_cp/tiddler_html.rb
48
+ - lib/tiddlywiki_cp/tiddler_js.rb
49
+ - lib/tiddlywiki_cp/tiddlywiki2file.rb
50
+ - lib/tiddlywiki_cp/version.rb
51
+ - scripts/txt2html
52
+ - setup.rb
53
+ - test/content/a
54
+ - test/content/a.div
55
+ - test/content/b
56
+ - test/content/e
57
+ - test/content/e.div
58
+ - test/content/html_entities.html
59
+ - test/content/test_fetch.html
60
+ - test/content/universe.html
61
+ - test/r4tw/addtag.rb
62
+ - test/r4tw/all.rb
63
+ - test/r4tw/createfrom.rb
64
+ - test/r4tw/empties/2.1.3.html
65
+ - test/r4tw/empties/2.2.0.beta5.html
66
+ - test/r4tw/fromremote.rb
67
+ - test/r4tw/fromurl.rb
68
+ - test/r4tw/shadows.rb
69
+ - test/r4tw/tiddler.rb
70
+ - test/r4tw/tiddlerfromurl.rb
71
+ - test/r4tw/tiddlywiki.rb
72
+ - test/r4tw/utils.rb
73
+ - test/r4tw/withcontent/2.2.0.beta5.html
74
+ - test/r4tw/withcontent/22b5index.html
75
+ - test/r4tw/withcontent/empty2.html
76
+ - test/r4tw/withcontent/nothing.js
77
+ - test/r4tw/write_all_tiddlers_to.rb
78
+ - test/test_all.rb
79
+ - test/test_helper.rb
80
+ - test/test_tiddler_css.rb
81
+ - test/test_tiddler_html.rb
82
+ - test/test_tiddler_js.rb
83
+ - test/test_tiddlywiki_cp.rb
84
+ - website/files/DefaultTiddlers.tiddler
85
+ - website/files/DefaultTiddlers.tiddler.div
86
+ - website/files/Introduction.tiddler
87
+ - website/files/Introduction.tiddler.div
88
+ - website/files/MainMenu.tiddler
89
+ - website/files/MainMenu.tiddler.div
90
+ - website/files/SiteSubtitle.tiddler
91
+ - website/files/SiteSubtitle.tiddler.div
92
+ - website/files/SiteTitle.tiddler
93
+ - website/files/SiteTitle.tiddler.div
94
+ - website/files/Usage.tiddler
95
+ - website/files/Usage.tiddler.div
96
+ - website/files/WebDAVSavingPlugin.js
97
+ - website/files/WebDAVSavingPlugin.js.div
98
+ - website/index.html
99
+ - website/index.xml
100
+ test_files:
101
+ - test/test_all.rb
102
+ rdoc_options:
103
+ - --main
104
+ - README.txt
105
+ extra_rdoc_files:
106
+ - History.txt
107
+ - Manifest.txt
108
+ - README.txt
109
+ executables:
110
+ - tiddlywiki_cp
111
+ extensions: []
112
+
113
+ requirements: []
114
+
115
+ dependencies: []
116
+