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
@@ -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,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,24 @@
1
+ h1. The Automatic Summary class
2
+
3
+ This class is in the lib/soks-helpers.rb file. Examples of its use can be seen in the AutomaticRecentChanges and AutomaticIndex classes in that file.
4
+
5
+ It is a flexible class that watches the wiki, and creates summaries of pages based on your specifications. To create a new automatic summary, edit the section in your start.rb file.
6
+
7
+ Possible settings are:
8
+ <code>
9
+ DEFAULT_SETTINGS = {
10
+ :regexp_for_title => /.*/, # These three regexps act as an AND
11
+ :regexp_for_author => nil,
12
+ :regexp_for_content => nil,
13
+ :max_pages_to_show => nil,
14
+ :pagename => 'Summary',
15
+ :author => 'AutomaticSummary',
16
+ :lines_to_include => nil, # Or pass a block
17
+ :only_new_pages => false,
18
+ :sort_pages_by => :created_on, # Could be :revised_on or :score or :name or :name_for_index, or :author
19
+ :reverse_sort => false,
20
+ :include_metadata => false, # Includes author and time in summary
21
+ :summarise_revisions => false, # If true, then can contain several revisions for same page
22
+ :remove_deleted_pages => true, # If false will keep references to deleted pages
23
+ }
24
+ </code>
@@ -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>
@@ -0,0 +1,61 @@
1
+ h1. How to hack soks
2
+
3
+ Here are some pointers to help you figure out where to make whatever changes and improvements you desire. The soks licence is liberal, so please do whatever you want, but I would appreciate if you sent me any improvements you make ( tamc@rubyforge.com ).
4
+
5
+ * bin - contains the soks-create-wiki.rb file
6
+ * contrib - contains code from other people. Currently Redcloth and Diff:LCS
7
+ * lib - contains the soks code
8
+ * template - contains the defaults used by soks-create-wiki.rb when creating a new wiki. This folder is copied over, and the show.rb template filled out.
9
+
10
+ h2. template
11
+
12
+ * show.rb - contains the default ruby file used by soks-create-wiki.rb, this is written using erb
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
+ * 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 .yaml files in here contain arrays containing the change history of the page
16
+
17
+ h2. lib
18
+
19
+ * soks.rb - Just requires all the other files
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
22
+ * soks-model.rb - Contains the model of the wiki: Wiki, Page and Revision
23
+ * soks-view.rb - Contains the classes that turn the wiki into html: View, WikiRedCloth, Links, RollingMatch
24
+ * soks-servlet.rb - Contains the webrick server that passes commands to and from the View object
25
+ * soks-helpers.rb - Contains optional classes that a Wiki can load to provide added functionality. These are called when changes are made to the site. They include: AutomaticUpdateCrossLinks, AutomaticRecentChanges, AutomaticOnePageIndex, AutomaticMultiPageIndex, AutomaticSummary, AutomaticCalendar and AutomaticUpcomingEvents.
26
+ * authenticators.rb - Contains some extra authenticators to extend those already provided by Webrick. Namely NotAuthentication and OnePasswordAuthentication
27
+
28
+ h3. soks-utils.rb
29
+
30
+ * Notify - This is an improvement on the Observable mix-in.
31
+ * EventQueue - This is used by Notify to inform observers in sequence of an event taking place, while allowing the original triggering class to continue.
32
+
33
+ h3. soks-model.rb
34
+
35
+ A Wiki class has many Page classes which have many Revision classes. ImagePage and AttachmentPage are subclasses of Page that return different textile.
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.
38
+
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.
40
+
41
+ h3. soks-view.rb
42
+
43
+ The View object does the business. It is called by the soks-servlet, and then proceeds to call an appropriate method on the Wiki model. It may then Notify any observing AutomaticHelpers of any changes, before proceeding to render the html. This rendering happens in two places: First the Page.textile is turned into html by WikiRedCloth. then an appropriate ERB file is loaded and called.
44
+
45
+ The WikiRedCloth overrides the to_html method of redcloth to add a number of methods that do the automatic page insertion and automatic linking. The automatic linking is actually carried out in the RollingMatch class. A record of the links between pages is kept in the Links class and then written to each page object. Currently Redcloth 3.0.1 seems to have lots of stack overflows, so Redcloth 2.0.11 is used.
46
+
47
+ The ERB files are loaded from disk. The appropriate erb file is selected by looking for the pattern ClassName_viewname.rhtml (e.g. Page_edit.rhtml). If that page doesn't exist then the process is repeated with the Page's superclass. The ERB files are cached.
48
+
49
+ h3. soks-servlet.rb
50
+
51
+ This runs a Webrick server to interact with the user. There is a $SETTINGS global that contains most of the important settings, and a start_wiki method for setting them and triggering the server to start. The server can be stopped by sending an interupt (ctrl-c).
52
+
53
+ The server has two handlers, a WEBrick::HTTPServlet::FileHandler for doing the dynamic content (which is attached to any url starting in /attachment/) and a WikiServlet for the dynamic content.
54
+
55
+ The WikiServlet service method takes a look at the request url. If it is '/' it redirects to '/view/Home Page'. If it only has one slash in it (e.g. '/Home Page') then it assumes that it is equivalent to '/view/Home Page'. If it has two or more slashes in it (e.g. '/edit/Home Page' ) then it splits the url into a command ('edit') and the rest ('Home Page'). If the WikiServlet responds to doCommand (e.g. doEdit) then control is passed to that method. Otherwise it is assumed the command is the name of a view (e.g. 'print') and is therefore passed as is to the View object.
56
+
57
+ The WikiServlet deals with file uploads by separately writing the uploaded file to the 'attachments' directory and also asking the 'View' object to create or revise an ImagePage object whose content is the filename of the uploaded file.
58
+
59
+ h4. soks-helpers.rb
60
+
61
+ These are a series of classes that may be optionally loaded by a wiki's start.rb script. They receive notifications of page changes from the View object and can use this information to update other pages in the wiki.
@@ -0,0 +1,13 @@
1
+ h1. How to import a site from instiki
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:
4
+
5
+ # Launch your instiki wiki
6
+ # Go to 'export' and click on 'Markup (textile)'
7
+ # Unzip the downloaded folder.
8
+ # Create a soks wiki: <code>soks-create-wiki.rb</code>
9
+ # Stop the wiki <code>ctrl-c</code>
10
+ # Copy the contents of the downloaded folder (step 3) into soks-wiki/content
11
+ # Start the wiki <code>ruby soks-wiki/start.rb</code>
12
+
13
+ Your instiki content should then appear. Note that all the links still work, but that all the pages have their WikiWord names.
@@ -4,7 +4,7 @@ If you develop any improvements to the layout and style of this wiki, and are wi
4
4
 
