Soks 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. data/README.txt +5 -4
  2. data/bin/soks-create-wiki.rb +153 -19
  3. data/contrib/easyprompt.rb +58 -0
  4. data/contrib/easyprompt_licence.txt +504 -0
  5. data/contrib/redcloth-2.0.11.rb +3 -1
  6. data/lib/authenticators.rb +18 -2
  7. data/lib/soks-helpers.rb +207 -157
  8. data/lib/soks-model.rb +131 -114
  9. data/lib/soks-servlet.rb +54 -35
  10. data/lib/soks-storage.rb +134 -0
  11. data/lib/soks-upgrade-0.0.2.rb +70 -0
  12. data/lib/soks-utils.rb +129 -19
  13. data/lib/soks-view.rb +136 -62
  14. data/lib/soks.rb +3 -1
  15. data/{template → templates/default}/attachment/logo.png +0 -0
  16. data/templates/default/attachment/logo.tiff +0 -0
  17. data/templates/default/attachment/newpage.js +41 -0
  18. data/templates/default/attachment/print_stylesheet.css +7 -0
  19. data/templates/default/attachment/rss.png +0 -0
  20. data/{template → templates/default}/attachment/stylesheet.css +44 -17
  21. data/templates/default/banned_titles.txt +31 -0
  22. data/templates/default/content/Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20link%20is%20sometimes%20not%20linked.textile +10 -0
  23. data/templates/default/content/Bug%3A%20Symbols%20are%20not%20always%20correctly%20rendered%20in%20html.textile +3 -0
  24. data/templates/default/content/Bug%3A%20Uploads%20are%20not%20password%20protected.textile +3 -0
  25. data/templates/default/content/How%20to%20administrate%20this%20wiki.textile +62 -0
  26. data/templates/default/content/How%20to%20change%20the%20way%20this%20wiki%20looks.textile +30 -0
  27. data/templates/default/content/How%20to%20export%20a%20site%20from%20this%20wiki.textile +60 -0
  28. data/{template → templates/default}/content/How%20to%20hack%20soks.textile +3 -2
  29. data/{template → templates/default}/content/How%20to%20import%20a%20site%20from%20instiki.textile +1 -1
  30. data/templates/default/content/How%20to%20use%20this%20wiki.textile +27 -0
  31. data/templates/default/content/List%20of%20changes.textile +35 -0
  32. data/{template → templates/default}/content/Picture%20of%20a%20pair%20of%20soks.textile +0 -0
  33. data/{template → templates/default}/content/Soks%20Licence.textile +0 -0
  34. data/templates/default/content/home%20page.textile +17 -0
  35. data/templates/default/start.rb +94 -0
  36. data/templates/default/version.txt +1 -0
  37. data/{template → templates/default}/views/Page_content.rhtml +0 -0
  38. data/templates/default/views/Page_edit.rhtml +61 -0
  39. data/templates/default/views/Page_meta.rhtml +40 -0
  40. data/templates/default/views/Page_print.rhtml +6 -0
  41. data/templates/default/views/Page_revisions.rhtml +19 -0
  42. data/templates/default/views/Page_rss.rhtml +55 -0
  43. data/{template → templates/default}/views/Page_search_results.rhtml +1 -1
  44. data/templates/default/views/Page_view.rhtml +4 -0
  45. data/templates/default/views/UploadPage_edit.rhtml +38 -0
  46. data/templates/default/views/frame.rhtml +41 -0
  47. data/templates/default/views/messages.yaml +6 -0
  48. data/templates/instiki/attachment/header_backdrop.png +0 -0
  49. data/templates/instiki/attachment/instiki_style_sheet.css +199 -0
  50. data/templates/instiki/attachment/logo.tiff +0 -0
  51. data/templates/instiki/attachment/logotext.png +0 -0
  52. data/templates/instiki/attachment/newpage.js +41 -0
  53. data/templates/instiki/attachment/rss.png +0 -0
  54. data/templates/instiki/banned_titles.txt +31 -0
  55. data/templates/instiki/content/AutomaticSummary.textile +24 -0
  56. data/templates/instiki/content/How%20to%20export%20a%20site%20from%20this%20wiki.textile +60 -0
  57. data/templates/instiki/content/How%20to%20hack%20soks.textile +61 -0
  58. data/templates/instiki/content/How%20to%20import%20a%20site%20from%20instiki.textile +13 -0
  59. data/{template → templates/instiki}/content/Improving%20the%20style%20of%20this%20wiki.textile +2 -2
  60. data/templates/instiki/content/Known%20bugs.textile +8 -0
  61. data/templates/instiki/content/List%20of%20changes.textile +34 -0
  62. data/templates/instiki/content/Picture%20of%20a%20pair%20of%20soks.textile +1 -0
  63. data/templates/instiki/content/Pointers%20on%20adjusting%20the%20settings.textile +62 -0
  64. data/templates/instiki/content/Pointers%20on%20how%20to%20use%20this%20wiki.textile +27 -0
  65. data/templates/instiki/content/Recent%20Blog%20Entries.textile +3 -0
  66. data/templates/instiki/content/Recent%20Changes%20to%20This%20Site.textile +48 -0
  67. data/templates/instiki/content/Site%20Index.textile +16 -0
  68. data/templates/instiki/content/Soks%20Licence.textile +64 -0
  69. data/{template → templates/instiki}/content/home%20page.textile +9 -4
  70. data/templates/instiki/start.rb +85 -0
  71. data/templates/instiki/version.txt +1 -0
  72. data/templates/instiki/views/Page_content.rhtml +1 -0
  73. data/templates/instiki/views/Page_edit.rhtml +8 -0
  74. data/templates/instiki/views/Page_meta.rhtml +34 -0
  75. data/templates/instiki/views/Page_print.rhtml +6 -0
  76. data/templates/instiki/views/Page_revisions.rhtml +17 -0
  77. data/templates/instiki/views/Page_rss.rhtml +55 -0
  78. data/templates/instiki/views/Page_search_results.rhtml +18 -0
  79. data/templates/instiki/views/Page_view.rhtml +2 -0
  80. data/templates/instiki/views/UploadPage_edit.rhtml +16 -0
  81. data/templates/instiki/views/frame.rhtml +90 -0
  82. data/templates/instiki/views/messages.yaml +6 -0
  83. data/templates/rails/attachment/2colheader.css +77 -0
  84. data/templates/rails/attachment/basics.css +98 -0
  85. data/templates/rails/attachment/header_backdrop.png +0 -0
  86. data/templates/rails/attachment/logo.tiff +0 -0
  87. data/templates/rails/attachment/logotext.png +0 -0
  88. data/templates/rails/attachment/newpage.js +41 -0
  89. data/templates/rails/attachment/rss.png +0 -0
  90. data/templates/rails/banned_titles.txt +31 -0
  91. data/templates/rails/content/AutomaticSummary.textile +24 -0
  92. data/templates/rails/content/How%20to%20export%20a%20site%20from%20this%20wiki.textile +60 -0
  93. data/templates/rails/content/How%20to%20hack%20soks.textile +61 -0
  94. data/templates/rails/content/How%20to%20import%20a%20site%20from%20instiki.textile +13 -0
  95. data/templates/rails/content/Improving%20the%20style%20of%20this%20wiki.textile +30 -0
  96. data/templates/rails/content/Known%20bugs.textile +8 -0
  97. data/templates/rails/content/List%20of%20changes.textile +34 -0
  98. data/templates/rails/content/Picture%20of%20a%20pair%20of%20soks.textile +1 -0
  99. data/templates/rails/content/Pointers%20on%20adjusting%20the%20settings.textile +62 -0
  100. data/templates/rails/content/Pointers%20on%20how%20to%20use%20this%20wiki.textile +27 -0
  101. data/templates/rails/content/Recent%20Blog%20Entries.textile +3 -0
  102. data/templates/rails/content/Recent%20Changes%20to%20This%20Site.textile +48 -0
  103. data/templates/rails/content/Site%20Index.textile +16 -0
  104. data/templates/rails/content/Soks%20Licence.textile +64 -0
  105. data/templates/rails/content/home%20page.textile +23 -0
  106. data/templates/rails/start.rb +85 -0
  107. data/templates/rails/version.txt +1 -0
  108. data/templates/rails/views/Page_content.rhtml +1 -0
  109. data/templates/rails/views/Page_edit.rhtml +61 -0
  110. data/templates/rails/views/Page_meta.rhtml +38 -0
  111. data/templates/rails/views/Page_print.rhtml +6 -0
  112. data/templates/rails/views/Page_revisions.rhtml +19 -0
  113. data/templates/rails/views/Page_rss.rhtml +55 -0
  114. data/templates/rails/views/Page_search_results.rhtml +19 -0
  115. data/templates/rails/views/Page_view.rhtml +3 -0
  116. data/templates/rails/views/UploadPage_edit.rhtml +38 -0
  117. data/templates/rails/views/frame.rhtml +60 -0
  118. data/templates/rails/views/messages.yaml +6 -0
  119. metadata +122 -28
  120. data/template/content/How%20to%20export%20a%20site%20from%20this%20wiki.textile +0 -5
  121. data/template/content/Pointers%20on%20adjusting%20the%20settings.textile +0 -39
  122. data/template/content/Pointers%20on%20how%20to%20use%20this%20wiki.textile +0 -21
  123. data/template/content/Recent%20Changes%20to%20This%20Site.textile +0 -203
  124. data/template/start.rb +0 -74
  125. data/template/views/AttachmentPage_edit.rhtml +0 -36
  126. data/template/views/ImagePage_edit.rhtml +0 -36
  127. data/template/views/Page_edit.rhtml +0 -34
  128. data/template/views/Page_print.rhtml +0 -5
  129. data/template/views/Page_revisions.rhtml +0 -18
  130. data/template/views/Page_rss.rhtml +0 -34
  131. data/template/views/Page_view.rhtml +0 -3
  132. data/template/views/frame.rhtml +0 -34
