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
@@ -1,21 +0,0 @@
1
- h1. Pointers on how to use this wiki
2
-
3
- h2. Adding Pages
4
-
5
- To add a page use the links on the right[1]. 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.
6
-
7
- h2. Editing Pages
8
-
9
- * To edit a page, click edit.
10
- * The pages are written in textile. A reference is at http://hobix.com/textile/quick.html
11
- * Links to other pages within this wiki, and to web addresses, and to e-mail addresses, happen automatically
12
- * To force a link put it inside double square brackets e.g. <notextile>[[a forced link]]</notextile>
13
- * To alias a link: <notextile> [[ a different name for : site index ]] </notextile>
14
- * To insert another page: <notextile>[ [ insert site index ]]</notextile>
15
- * This is particularly usefull if you want to insert a picture: <notextile>[ [ insert picture of the soks logo ]]</notextile>
16
-
17
- h2. Searching
18
-
19
- The search box on the right takes a single regexp.
20
-
21
- fn1. Punctuation, particularly colons, in page titles currently confuses the wiki. I'm working to resolve this.
@@ -1,203 +0,0 @@
1
- On 2005 Jan 11, tamc2 made these changes to [[Soks Licence]]:
2
- | 4 | -<notextile>Soks is copyrighted (c) 2004, 2005 free software by Thomas Counsell <tamc@rubyforge.org>. </notextile>- |
3
- | 4 | <notextile>Soks is copyrighted (c) 2004, 2005 free software by Thomas Counsell tamc@rubyforge.org. </notextile> |
4
-
5
- On 2005 Jan 11, tamc2 made these changes to [[Soks Licence]]:
6
- | 2 | -<notextile><pre></notextile>- |
7
- | 6 | -<notextile>Soks is copyrighted free software by Thomas Counsell <tamc@rubyforge.org>. </notextile>- |
8
- | 4 | <notextile>Soks is copyrighted (c) 2004, 2005 free software by Thomas Counsell <tamc@rubyforge.org>. </notextile> |
9
- | 6 | <notextile><pre></notextile> |
10
-
11
- On 2005 Jan 11, tamc2 made these changes to [[Soks Licence]]:
12
- | 2 | <notextile><pre></notextile> |
13
- | 48 | -<notextile> file LEGAL.</notextile>- |
14
- | 50 | <notextile> contrib directory.</notextile> |
15
- | 62 | <notextile></pre></notextile> |
16
-
17
- On 2005 Jan 11, tamc2 made these changes to [[Soks Licence]]:
18
- | 0 | <notextile>h1. Soks is licensed under the The Ruby License</notextile> |
19
- | 2 | <notextile>Note: This licence applies to all that is contained in this distribution EXCEPT files within the contrib folder which may be under different licences.</notextile> |
20
- | 4 | <notextile>Soks is copyrighted free software by Thomas Counsell <tamc@rubyforge.org>. </notextile> |
21
- | 5 | <notextile>You can redistribute it and/or modify it under either the terms of the </notextile> |
22
- | 6 | <notextile>GPL (see the file GPL), or the conditions below:</notextile> |
23
- | 8 | <notextile> 1. You may make and give away verbatim copies of the source form of the</notextile> |
24
- | 9 | <notextile> software without restriction, provided that you duplicate all of the</notextile> |
25
- | 10 | <notextile> original copyright notices and associated disclaimers.</notextile> |
26
- | 12 | <notextile> 2. You may modify your copy of the software in any way, provided that</notextile> |
27
- | 13 | <notextile> you do at least ONE of the following:</notextile> |
28
- | 15 | <notextile> a) place your modifications in the Public Domain or otherwise</notextile> |
29
- | 16 | <notextile> make them Freely Available, such as by posting said</notextile> |
30
- | 17 | <notextile> modifications to Usenet or an equivalent medium, or by allowing</notextile> |
31
- | 18 | <notextile> the author to include your modifications in the software.</notextile> |
32
- | 20 | <notextile> b) use the modified software only within your corporation or</notextile> |
33
- | 21 | <notextile> organization.</notextile> |
34
- | 23 | <notextile> c) rename any non-standard executables so the names do not conflict</notextile> |
35
- | 24 | <notextile> with standard executables, which must also be provided.</notextile> |
36
- | 26 | <notextile> d) make other distribution arrangements with the author.</notextile> |
37
- | 28 | <notextile> 3. You may distribute the software in object code or executable</notextile> |
38
- | 29 | <notextile> form, provided that you do at least ONE of the following:</notextile> |
39
- | 31 | <notextile> a) distribute the executables and library files of the software,</notextile> |
40
- | 32 | <notextile> together with instructions (in the manual page or equivalent)</notextile> |
41
- | 33 | <notextile> on where to get the original distribution.</notextile> |
42
- | 35 | <notextile> b) accompany the distribution with the machine-readable source of</notextile> |
43
- | 36 | <notextile> the software.</notextile> |
44
- | 38 | <notextile> c) give non-standard executables non-standard names, with</notextile> |
45
- | 39 | <notextile> instructions on where to get the original software distribution.</notextile> |
46
- | 41 | <notextile> d) make other distribution arrangements with the author.</notextile> |
47
- | 43 | <notextile> 4. You may modify and include the part of the software into any other</notextile> |
48
- | 44 | <notextile> software (possibly commercial). But some files in the distribution</notextile> |
49
- | 45 | <notextile> are not written by the author, so that they are not under these terms.</notextile> |
50
- | 47 | <notextile> For the list of those files and their copying conditions, see the</notextile> |
51
- | 48 | <notextile> file LEGAL.</notextile> |
52
- | 50 | <notextile> 5. The scripts and library files supplied as input to or produced as </notextile> |
53
- | 51 | <notextile> output from the software do not automatically fall under the</notextile> |
54
- | 52 | <notextile> copyright of the software, but belong to whomever generated them, </notextile> |
55
- | 53 | <notextile> and may be sold commercially, and may be aggregated with this</notextile> |
56
- | 54 | <notextile> software.</notextile> |
57
- | 56 | <notextile> 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR</notextile> |
58
- | 57 | <notextile> IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</notextile> |
59
- | 58 | <notextile> WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR</notextile> |
60
- | 59 | <notextile> PURPOSE.</notextile> |
61
-
62
- On 2005 Jan 11, tamc2 made these changes to [[home page]]:
63
- | 2 | -<notextile>You have succesfully installed soks. Remember it is work in progress, and definitely not fully de-bugged. So don't trust your mission critical sites to it.</notextile>- |
64
- | 2 | <notextile>You have succesfully installed soks. Remember it is work in progress, and definitely not fully de-bugged. So don't trust your mission critical sites to it. In particular, I have only really used it with ruby 1.8.2 on Mac OS X 10.3. If you have any success or failure on other platforms, please let me know.</notextile> |
65
-
66
- On 2005 Jan 11, tamc2 made these changes to [[How to hack soks]]:
67
- | 26 | <notextile>h3. soks-utils.rb</notextile> |
68
- | 28 | <notextile>* Notify - This is an improvement on the Observable mix-in. </notextile> |
69
- | 29 | <notextile>* EventQueue - This is used by Notify to inform observers in sequence of an event taking place, while allowing the original triggering class to continue.</notextile> |
70
- | 28 | -<notextile> </notextile>- |
71
- | 31 | <notextile>h3. soks-model.rb</notextile> |
72
- | 33 | <notextile>A Wiki class has many Page classes which have many Revision classes. ImagePage and AttachmentPage are subclasses of Page that return different textile.</notextile> |
73
- | 35 | <notextile>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.</notextile> |
74
- | 37 | <notextile>The Wiki loads all the pages from file into a hash. When pages are changed it writes a copy to disk immediately.</notextile> |
75
- | 39 | <notextile>h3. soks-view.rb</notextile> |
76
- | 41 | <notextile>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.</notextile> |
77
- | 43 | <notextile>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.</notextile> |
78
- | 45 | <notextile>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.</notextile> |
79
- | 47 | <notextile>h3. soks-servlet.rb</notextile> |
80
- | 49 | <notextile>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).</notextile> |
81
- | 51 | <notextile>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.</notextile> |
82
- | 53 | <notextile>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. </notextile> |
83
- | 55 | <notextile>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. </notextile> |
84
- | 57 | <notextile>h4. soks-helpers.rb</notextile> |
85
- | 59 | <notextile>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.</notextile> |
86
-
87
- On 2005 Jan 11, tamc2 made these changes to [[Pointers on how to use this wiki]]:
88
- | 2 | -<notextile>h2. Editing</notextile>- |
89
- | 2 | <notextile>h2. Adding Pages</notextile> |
90
- | 4 | <notextile>To add a page use the links on the right[1]. 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.</notextile> |
91
- | 6 | <notextile>h2. Editing Pages</notextile> |
92
- | 5 | -<notextile>* To add a page use the links on the right[1]</notextile>- |
93
-
94
- On 2005 Jan 11, tamc2 made these changes to [[Pointers on how to use this wiki]]:
95
- | 0 | -<notextile>h1. Pointers on how to use this wiki:</notextile>- |
96
- | 0 | <notextile>h1. Pointers on how to use this wiki</notextile> |
97
- | 2 | <notextile>h2. Editing</notextile> |
98
- | 13 | <notextile>h2. Searching</notextile> |
99
- | 15 | <notextile>The search box on the right takes a single regexp. </notextile> |
100
-
101
- On 2005 Jan 11, tamc2 made these changes to [[How to hack soks]]:
102
- | 0 | <notextile>h1. How to hack soks</notextile> |
103
- | 2 | <notextile>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 ).</notextile> |
104
- | 4 | <notextile>* bin - contains the soks-create-wiki.rb file</notextile> |
105
- | 5 | <notextile>* contrib - contains code from other people. Currently Redcloth and Diff:LCS</notextile> |
106
- | 6 | <notextile>* lib - contains the soks code</notextile> |
107
- | 7 | <notextile>* 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.</notextile> |
108
- | 9 | <notextile>h2. template</notextile> |
109
- | 11 | <notextile>* show.rb - contains the default ruby file used by soks-create-wiki.rb, this is written using erb</notextile> |
110
- | 12 | <notextile>* 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</notextile> |
111
- | 13 | <notextile>* views - contains the default templates see Improving the style of this wiki for a few notes on this</notextile> |
112
- | 14 | <notextile>* 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.</notextile> |
113
- | 16 | <notextile>h2. lib</notextile> |
114
- | 18 | <notextile>* soks.rb - Just requires all the other files</notextile> |
115
- | 19 | <notextile>* soks-utils.rb - Contains various utility classes, EventQueue, Notify and some extensions to String to url_encode and decode</notextile> |
116
- | 20 | <notextile>* soks-model.rb - Contains the model of the wiki: Wiki, Page and Revision</notextile> |
117
- | 21 | <notextile>* soks-view.rb - Contains the classes that turn the wiki into html: View, WikiRedCloth, Links, RollingMatch</notextile> |
118
- | 22 | <notextile>* soks-servlet.rb - Contains the webrick server that passes commands to and from the View object</notextile> |
119
- | 23 | <notextile>* 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.</notextile> |
120
- | 24 | <notextile>* authenticators.rb - Contains some extra authenticators to extend those already provided by Webrick. Namely NotAuthentication and OnePasswordAuthentication</notextile> |
121
- | 28 | <notextile> </notextile> |
122
-
123
- On 2005 Jan 11, tamc2 made these changes to [[home page]]:
124
- | 10 | <notextile>* [[How to hack soks]]</notextile> |
125
-
126
- On 2005 Jan 11, tamc2 made these changes to [[Pointers on adjusting the settings]]:
127
- | 36 | <notextile>h2. To edit the default site settings used by soks-create-wiki.rb</notextile> |
128
- | 38 | <notextile>Edit template/start.rb in the directory where soks was installed.</notextile> |
129
-
130
- On 2005 Jan 11, tamc2 made these changes to [[Improving the style of this wiki]]:
131
- | 27 | <notextile>h2. Changing the default styles for NEW wikis </notextile> |
132
- | 29 | <notextile>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.</notextile> |
133
-
134
- On 2005 Jan 11, tamc2 made these changes to [[Pointers on how to use this wiki]]:
135
- | 9 | -<notextile>* This is particularly usefull if you want to insert a picture: <notextile>[[ insert picture of the soks logo ]]</notextile></notextile>- |
136
- | 9 | <notextile>* This is particularly usefull if you want to insert a picture: <notextile>[ [ insert picture of the soks logo ]]</notextile></notextile> |
137
-
138
- On 2005 Jan 11, tamc2 made these changes to [[Improving the style of this wiki]]:
139
- | 14 | -<notextile>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 ]].</notextile>- |
140
- | 14 | <notextile>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 ).</notextile> |
141
-
142
- On 2005 Jan 11, tamc2 made these changes to [[Improving the style of this wiki]]:
143
- | 14 | -<notextile>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 : http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html ]].</notextile>- |
144
- | 14 | <notextile>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 ]].</notextile> |
145
-
146
- On 2005 Jan 11, tamc2 made these changes to [[Improving the style of this wiki]]:
147
- | 0 | -<notextile>Pointers on improving the style:</notextile>- |
148
- | 0 | <notextile>h1. Improving the style of this wiki</notextile> |
149
- | 2 | -<notextile>* You can change the logo on the right by replacing 'logo.png' in the attachment folder of the wiki you have created</notextile>- |
150
- | 3 | -<notextile>* You can change the style and layout of this wiki by changing the files in the views folder of the wiki. In particular the frame.rhtml file contains the bulk of the html for most pages.</notextile>- |
151
- | 2 | <notextile>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).</notextile> |
152
- | 4 | <notextile>h2. Changing the logo on the right</notextile> |
153
- | 6 | <notextile>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)</notextile> |
154
- | 8 | <notextile>h2. Changing the color scheme</notextile> |
155
- | 10 | <notextile>The stylesheet is stored in the attachment folder of the wiki you have created (soks-wiki/attachment/stylesheet.css by default).</notextile> |
156
- | 12 | <notextile>h2. Changing the html and layout</notextile> |
157
- | 14 | <notextile>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 : http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html ]].</notextile> |
158
- | 16 | <notextile>The folder contains:</notextile> |
159
- | 17 | <notextile>* frame.rhtml - This is the bulk of the html and is used to wrap all pages except those ending in 'print' or 'rss'</notextile> |
160
- | 18 | <notextile>* Page_view.rhtml - This is the 'standard' viewing page</notextile> |
161
- | 19 | <notextile>* Page_edit.rhtml - This is the 'standard' editing page</notextile> |
162
- | 20 | <notextile>* Page_revisions.rhtml - This is the 'standard' revisions page</notextile> |
163
- | 21 | <notextile>* Page_rss.rhtml - This attempts to create a rss feed for changes to the page (buggy?)</notextile> |
164
- | 23 | <notextile>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. </notextile> |
165
- | 25 | <notextile>Note that you must restart soks for changes to the template to take effect.</notextile> |
166
-
167
- On 2005 Jan 11, tamc2 made these changes to [[How to export a site from this wiki]]:
168
- | 0 | <notextile>h1. How to export a site from this wiki</notextile> |
169
- | 2 | <notextile>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.</notextile> |
170
- | 4 | <notextile>The authors, and change history of each page are stored in the same folder with a .marshal extension. These are marshalled arrays of Revision objects. These are harder to export, but the general approach would be to go to the contents folder, launch irb, require 'soks-model', Marshal.load each page and do whatever conversion you need.</notextile> |
171
-
172
- On 2005 Jan 11, tamc2 made these changes to [[home page]]:
173
- | 9 | <notextile>* How to export a site from this wiki</notextile> |
174
-
175
- On 2005 Jan 11, tamc2 made these changes to [[How to import a site from instiki]]:
176
- | 2 | -<notextile>[[ 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.</notextile>- |
177
- | 2 | <notextile>[[ 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:</notextile> |
178
-
179
- On 2005 Jan 11, tamc2 made these changes to [[How to import a site from instiki]]:
180
- | 4 | <notextile># Launch your instiki wiki</notextile> |
181
- | 5 | -<notextile>#�Launch your instiki wiki</notextile>- |
182
-
183
- On 2005 Jan 11, tamc2 made these changes to [[How to import a site from instiki]]:
184
- | 4 | -<notextile>#</notextile>- |
185
- | 5 | -<notextile>#�Launch your instiki wiki</notextile>- |
186
- | 5 | <notextile>#�Launch your instiki wiki</notextile> |
187
-
188
- On 2005 Jan 11, tamc2 made these changes to [[How to import a site from instiki]]:
189
- | 2 | -<notextile>[[ 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</notextile>- |
190
- | 2 | <notextile>[[ 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.</notextile> |
191
- | 4 | <notextile>#</notextile> |
192
-
193
- On 2005 Jan 11, tamc2 made these changes to [[How to import a site from instiki]]:
194
- | 2 | -<notextile>[[ 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:</notextile>- |
195
- | 2 | <notextile>[[ 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</notextile> |
196
-
197
- On 2005 Jan 11, tamc2 made these changes to [[How to import a site from instiki]]:
198
- | 2 | -<notextile>[[ 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:</notextile>- |
199
- | 2 | <notextile>[[ 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</notextile> |
200
-
201
- On 2005 Jan 11, tamc2 made these changes to [[How to import a site from instiki]]:
202
- | 4 | -<notextile>#�Launch your instiki wiki.</notextile>- |
203
- | 5 | <notextile>#�Launch your instiki wiki</notextile> |
data/template/start.rb DELETED
@@ -1,74 +0,0 @@
1
- #!/usr/local/bin/ruby
2
-
3
- # This file was created automatically on <%= Time.now %>
4
- # Uncomment different sections to enable features of this wiki.
5
-
6
- #Add the required libraries to the search path:
7
- $:.push( "<%= settings[:soks_libraries].join('","') %>" )
8
-
9
- require 'soks'
10
-
11
- module StartSoks
12
-
13
- CUSTOMSETTINGS = {
14
- :root_directory => '<%= settings[:root_directory] %>',
15
- # :name => 'test',
16
- # :description => 'A Soks Wiki',
17
- # :url => 'http://localhost:8000',
18
- # :port => 8000,
19
- # :dont_authenticate => ['view','rss'], # To allow anyone to read
20
- # :dont_authenticate => [], # Require authentication for reading as well as editing
21
- # :authenticator => WEBrick::HTTPAuth::NotAuthentication.new( 'No password, just enter a name'), # Doesn't require a passwrod
22
- # :authenticator => WEBrick::HTTPAuth::OnePasswordAuthentication.new( 'password', 'Enter the site wide password (password by default!)' ), # One group wide password
23
- # :authenticator => WEBrick::HTTPAuth::BasicAuth.new( :UserDB => htpasswd, :Realm => realm ) # See webrick documentation
24
- # :authenticator => WEBrick::HTTPAuth::DigestAuth.new( :UserDB => htpdigest, :Realm => realm ) # See webrick documentation
25
- }
26
-
27
- def self.start
28
- start_wiki( CUSTOMSETTINGS ) do |wiki|
29
- AutomaticUpdateCrossLinks.new( wiki )
30
- AutomaticRecentChanges.new( wiki )
31
-
32
- AutomaticOnePageIndex.new( wiki ) # Index on one page, best for small wikis
33
- # AutomaticMultiPageIndex.new( wiki ) # One page per letter index, best for large wikis
34
-
35
- # calendar = AutomaticCalendar.new( wiki ) # Adds a series of calendar pages to the wiki
36
- # AutomaticUpcomingEvents.new( wiki, calendar ) # Creates a page with the next weeks events drawn from the calendar pages
37
-
38
- =begin
39
- # Example of an automatically generated summary of any new pages whose title starts with 'news'
40
- AutomaticSummary.new( wiki,
41
- :regexp_for_pages => /^NNews/i,
42
- :max_pages_to_show => 10,
43
- :pagename => 'Recent News',
44
- :lines_to_include => 10,
45
- :only_new_pages => true
46
- )
47
- =end
48
-
49
- =begin
50
- # Example of an automatically generated summary of any new pages whose title starts with 'blog'
51
- AutomaticSummary.new( wiki,
52
- :regexp_for_pages => /^NBlog/i,
53
- :max_pages_to_show => 10,
54
- :pagename => 'Recent Blog Entries',
55
- :only_new_pages => true
56
- )
57
- =end
58
- =begin
59
- # Example of an automatically generated summary of all recently updated pages
60
- AutomaticSummary.new( wiki,
61
- :regexp_for_pages => /.*/i,
62
- :max_pages_to_show => 10,
63
- :pagename => 'New or Updated Pages',
64
- :lines_to_include => 10
65
- )
66
- =end
67
- end
68
- end
69
-
70
- end
71
-
72
- if $0 == __FILE__ then
73
- StartSoks::start
74
- end
@@ -1,36 +0,0 @@
1
- <span class='pagename'><%= pagename %><%= page.deleted? ? "(Deleted)" : '' %></span>
2
-
3
- <form action='/upload/<%= pagename %>' method=post enctype=multipart/form-data >
4
- <input type=hidden name='titleprefix' value='Attached ' />
5
- <table>
6
- <tr><td>Title:</td><td>Attached <input name='newtitle' size = '52' value='<%= pagename[ 9..-1].strip %>' onClick="this.value == 'Type a title here' ? this.value = '' : true"/></td></tr>
7
- <tr><td valign='top'>File:</td><td><input name='file' type=file /></td></tr>
8
- <tr><td>Author:</td><td><a href='/<%= person %>'><%= person %></a> Quit browser to log out.</td>
9
- <tr><td></td><td><input name=action value='Save changes' type=submit accesskey="S"> <a href='/<%= pagename %>' accesskey="C" >(Cancel)</a> or <a href='/delete/<%= pagename %>' accesskey='D'>(Delete)</a> this page.</td></tr>
10
- </table>
11
- </form>
12
- <hr>
13
- <% unless page.empty? %>
14
- <p>The most recent change was made by <a href='/<%= page.author %>'><%= page.author %></a> who changed:</p>
15
- <%
16
- page.changes.each do |change_group|
17
- change_group.each do |change|
18
- case change[0]
19
- when "-" %>
20
- <del><%= change[1] %>. <%= change[2] %></del><br/>
21
- <% when "+" %>
22
- <%= change[1] %>. <%= change[2] %><br/>
23
- <%
24
- end
25
- end
26
- end
27
- %>
28
- <p>
29
- <a href='/rollback/<%= pagename %>?revision=<%= page.number - 1 %>' accesskey="U" >(Undo this change)</a> or <a href='/revisions/<%= pagename %>' accesskey="A" >(Show All changes)</a> or
30
- <% if page.watching? person %>
31
- <a href='/unwatch/<%= pagename %>' accesskey="E" >(Don't e-mail when this page changes)</a>
32
- <% else %>
33
- <a href='/watch/<%= pagename %>' accesskey="E" >(E-mail when this page changes)</a>
34
- <% end %>
35
- </p>
36
- <% end %>
@@ -1,36 +0,0 @@
1
- <span class='pagename'><%= pagename %><%= page.deleted? ? "(Deleted)" : '' %></span>
2
-
3
- <form action='/upload/<%= pagename %>' method=post enctype=multipart/form-data >
4
- <input type=hidden name='titleprefix' value='Picture of ' />
5
- <table>
6
- <tr><td>Title:</td><td>Picture of <input name='newtitle' size = '51' value='<%= pagename[ 10..-1].strip %>' onClick="this.value == 'Type a title here' ? this.value = '' : true"/></td></tr>
7
- <tr><td valign='top'>File:</td><td><input name='file' type=file /></td></tr>
8
- <tr><td>Author:</td><td><a href='/<%= person %>'><%= person %></a> Quit browser to log out.</td>
9
- <tr><td></td><td><input name=action value='Save changes' type=submit accesskey="S"> <a href='/<%= pagename %>' accesskey="C" >(Cancel)</a> or <a href='/delete/<%= pagename %>' accesskey='D'>(Delete)</a> this page.</td></tr>
10
- </table>
11
- </form>
12
- <hr>
13
- <% unless page.empty? %>
14
- <p>The most recent change was made by <a href='/<%= page.author %>'><%= page.author %></a> who changed:</p>
15
- <%
16
- page.changes.each do |change_group|
17
- change_group.each do |change|
18
- case change[0]
19
- when "-" %>
20
- <del><%= change[1] %>. <%= change[2] %></del><br/>
21
- <% when "+" %>
22
- <%= change[1] %>. <%= change[2] %><br/>
23
- <%
24
- end
25
- end
26
- end
27
- %>
28
- <p>
29
- <a href='/rollback/<%= pagename %>?revision=<%= page.number - 1 %>' accesskey="U" >(Undo this change)</a> or <a href='/revisions/<%= pagename %>' accesskey="A" >(Show All changes)</a> or
30
- <% if page.watching? person %>
31
- <a href='/unwatch/<%= pagename %>' accesskey="E" >(Don't e-mail when this page changes)</a>
32
- <% else %>
33
- <a href='/watch/<%= pagename %>' accesskey="E" >(E-mail when this page changes)</a>
34
- <% end %>
35
- </p>
36
- <% end %>
@@ -1,34 +0,0 @@
1
- <span class='pagename'><%= pagename %> <%= page.deleted? ? "(Deleted)" : '' %></span>
2
- <form method=post action='/save/<%= pagename %>' >
3
- <table>
4
- <tr><td>Title:</td><td><input name='newtitle' size = '60' value='<%= pagename %>' onClick="this.value == 'Type a title here' ? this.value = '' : true"/></td></tr>
5
- <tr><td valign='top'>Content:</td><td><textarea name='content' rows=30 cols=60 onClick="this.value == 'Type what you want here and click save' ? this.value = '' : true" ><%= page.content %></textarea></td></tr>
6
- <tr><td>Author:</td><td><a href='/<%= person %>'><%= person %></a> Quit browser to log out.</td>
7
- <tr><td></td><td><input name=action value='Save changes' type=submit accesskey="S"> <a href='/<%= pagename %>' accesskey="C" >(Do not Save)</a> or <a href='/delete/<%= pagename %>' accesskey='D'>(Delete)</a> this page.</td></tr>
8
- </table>
9
- </form>
10
- <hr>
11
- <% unless page.empty? %>
12
- <p>The most recent change was made by <a href='/<%= page.author %>'><%= page.author %></a> who changed:</p>
13
- <%
14
- page.changes.each do |change_group|
15
- change_group.each do |change|
16
- case change[0]
17
- when "-" %>
18
- <del><%= change[1] %>. <%= change[2] %></del><br/>
19
- <% when "+" %>
20
- <%= change[1] %>. <%= change[2] %><br/>
21
- <%
22
- end
23
- end
24
- end
25
- %>
26
- <p>
27
- <a href='/rollback/<%= pagename %>?revision=<%= page.number-1 %>' accesskey="U" >(Undo this change)</a> or <a href='/revisions/<%= pagename %>' accesskey="A" >(Show All changes)</a> or
28
- <% if page.watching? person %>
29
- <a href='/unwatch/<%= pagename %>' accesskey="E" >(Don't e-mail when this page changes)</a>
30
- <% else %>
31
- <a href='/watch/<%= pagename %>' accesskey="E" >(E-mail when this page changes)</a>
32
- <% end %>
33
- </p>
34
- <% end %>
@@ -1,5 +0,0 @@
1
- <html>
2
- <body>
3
- <%= renderedview %>
4
- </body>
5
- </html>
@@ -1,18 +0,0 @@
1
- <span class='pagename'><%= pagename %></span>
2
- <div class="undochange">
3
- <% page.revisions.reverse_each do |revision| %>
4
- <p><b><%= revision.number %>. On <%= revision.created_at %> <a href='/<%= revision.author %>'><%= revision.author %></a> changed:</b> <a href='/rollback/<%= pagename %>?revision=<%= revision.number %>' >(return to this version)</a><br/>
5
- <% revision.changes.each do |change_group| %>
6
- <% change_group.each do |change|
7
- case change[0]
8
- when "-" %>
9
- <del><%= change[1] %>. <%= change[2] %></del><br/>
10
- <% when "+" %>
11
- <%= change[1] %>. <%= change[2] %><br/>
12
- <% end %>
13
- <% end %>
14
- <% end %>
15
- </p>
16
- <% end %>
17
- <br/>(<a href='/edit/<%= pagename %>' accesskey="R" >Return to editing</a>)
18
- </div>
@@ -1,34 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
3
- <channel>
4
- <title><%= $SETTINGS[:name] %>:<%= pagename %></title>
5
- <link><%= $SETTINGS[:url] %></link>
6
- <description><%= $SETTINGS[:description] %></description>
7
- <language>en-us</language>
8
- <% count = 0 %>
9
- <% for revision in page.revisions %>
10
- <% count += 1 %>
11
- <% break if count > 15 %>
12
- <item>
13
- <title><%= revision.author %></title>
14
- <link><%= $SETTINGS[:url] %>/<%= pagename %></link>
15
- <description>
16
- <p>
17
- <% revision.changes.each do |change_group| %>
18
- <% change_group.each do |change|
19
- case change[0]
20
- when "-" %>
21
- <del><%= change[1] %>. <%= change[2] %></del><br/>
22
- <% when "+" %>
23
- <%= change[1] %>. <%= change[2] %><br/>
24
- <% end %>
25
- <% end %>
26
- <% end %>
27
- </p>
28
- </description>
29
- <dc:date><%= page.created_at.strftime "%a, %e %b %Y %H:%M:%S %Z" %></dc:date>
30
- <dc:creator><%= revision.author %></dc:creator>
31
- </item>
32
- <% end %>
33
- </channel>
34
- </rss>