5
5
  h2. Changing the logo on the right
6
6
 
7
- The logo can be changed by replacing logo.png in the in the attachment folder of the wiki you have created ( soks-wiki/attachment/logo.png by default)
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
8
 
9
9
  h2. Changing the color scheme
10
10
 
@@ -19,7 +19,7 @@ The folder contains:
19
19
  * Page_view.rhtml - This is the 'standard' viewing page
20
20
  * Page_edit.rhtml - This is the 'standard' editing page
21
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 (buggy?)
22
+ * Page_rss.rhtml - This attempts to create a rss feed for changes to the page
23
23
 
24
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
25
 
@@ -0,0 +1,8 @@
1
+ h1. Known Bugs
2
+
3
+ _If you can fix any of the bugs here, please let me know. If you spot any more, please let me know._
4
+
5
+ * Uploads are not password protected
6
+ * Sometimes the last item in a list of links is not linked correctly
7
+ * Sometimes entities such as > are not encoded correctly
8
+
@@ -0,0 +1,34 @@
1
+ h1. List of changes
2
+
3
+ h2. Between v-0-1-0 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
+
18
+ h3. Refactorings
19
+
20
+ * The recent changes and site index helpers now use the automatic summary class.
21
+ * The Wiki class now notifies other classes of changes to the site, including the View class.
22
+ * The storage methods are now a module which is mixed into the wiki class.
23
+
24
+ h3. Bug Fixes
25
+
26
+ * Bug in uploads on windows fixed (thanks to Sebastien Clediere).
27
+ * Bugs in accepting titles with punctuation fixed.
28
+ * Bug in automatic summary fixed.
29
+ * Logo changed from png to tif so that it is transparent on a wider selection of browsers.
30
+
31
+ h3. Bugs remaining
32
+
33
+ * No authentication on pictures and attachments
34
+ * 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.
@@ -0,0 +1 @@
1
+ /attachment/logo.tiff
@@ -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,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,3 @@
1
+ h1. Recent Blog Entries
2
+
3
+ No pages found to summarise
@@ -0,0 +1,48 @@
1
+ h1. Recent Changes to This Site
2
+
3
+ * home page revised on 2005 Jan 23 23:27 by tamc2
4
+ * home page revised on 2005 Jan 23 23:27 by tamc2
5
+ * home page revised on 2005 Jan 23 23:26 by tamc2
6
+ * home page revised on 2005 Jan 23 23:26 by tamc2
7
+ * Picture of a pair of soks revised on 2005 Jan 23 23:25 by AutomaticImport
8
+ * Picture of a pair of soks revised on 2005 Jan 23 23:24 by AutomaticImport
9
+ * How to hack soks revised on 2005 Jan 23 23:23 by tamc2
10
+ * How to export a site from this wiki revised on 2005 Jan 23 23:21 by tamc2
11
+ * How to import a site from instiki revised on 2005 Jan 23 23:10 by tamc2
12
+ * Site Index revised on 2005 Jan 23 23:10 by AutomaticIndex
13
+ * AutomaticSummary revised on 2005 Jan 23 23:10 by tamc2
14
+ * Pointers on adjusting the settings revised on 2005 Jan 23 23:04 by tamc2
15
+ * Pointers on adjusting the settings revised on 2005 Jan 23 23:04 by tamc2
16
+ * Pointers on adjusting the settings revised on 2005 Jan 23 23:03 by tamc2
17
+ * Pointers on adjusting the settings revised on 2005 Jan 23 23:01 by tamc2
18
+ * Pointers on adjusting the settings revised on 2005 Jan 23 22:59 by tamc2
19
+ * Pointers on adjusting the settings revised on 2005 Jan 23 22:58 by tamc2
20
+ * List of changes revised on 2005 Jan 23 22:48 by tamc2
21
+ * Site Index revised on 2005 Jan 23 22:45 by AutomaticIndex
22
+ * List of changes revised on 2005 Jan 23 22:45 by tamc2
23
+ * home page revised on 2005 Jan 23 22:31 by tamc2
24
+ * Site Index revised on 2005 Jan 23 22:30 by AutomaticIndex
25
+ * Known bugs revised on 2005 Jan 23 22:30 by tamc2
26
+ * home page revised on 2005 Jan 23 22:29 by tamc2
27
+ * Improving the style of this wiki revised on 2005 Jan 23 22:21 by tamc2
28
+ * Pointers on how to use this wiki revised on 2005 Jan 23 22:20 by tamc2
29
+ * Pointers on how to use this wiki revised on 2005 Jan 23 22:20 by tamc2
30
+ * Pointers on how to use this wiki revised on 2005 Jan 23 22:19 by tamc2
31
+ * Pointers on how to use this wiki revised on 2005 Jan 23 22:19 by tamc2
32
+ * Pointers on how to use this wiki revised on 2005 Jan 23 22:18 by tamc2
33
+ * Pointers on how to use this wiki revised on 2005 Jan 23 22:18 by tamc2
34
+ * Pointers on how to use this wiki revised on 2005 Jan 23 22:17 by tamc2
35
+ * Pointers on how to use this wiki revised on 2005 Jan 23 22:16 by tamc2
36
+ * home page revised on 2005 Jan 23 22:09 by tamc2
37
+ * Site Index revised on 2005 Jan 23 22:06 by AutomaticIndex
38
+ * Recent Blog Entries revised on 2005 Jan 23 22:06 by AutomaticSummary
39
+ * Site Index revised on 2005 Jan 23 22:06 by AutomaticIndex
40
+ * Soks Licence revised on 2005 Jan 23 22:06 by AutomaticImport
41
+ * Pointers on how to use this wiki revised on 2005 Jan 23 22:06 by AutomaticImport
42
+ * Pointers on adjusting the settings revised on 2005 Jan 23 22:06 by AutomaticImport
43
+ * Picture of a pair of soks revised on 2005 Jan 23 22:06 by AutomaticImport
44
+ * Improving the style of this wiki revised on 2005 Jan 23 22:06 by AutomaticImport
45
+ * How to import a site from instiki revised on 2005 Jan 23 22:06 by AutomaticImport
46
+ * How to hack soks revised on 2005 Jan 23 22:06 by AutomaticImport
47
+ * How to export a site from this wiki revised on 2005 Jan 23 22:06 by AutomaticImport
48
+ * home page revised on 2005 Jan 23 22:06 by AutomaticImport