data/lib/soks.rb CHANGED
@@ -11,9 +11,11 @@ require 'thread'
11
11
  require 'yaml'
12
12
 
13
13
  require 'soks-utils'
14
+ require 'soks-storage'
14
15
  require 'soks-model'
15
16
  require 'soks-view'
16
17
  require 'soks-servlet'
17
18
  require 'soks-helpers'
18
19
 
19
-
20
+ Thread.abort_on_exception = true
21
+ Socket.do_not_reverse_lookup = true
File without changes
@@ -0,0 +1,41 @@
1
+ function trim(str)
2
+ {
3
+ return str.replace(/^\s+/,'').replace(/\s+$/,'');
4
+ }
5
+
6
+ function editSelected()
7
+ {
8
+ if (window.getSelection)
9
+ {
10
+ txt = window.getSelection();
11
+ }
12
+ else if (document.getSelection)
13
+ {
14
+ txt = document.getSelection();
15
+ }
16
+ else if (document.selection)
17
+ {
18
+ txt = document.selection.createRange().text;
19
+ }
20
+ if(!txt){
21
+ void(txt=prompt('Please enter the title of the page you wish to create',''))
22
+ }
23
+ if(txt){
24
+ window.location = '/edit/'+escape(trim(txt))
25
+ }
26
+ }
27
+
28
+ function hotkey( event )
29
+ {
30
+ event = (event) ? event : ((window.event) ? event : null);
31
+ if (event)
32
+ {
33
+ if (event.ctrlKey )
34
+ {
35
+ var charCode = (event.charCode) ? event.charCode : ((event.which) ? event.which : event.keyCode);
36
+ if (charCode == 14 ) {
37
+ editSelected();
38
+ }
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,7 @@
1
+ #Menu {
2
+ display: none;
3
+ }
4
+
5
+ #command {
6
+ display: none;
7
+ }
@@ -1,25 +1,29 @@
1
1
  /* Based, with permission, on bluerobot.com */
2
2
 
3
3
  body { margin:0px; padding:0px;
4
- font-size:smaller; font-family:verdana, arial, helvetica, sans-serif; color:#333; background-color:white; }
5
-
6
- h1 { color:#E00000; }
7
-
8
- a { color:#09c; text-decoration:none; }
9
-
10
- a:link {color:#09c;}a:visited {color:#07a;}
11
-
4
+ font-size:smaller; font-family:verdana, arial, helvetica, sans-serif; color:#333; background-color:white; }
5
+
6
+ h1 { color:#E00000; }
7
+
8
+ a { color:#09c; text-decoration:none; }
9
+
10
+ a:link {color:#09c;}a:visited {color:#07a;}
11
+
12
12
  a:hover {background-color:#eee;}
13
13
 
14
14
  a.missing {
15
15
  color:#E00000;
16
- }#Content { margin:0px 210px 50px 10px; padding:10px; }#Menu { position:absolute; top:12px; right:10px; width:162px; padding:10px; background-color:#E00000; border:1px solid #000000;/* Again, the ugly brilliant hack. */ voice-family: "\"}\""; voice-family:inherit; width:150px; }/* Again, "be nice to Opera 5". */body>#Menu {width:150px;}
17
-
18
- td {
19
- font-size:smaller;
20
- }
16
+ }
21
17
 
22
- #Menu a {
18
+ #content { margin:0px 210px 50px 10px; padding:10px; }
19
+
20
+ #menu { position:absolute; top:12px; right:10px; width:162px; padding:10px; background-color:#E00000; border:1px solid #000000;/* Again, the ugly brilliant hack. */ voice-family: "\"}\""; voice-family:inherit; width:150px; }/* Again, "be nice to Opera 5". */body>#menu {width:150px;}
21
+
22
+ td {
23
+ font-size:smaller;
24
+ }
25
+
26
+ #menu a {
23
27
  display: block;
24
28
  color:#000000;
25
29
  border-top: solid 1px #F00000;
@@ -28,6 +32,10 @@ td {
28
32
  .pagename {
29
33
  font-size: xx-small;
30
34
  display: block;
35
+ }
36
+
37
+ img {
38
+ border-style: none;
31
39
  }
32
40
 
33
41
  .disclaimer {
@@ -36,8 +44,8 @@ td {
36
44
  }
37
45
 
38
46
  .subpage {
39
- padding: 0px 10px 0px 10px;
40
- margin: 0px;
47
+ padding: 10px;
48
+ margin: 10px;
41
49
  border: solid 1px #AAAAAA;
42
50
  font-size:x-small;
43
51
  }
@@ -46,7 +54,8 @@ p.more {
46
54
  font-size: xx-small;
47
55
  text-align: right;
48
56
  padding: 0px;
49
- font-color: #grey;
57
+ font-color: #grey;
58
+ color: gray;
50
59
  }
51
60
 
52
61
  .subpage h1 {
@@ -61,3 +70,21 @@ p.more {
61
70
  padding: 0px 10px 0px 10px;
62
71
  margin: 0px; border: solid 1px #AAAAAA;
63
72
  }
73
+
74
+ a.pageview {
75
+ display: inline;
76
+ }
77
+
78
+ pre.change {
79
+ margin: 0px;
80
+ padding: 0px;
81
+ }
82
+
83
+ ul.tips {
84
+ list-style-type: none;
85
+ }
86
+
87
+ .metacolumn {
88
+ display: inline;
89
+ font-size: smaller;
90
+ }
@@ -0,0 +1,31 @@
1
+ # Each line contains a title that will NOT be automatically linked in the wiki (can still be manually linked)
2
+ the
3
+ of
4
+ and
5
+ a
6
+ to
7
+ in
8
+ is
9
+ that
10
+ it
11
+ was
12
+ he
13
+ for
14
+ as
15
+ on
16
+ with
17
+ his
18
+ be
19
+ at
20
+ you
21
+ I
22
+ are
23
+ this
24
+ by
25
+ from
26
+ had
27
+ have
28
+ they
29
+ not
30
+ or
31
+ one
@@ -0,0 +1,10 @@
1
+ In a list of links, the last link is sometimes not linked.
2
+
3
+ e.g: 'How to administrate this wiki' might not be linked in this list:
4
+
5
+ * How to export a site from this wiki
6
+ * How to hack soks
7
+ * How to import a site from instiki
8
+ * How to use this wiki
9
+ * How to change the way this wiki looks
10
+ * How to administrate this wiki
@@ -0,0 +1,3 @@
1
+ Symbols are often incorrectly encoded in the textile to html conversion.
2
+
3
+ Eg. > should be the same as <notextile>></notextile>
@@ -0,0 +1,3 @@
1
+ Anything uploaded to the website (e.g. pictures, or attached files) is not protected by any form of authentication.
2
+
3
+ If anyone knows how to add authentication to the Webrick FileHandler then please let me know.
@@ -0,0 +1,62 @@
1
+ h1. Adjusting the settings
2
+
3
+ Take a look at the start.rb file in your wiki folder. This can be used to change the settings such as port and url of this site, and to enable more advanced features such as calendars and automatic summaries.
4
+
5
+ h2. To restart your wiki
6
+
7
+ The soks-create-wiki.rb script will have created a folder in the directory in which you ran it (by default the folder is 'soks-wiki'). In that folder is a script 'start.rb' run it.
8
+ <code>
9
+ cd soks-wiki
10
+ ruby start.rb
11
+ </code>
12
+
13
+ h2. To make your site accessible beyond localhost
14
+
15
+ Open start.rb in your directory. Un-comment the lines
16
+ <code>
17
+ # :url => 'http://localhost:8000',
18
+ # :port => 8000,
19
+ </code>
20
+ and replace them with the url and port you wish the wiki to run on.
21
+
22
+ h2. To password protect your site.
23
+
24
+ Open start.rb in your wiki directory. Un-comment and edit the authenticators section and edit the array. The format is [ [ first regexp to match against title, authenticator to use ], [ second regexp to match against title, authenticator to use ] .... ]. For example:
25
+
26
+ # This matches against all the standard 'non editing commands' and doesn't ask for any authentication
27
+ <code>[ %r{/(view|rss|print|find|meta)/.*}, WEBrick::HTTPAuth::NoAuthenticationRequired.new ]</code>
28
+
29
+ # This doesn't permit any file or picture uploads
30
+ <code>[ %r{/upload/.*}, WEBrick::HTTPAuth::NotPermitted.new ]</code>
31
+
32
+ # This asks for a site wide password to edit or save changes to the home page
33
+ <code>[ %r{/(edit|save)/home page}, WEBrick::HTTPAuth::SiteWidePassword.new('password','You need to enter the site wide password to edit the home page') ]</code>
34
+
35
+ # This uses the standard WEBrick authentication system on any page whose name starts with private. The standard WEBrick authentication uses a database of usernames and passwords. See [[ Gnome's Guide => http://shogo.homelinux.org/~ysantoso/webrickguide/html/html_webrick.html ]] for details.
36
+ <code>[ %r{/(view|edit|save)/private.*},WEBrick::HTTPAuth::BasicAuth.new( :UserDB => htpasswd, :Realm => realm ) ]</code>
37
+
38
+ # This is the default. For any page it just asks for a username, but the password can be left blank.
39
+ <code>[ %r{.*}, WEBrick::HTTPAuth::AskForUserName.new( 'No password, just enter a name') ]</code>
40
+
41
+ Note a big bug is that viewing attached images and files is NOT password protected. If someone knows how to make WEBrick::HTTPServlet::FileHandler use an authenticator, please let me know.
42
+
43
+ h2. To edit the default site settings used by soks-create-wiki.rb
44
+
45
+ Edit template/start.rb in the directory where soks was installed.
46
+
47
+ h2. To change how often the wiki checks the content directory for any changes.
48
+
49
+ Open start.rb and add this to your CUSTOM_SETTINGS hash:
50
+ <code>:check_files_every => 60, # Seconds</code>
51
+
52
+ h2. To add a calendar and upcoming events page:
53
+
54
+ Open start.rb and uncomment:
55
+ <code>
56
+ # calendar = AutomaticCalendar.new( wiki ) # Adds a series of calendar pages to the wiki
57
+ # AutomaticUpcomingEvents.new( wiki, calendar ) # Creates a page with the next weeks events drawn from the calendar pages
58
+ </code>
59
+
60
+ h2. To add a page that summarises other pages:
61
+
62
+ See AutomaticSummary
@@ -0,0 +1,30 @@
1
+ h1. Improving the style of this wiki
2
+
3
+ If you develop any improvements to the layout and style of this wiki, and are willing to share, please send copies to me tamc@rubyforge.com (a zip of the view and attachment directory is probably the best method).
4
+
5
+ h2. Changing the logo on the right
6
+
7
+ The logo can be changed by replacing logo.tif in the in the attachment folder of the wiki you have created ( soks-wiki/attachment/logo.tif by default)
8
+
9
+ h2. Changing the color scheme
10
+
11
+ The stylesheet is stored in the attachment folder of the wiki you have created (soks-wiki/attachment/stylesheet.css by default).
12
+
13
+ h2. Changing the html and layout
14
+
15
+ The formatting of the wiki is stored in the views subdirectory of the folder in which the wiki was created (soks-wiki/views by default). These pages are all erb ( www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html ).
16
+
17
+ The folder contains:
18
+ * frame.rhtml - This is the bulk of the html and is used to wrap all pages except those ending in 'print' or 'rss'
19
+ * Page_view.rhtml - This is the 'standard' viewing page
20
+ * Page_edit.rhtml - This is the 'standard' editing page
21
+ * Page_revisions.rhtml - This is the 'standard' revisions page
22
+ * Page_rss.rhtml - This attempts to create a rss feed for changes to the page
23
+
24
+ You can add a new type of view by creating a new file here ending in rthml, starting with Page and with _viewname in the middle. E.g. for a new sort of 'doublesize' view you could create Page_doublesize.rhtml. This would then be accessed by typing /doublesize/pagename as the url.
25
+
26
+ Note that you must restart soks for changes to the template to take effect.
27
+
28
+ h2. Changing the default styles for NEW wikis
29
+
30
+ To change the style and layout of new wikis created using the soks-create-wiki.rb command, then edit the 'template' directory of wherever you installed soks.
@@ -0,0 +1,60 @@
1
+ h1. How to export a site from this wiki
2
+
3
+ The contents of this site are stored in flat files in the 'contents' folder of this wiki (soks-wiki/contents by default). They are the ones with the .textile ending. Should be pretty easy to transfer them to wherever you need.
4
+
5
+ The authors, and change history of each page are stored in the same folder with a yaml extension. These are yaml'd files that contain many documents. Each document contains a single revision. Each revision is an array of [ revision number, changes, author, creation time ]. The changes is an array of change groups. Each change group is an array of changed lines. There may be several documents with the same revision number. The last document with a particular revision number is the 'definative' one.
6
+
7
+ E.g. The saved copy of a page titled Hello World would be two files:
8
+ # Hello%20World.textile
9
+ # Hello%20World.yaml
10
+
11
+ Hello%20World.textile might contain:
12
+ <pre>
13
+ h1. Hello world
14
+
15
+ What a beautiful world
16
+ </pre>
17
+
18
+ Hello%20World.yaml might contain
19
+ <pre>
20
+ --- # Start of document
21
+ - 0 # Revision number
22
+ - tamc # Revision author
23
+ - 2005-01-23 22:53:11.081896 +00:00 # Revision time
24
+ - # Array of change groups
25
+ - # Array of changes
26
+ - # Each change is an array
27
+ - "+" # Add or delete
28
+ - 0 # Line number
29
+ - h1. Hello george # What the line is
30
+ ---
31
+ - 0 # If a new revision is made by the same author within 30 minutes the revision number is not increased. This is the definitive revision 0, the previous one should be ignored.
32
+ - tamc
33
+ - 2005-01-23 22:55:11.081896 +00:00
34
+ -
35
+ -
36
+ -
37
+ - "-"
38
+ - 0
39
+ - h1. Hello george
40
+ -
41
+ - "+"
42
+ - 0
43
+ - h1. Hello world
44
+ -
45
+ ---
46
+ - 0
47
+ - tamc
48
+ - 2005-01-23 22:55:11.081896 +00:00
49
+ -
50
+ -
51
+ -
52
+ - "+"
53
+ - 1
54
+ - ""
55
+ -
56
+ - "+"
57
+ - 2
58
+ - What a beautiful world
59
+ -
60
+ </pre>
@@ -12,12 +12,13 @@ h2. template
12
12
  * show.rb - contains the default ruby file used by soks-create-wiki.rb, this is written using erb
13
13
  * attachments - contains the stuff that will be statically loaded when running a wiki, such as images and stylesheets. In particular you may want to replace logo.png
14
14
  * views - contains the default templates see Improving the style of this wiki for a few notes on this
15
- * content - contains the initial content for the wiki. The .textile files are flatfile text files containing the textile for a page. The title of the page is the filename (and has usually been url_encoded). Any .marshal files in here contain arrays of Revision objects relating to the history of a particular page.
15
+ * content - contains the initial content for the wiki. The .textile files are flatfile text files containing the textile for a page. The title of the page is the filename (and has usually been url_encoded). Any .yaml files in here contain arrays containing the change history of the page
16
16
 
17
17
  h2. lib
18
18
 
19
19
  * soks.rb - Just requires all the other files
20
20
  * soks-utils.rb - Contains various utility classes, EventQueue, Notify and some extensions to String to url_encode and decode
21
+ * soks-storage.rb - Contains a module which is mixed into the Wiki class to allow it to be saved
21
22
  * soks-model.rb - Contains the model of the wiki: Wiki, Page and Revision
22
23
  * soks-view.rb - Contains the classes that turn the wiki into html: View, WikiRedCloth, Links, RollingMatch
23
24
  * soks-servlet.rb - Contains the webrick server that passes commands to and from the View object
@@ -35,7 +36,7 @@ A Wiki class has many Page classes which have many Revision classes. ImagePage
35
36
 
36
37
  The Wiki class decides what type of page to create based on its name. All AttachmentPage pages have names that start with 'Attached ', all ImagePage pages have names that start with 'Picture of'. This is defined in the @page_classes instance variable of the Wiki class.
37
38
 
38
- The Wiki loads all the pages from file into a hash. When pages are changed it writes a copy to disk immediately.
39
+ The Wiki loads all the pages from file into a hash. When pages are changed it writes a copy to disk immediately. It has a thread that watches the disk for any changes to the files.
39
40
 
40
41
  h3. soks-view.rb
41
42
 
@@ -1,6 +1,6 @@
1
1
  h1. How to import a site from instiki
2
2
 
3
- [[ Instiki : www.instiki.org ]] is great, and was definitely an inspiration for this site. If, however, you wish to import a wiki from instiki to here then you need to:
3
+ [[ Instiki => www.instiki.org ]] is great, and was definitely an inspiration for this site. If, however, you wish to import a wiki from instiki to here then you need to:
4
4
 
5
5
  # Launch your instiki wiki
6
6
  # Go to 'export' and click on 'Markup (textile)'
@@ -0,0 +1,27 @@
1
+ h1. Pointers on how to use this wiki
2
+
3
+ h2. Adding Pages
4
+
5
+ There are several ways to add pages to soks:
6
+ # Click on the 'add a new page'
7
+ # Highlight the text on the page you wish to link from and press crtl-n[1]
8
+ # Type the title of the page you wish to create and click search, there will be a link to create the page at the bottom of the search results.
9
+ # As you are editing a page, put the title of a new page in square brackets like this: <notextile>[[ title of the new page ]]</notextile>. When you save the page, a link will be created that permits you to create a new page.
10
+
11
+ Yes, this means it is very easy to create orphaned pages. No I don't think this is a problem, because there is a site index.
12
+
13
+ fn1. This only works on some browsers. It doesn't seem to work on Mac Firefox or Mac OmniWeb. It does on Mac Safari. Please report your successes and failiures.
14
+
15
+ h2. Editing Pages
16
+
17
+ * To edit a page, click edit.
18
+ * The pages are written in textile. A reference is at http://hobix.com/textile/quick.html
19
+ * Links to other pages within this wiki, and to web addresses, and to e-mail addresses, happen automatically
20
+ * To force a link put it inside double square brackets e.g. <notextile>[[a forced link]]</notextile>
21
+ * To alias a link: <notextile> [[ a different name for </notextile>=><notextile> site index ]] </notextile>
22
+ * To insert another page: <notextile>[ [ insert site index ]]</notextile>
23
+ * This is particularly usefull if you want to insert a picture: <notextile>[ [ insert picture of the soks logo ]]</notextile>
24
+
25
+ h2. Searching
26
+
27
+ The search box on the right takes a single regexp.
@@ -0,0 +1,35 @@
1
+ h1. List of changes
2
+
3
+ h2. Between v-0-0-3 and v-0-0-2
4
+
5
+ h3. Features
6
+
7
+ * File format for revisions changed from marshalled array of revisions to a yaml'd array of strings and times. This should allow easier import/export.
8
+ * Changes to the files on disk appear in the wiki (by default checks for changes on disk every 60 seconds) to allow external editing of the wiki.
9
+ * New way of making new pages: highlight the text you wish to link and press crtl-n. This only works on some browsers.
10
+ * RSS feed for changes made to any page (use the RSS feed on Recent Changes to be notified of all changes to the site, use the RSS feed on Site Index to be notified of new pages).
11
+ * Added a WikiWord link for those that don't like to give out links with %20's in them. e.g. http://yoursite.com/wiki/HomePage redirects to http://yoursite.com/view/Home%20Page.
12
+ * The automatic summary class has been extended to allow summary based on the page title, page author, or page content.
13
+ * Different parts of the wiki, and different commands, can be authenticated differently based on regexps.
14
+ * Kill list of words that will not be automatically linked (default set is the 30 most common English language words).
15
+ * The soks-create-wiki command can now be interactive (or can use command line options including --help and --no-interaction). It also manages upgrades from the previous version of Soks.
16
+ * There are some demo templates: default is the standard, rails looks a bit like www.rubyonrails.com and instiki which looks a bit like www.instiki.org.
17
+ * A meta data view of a page. Clicking on the page's title on the top left of the screen brings up a list of the links from and too that page, and a list of the people who have contributed to the page.
18
+
19
+ h3. Refactorings
20
+
21
+ * The recent changes and site index helpers now use the automatic summary class.
22
+ * The Wiki class now notifies other classes of changes to the site, including the View class.
23
+ * The storage methods are now a module which is mixed into the wiki class.
24
+
25
+ h3. Bug Fixes
26
+
27
+ * Bug in uploads on windows fixed (thanks to Sebastien Clediere).
28
+ * Bugs in accepting titles with punctuation fixed.
29
+ * Bug in automatic summary fixed.
30
+ * Logo changed from png to tif so that it is transparent on a wider selection of browsers.
31
+
32
+ h3. Bugs remaining
33
+
34
+ * No authentication on pictures and attachments
35
+ * Lots of little faults with the textile to html conversion. Some due to the use of Redcloth v 2.0.11 (looking forward to a stable v3!) and some due to my inept subclassing.