From Bil.Kleb at nasa.gov Thu Jan 5 15:37:26 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Thu, 05 Jan 2006 15:37:26 -0500 Subject: [Soks] FOAF-a-matic -- Describe yourself in RDF Message-ID: <43BD8386.9040008@NASA.gov> Our Soks wiki users want to get people FOAFed, http://www.ldodds.com/foaf/foaf-a-matic Is this a feasible extension of Soks? Regards, -- Bil Kleb http://fun3d.larc.nasa.gov From eknapp at gmail.com Thu Jan 5 15:49:19 2006 From: eknapp at gmail.com (Eric Knapp) Date: Thu, 5 Jan 2006 14:49:19 -0600 Subject: [Soks] Attached files Message-ID: <3531474a0601051249g67caa11eq5ecfd5c52aa6321c@mail.gmail.com> Hello, I am attempting to be able to add colored source code display to Soks and I'm close. The great text editor jEdit has a plugin that generates a nice html version of any source code. It creates a pre tag that I can just paste right into a soks page. However, the textile engine is striping out all asterisks. Is there a way to escape the asterisks somehome? Thanks, -Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/soks-discuss/attachments/20060105/d5e8ce51/attachment.htm From eknapp at gmail.com Thu Jan 5 15:51:32 2006 From: eknapp at gmail.com (Eric Knapp) Date: Thu, 5 Jan 2006 14:51:32 -0600 Subject: [Soks] Attached files In-Reply-To: <3531474a0601051249g67caa11eq5ecfd5c52aa6321c@mail.gmail.com> References: <3531474a0601051249g67caa11eq5ecfd5c52aa6321c@mail.gmail.com> Message-ID: <3531474a0601051251n37a1e28bn512fbdba92da7c80@mail.gmail.com> Well, I have the wrong subject. It should read, "display asterisks?" Sorry about that. -Eric On 1/5/06, Eric Knapp wrote: > > Hello, > > I am attempting to be able to add colored source code display to Soks and > I'm close. The great text editor jEdit has a plugin that generates a nice > html version of any source code. It creates a pre tag that I can just paste > right into a soks page. However, the textile engine is striping out all > asterisks. Is there a way to escape the asterisks somehome? > > Thanks, > > -Eric > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/soks-discuss/attachments/20060105/0019561c/attachment.htm From eknapp at gmail.com Sun Jan 8 17:49:42 2006 From: eknapp at gmail.com (Eric Knapp) Date: Sun, 8 Jan 2006 16:49:42 -0600 Subject: [Soks] Multiple authentication systems Message-ID: <3531474a0601081449q27ab4fb6o9861fff9218de5ef@mail.gmail.com> Hi all, I am finding the documentation for Multiple authentication a bit too brief. Here is the link from the Soks docs: http://www.soks.org/view/HowToPasswordProtectYourWiki Under these section "Multiple authentication systems" where do the htdigest files go and what, exactly, should go in them? I want to do just what the example shows, one group can edit and another can only view. Thanks, -Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/soks-discuss/attachments/20060108/4a66c578/attachment.htm From skorgu at gmail.com Sun Jan 8 21:04:50 2006 From: skorgu at gmail.com (Patrick Hahn) Date: Sun, 8 Jan 2006 21:04:50 -0500 Subject: [Soks] Multiple authentication systems In-Reply-To: <3531474a0601081449q27ab4fb6o9861fff9218de5ef@mail.gmail.com> References: <3531474a0601081449q27ab4fb6o9861fff9218de5ef@mail.gmail.com> Message-ID: To do the multiple-authentication trick with digest authentication you need to have a setup such as this: servlet.authenticators << [ %r{/(view|rss|print|find|meta|attachment)/.*}, WEBrick::HTTPAuth::DigestAuth.new( :UserDB => WEBrick::HTTPAuth:: Htdigest.new('/path/to/htdigest.read'), :Realm => "auth") ] servlet.authenticators << [ %r{/(upload|edit|save|dav)/.*}, WEBrick::HTTPAuth::DigestAuth.new( :UserDB => WEBrick::HTTPAuth:: Htdigest.new('/path/to/htdigest.write'), :Realm => "auth") ] I don't know why it wouldn't work using htpasswd authentication the same way, but I've not done it. Digest is more secure but very old clients won't support it. This isn't important to me but it may be to you. To use htdigest auth, you need an htdigest.write and an htdigest.read as in above. The htdigest.read contains authentication credentials (username, realm [in my example this is "auth"] password) for those who should be able to read the wiki. The htdigest.write contains the same for those who should be able to write. Writers must exist in both files for this to work properly. This makes adding users a bit of a pain: If you have apache 1 or 2 installed someplace or are willing to get it to get at the htdigest tool you can use it with syntax: * htdigest* [ -*c* ] passwdfile realm username The -c flag will create the passwdfile if it does not exist. Realm is "auth" in this example and must be identical for read and write. Username is the username. You will have to run this twice for each user, once giving htdigest.read as the passwdfile and once with htdigest.write if the user is to be able to write. If the user is read-only (my two files are identical except for a read-only user called "guest") simply run htdigest once on the .read file. If you don't have the htdigest tool, you can fake it. The htdigest format is simply: username:realm:hash where hash is the md5 sum of the string username:realm:password For a user named "bob" with password "jones110" in realm "auth" you would add "bob:auth:" to whichever htdigest file you're doing now and then generate the digest by md5sum >> htdigest.read [RETURN] bob:auth:jones110[CTRL+D][CTRL+D] and then open the htdigest file up and trim out the newline, and that annoying dash that md5sum insists on outputting so that the line looks like: bob:auth:47d0b1d5ad042ef290e0c19645556cab and then add that line to the .write file if you want bob to be able to write to the wiki. There's probably an easy way to script this either in ruby or bash but I'm too lazy to do it. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/soks-discuss/attachments/20060108/3d78af68/attachment.htm From skorgu at gmail.com Mon Jan 9 10:47:41 2006 From: skorgu at gmail.com (Patrick Hahn) Date: Mon, 9 Jan 2006 10:47:41 -0500 Subject: [Soks] Multiple authentication systems In-Reply-To: <3531474a0601082007x5f7659e3q11ff21bd3fec1466@mail.gmail.com> References: <3531474a0601081449q27ab4fb6o9861fff9218de5ef@mail.gmail.com> <3531474a0601082007x5f7659e3q11ff21bd3fec1466@mail.gmail.com> Message-ID: ahh, that goes in start.rb, it replaces the stock servlet.authenticators << ... line. I have no idea how this will impact multiple wikis, I suspect you'd need multiple servlet objects as well as multuple wiki objects, or multiple start.rbs On 1/8/06, Eric Knapp wrote: > > Patrick, > > Thanks, I'm getting closer. Next question is where does the code that you > have quoted, that starts with "servlet.authenticators" go in my wiki? I > have lots of Soks wikis on my server and I need to do this per wiki, not > globally. I understand the rest of your post and it is really helpful. > > -Eric > > On 1/8/06, Patrick Hahn wrote: > > > To do the multiple-authentication trick with digest authentication you > > need to have a setup such as this: > > > > servlet.authenticators << [ > > %r{/(view|rss|print|find|meta|attachment)/.*}, WEBrick::HTTPAuth:: > > DigestAuth.new( :UserDB => WEBrick::HTTPAuth::Htdigest.new('/path/to/htdigest.read'), > > :Realm => "auth") ] > > > > servlet.authenticators << [ %r{/(upload|edit|save|dav)/.*}, > > WEBrick::HTTPAuth::DigestAuth.new ( :UserDB => WEBrick::HTTPAuth:: > > Htdigest.new('/path/to/htdigest.write'), :Realm => "auth") ] > > > > > > I don't know why it wouldn't work using htpasswd authentication the same > > way, but I've not done it. Digest is more secure but very old clients won't > > support it. This isn't important to me but it may be to you. > > > > To use htdigest auth, you need an htdigest.write and an htdigest.read as > > in above. > > > > The htdigest.read contains authentication credentials (username, realm > > [in my example this is "auth"] password) for those who should be able to > > read the wiki. The htdigest.write contains the same for those who should > > be able to write. Writers must exist in both files for this to work > > properly. This makes adding users a bit of a pain: > > > > If you have apache 1 or 2 installed someplace or are willing to get it > > to get at the htdigest tool you can use it with syntax: > > * > > htdigest* [ -*c* ] passwdfile realm username > > > > The -c flag will create the passwdfile if it does not exist. Realm is > > "auth" in this example and must be identical for read and write. Username is > > the username. You will have to run this twice for each user, once giving > > htdigest.read as the passwdfile and once with htdigest.write if the user > > is to be able to write. If the user is read-only (my two files are identical > > except for a read-only user called "guest") simply run htdigest once on the > > .read file. > > If you don't have the htdigest tool, you can fake it. The htdigest > > format is simply: > > > > username:realm:hash > > > > where hash is the md5 sum of the string > > > > username:realm:password > > > > For a user named "bob" with password "jones110" in realm "auth" you > > would add "bob:auth:" to whichever htdigest file you're doing now and then > > generate the digest by > > > > md5sum >> htdigest.read [RETURN] > > bob:auth:jones110[CTRL+D][CTRL+D] > > > > and then open the htdigest file up and trim out the newline, and that > > annoying dash that md5sum insists on outputting so that the line looks like: > > > > > > bob:auth:47d0b1d5ad042ef290e0c19645556cab > > > > and then add that line to the .write file if you want bob to be able to > > write to the wiki. > > > > There's probably an easy way to script this either in ruby or bash but > > I'm too lazy to do it. > > > > _______________________________________________ > > Soks-discuss mailing list > > Soks-discuss at rubyforge.org > > http://rubyforge.org/mailman/listinfo/soks-discuss > > > > > > > -- Patrick Hahn AHKM Computer and Network Integration patrick at ahkm.com +1 (800) 554 9803 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/soks-discuss/attachments/20060109/9414858a/attachment-0001.htm From tamc2 at cam.ac.uk Mon Jan 16 04:59:11 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Mon, 16 Jan 2006 09:59:11 +0000 Subject: [Soks] attachment/upload directory confusion In-Reply-To: <43B3C503.5000007@NASA.gov> References: <43B3C503.5000007@NASA.gov> Message-ID: Hi Bil Sorry for the enormous delay in responding. I've been away. On 29 Dec 2005, at 11:14, Bil Kleb wrote: > I'm now confused by the capitalization in the lines, > > servlet.static_file_directories[ 'Attachment' ] = "# > {root_directory}/attachment" > servlet.upload_directory = 'Attachment' # Must be one of the > static file directories > > Currently, our wiki uses a lower-case directory 'attachments', > but prepends capitalized 'Attachment' to page titles to access > these. > > I don't understand the second line being set to > a capitalized "Attachment". The method name seems > to imply that this is the name of the uploads directory, > but isn't it just the hash key of the static_file_directories? Potentially a poor choice of method name. The idea is that you can have several static_file_directories (so you can have, for instance, a servlet.static_file_directories [ 'Documents' ] = "/groups/team/pdfs" as well) and then the servlet.upload_directory is set to the hash key for the directory into which uploads can be made. Let me know if that isn't clear? Tom From tamc2 at cam.ac.uk Mon Jan 16 05:02:18 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Mon, 16 Jan 2006 10:02:18 +0000 Subject: [Soks] MergeOldRevisionsHelper In-Reply-To: <43B3C1B2.4000709@NASA.gov> References: <43B3C1B2.4000709@NASA.gov> Message-ID: Hi Bil On 29 Dec 2005, at 11:00, Bil Kleb wrote: > Is this comment lying? > > class MergeOldRevisionsHelper > > # Default wakes up each hour and merges all revisions more > than 24 hours old, by the same author, and that are created within > an hour of each other > def initialize( wiki, event_to_check_on = :day, > minimum_age_to_merge = 60*60*24*365, > maximum_time_between_revisions_for_merge = 60*60 ) > > I'm trying to figure out the start.rb line, > > MergeOldRevisionsHelper.new( wiki, :day, 2, 60*60*24) Yes. It is lying: # Default wakes up each day, and merges all revisions more than a year old, by the same author, and are created within an hour of each other. In the development and testing versions I'm mulling the idea of going back to what happened in the earlier version of Soks (and happens in Instiki) - all revisions are merged at the time they are created if they are by the same author and within X minutes of each other. Tom From tamc2 at cam.ac.uk Mon Jan 16 05:06:52 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Mon, 16 Jan 2006 10:06:52 +0000 Subject: [Soks] FOAF-a-matic -- Describe yourself in RDF In-Reply-To: <43BD8386.9040008@NASA.gov> References: <43BD8386.9040008@NASA.gov> Message-ID: Hello Bil On 5 Jan 2006, at 20:37, Bil Kleb wrote: > Our Soks wiki users want to get people FOAFed, > > http://www.ldodds.com/foaf/foaf-a-matic > > Is this a feasible extension of Soks? Umm, I'm not sure. I guess you are asking whether there could be some form of mark up that people add, that would be automatically turned into a FOAF rdf file? If so, then, I guess the big question would be what that mark up should be and coding a transformer. Tom From tamc2 at cam.ac.uk Mon Jan 16 05:08:24 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Mon, 16 Jan 2006 10:08:24 +0000 Subject: [Soks] Attached files In-Reply-To: <3531474a0601051249g67caa11eq5ecfd5c52aa6321c@mail.gmail.com> References: <3531474a0601051249g67caa11eq5ecfd5c52aa6321c@mail.gmail.com> Message-ID: Hello Eric Sorry for the delay in responding. I've been away. Could you send me a snipet of the html you are trying to paste that demonstrates the problem? Thanks Tom On 5 Jan 2006, at 20:49, Eric Knapp wrote: > Hello, > > I am attempting to be able to add colored source code display to > Soks and I'm close. The great text editor jEdit has a plugin that > generates a nice html version of any source code. It creates a pre > tag that I can just paste right into a soks page. However, the > textile engine is striping out all asterisks. Is there a way to > escape the asterisks somehome? > > Thanks, > > -Eric > > > _______________________________________________ > Soks-discuss mailing list > Soks-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/soks-discuss From eknapp at gmail.com Thu Jan 19 10:33:46 2006 From: eknapp at gmail.com (Eric Knapp) Date: Thu, 19 Jan 2006 09:33:46 -0600 Subject: [Soks] Trying to understand Undo Message-ID: <3531474a0601190733r22eede81k6caac7fe1a2a0d22@mail.gmail.com> Hi, I just got bit by something and I guess I don't understand how the "Undo this change" works. I had assumed that it did more than just one level of undo. I accidently goofed up a page and now I can't get back to the version I want. How does this work? I am used to versioning with CVS or Subversion and I would like to somehow have that functionality with Soks. Is this possible? Thanks, -Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/soks-discuss/attachments/20060119/532d4c6e/attachment.htm From tamc2 at cam.ac.uk Thu Jan 19 13:24:02 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Thu, 19 Jan 2006 18:24:02 +0000 Subject: [Soks] Trying to understand Undo In-Reply-To: <3531474a0601190733r22eede81k6caac7fe1a2a0d22@mail.gmail.com> References: <3531474a0601190733r22eede81k6caac7fe1a2a0d22@mail.gmail.com> Message-ID: <701E8350-5D9D-4C37-97B6-0281F7EBAC85@cam.ac.uk> Hi Eric If you want to undo just the last change, then the 'undo this change' at the bottom of the edit page will do it. If you want to go back further, click 'Show All Changes' at the bottom of the edit page and then the 'undo changes above'. Unfortunately there is a bug at the latest version where show all changes may display the oldest changes first, rather than the newest, and the 'older revisions' and 'newer revisions' are therefore incorrect (swapped). Kris Klindworth has provided a fix for this: http://www.soks.org/view/ BugRevisionsAreDisplayedOldestFirstRatherThanNewestFirst I hope to find time this weekend to include it and make a new relese. Thanks, Tom On 19 Jan 2006, at 15:33, Eric Knapp wrote: > Hi, > > I just got bit by something and I guess I don't understand how the > "Undo this change" works. I had assumed that it did more than just > one level of undo. I accidently goofed up a page and now I can't > get back to the version I want. How does this work? > > I am used to versioning with CVS or Subversion and I would like to > somehow have that functionality with Soks. Is this possible? > > Thanks, > > -Eric > _______________________________________________ > Soks-discuss mailing list > Soks-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/soks-discuss From joe.swatosh at gmail.com Fri Feb 3 12:30:54 2006 From: joe.swatosh at gmail.com (Joe Swatosh) Date: Fri, 3 Feb 2006 09:30:54 -0800 Subject: [Soks] Soks on Windows (A cry for help) Message-ID: Soks is slick and is working great when I access it via localhost running on WinXP. When I try to access it over a network I can't get to it. "Ah ha!" I hear you thinking, "It's the windows firewall!" The problem I have with that theory is the instiki wiki I have running on a different port that _is_ reachable over the network. Both are using WEBrick, and I could see no obvious differences in the setup. Any one have a good idea? Thanks, Joe From tamc2 at cam.ac.uk Fri Feb 3 12:37:35 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Fri, 3 Feb 2006 17:37:35 +0000 Subject: [Soks] Soks on Windows (A cry for help) In-Reply-To: References: Message-ID: <5C5336B9-4252-49E6-B4F8-CBC23379D1C6@cam.ac.uk> Hi Joe Don't have a windows machine to test, but one thing that could go wrong is that, if you wish to be accessible beyond the localhost you need to tell soks your ip or domain name. Either answer the question when you do soks-create-wiki, or if you have a wiki already, by editing the soks-wiki/start.rb file, looking for the line view = View.new( wiki, "place to insert your ip/domain name") Let me know if that helps, or if you figure something else out? Thanks Tom On 3 Feb 2006, at 17:30, Joe Swatosh wrote: > Soks is slick and is working great when I access it via localhost > running on WinXP. When I try to access it over a network I can't get > to it. "Ah ha!" I hear you thinking, "It's the windows firewall!" > The problem I have with that theory is the instiki wiki I have running > on a different port that _is_ reachable over the network. Both are > using WEBrick, and I could see no obvious differences in the setup. > Any one have a good idea? > > Thanks, Joe > > _______________________________________________ > Soks-discuss mailing list > Soks-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/soks-discuss From joe.swatosh at gmail.com Sun Feb 5 15:25:58 2006 From: joe.swatosh at gmail.com (Joe Swatosh) Date: Sun, 5 Feb 2006 12:25:58 -0800 Subject: [Soks] Soks on Windows (A cry for help) In-Reply-To: <5C5336B9-4252-49E6-B4F8-CBC23379D1C6@cam.ac.uk> References: <5C5336B9-4252-49E6-B4F8-CBC23379D1C6@cam.ac.uk> Message-ID: Thanks Tom, it works a treat. On 2/3/06, Tom Counsell wrote: > Hi Joe > > Don't have a windows machine to test, but one thing that could go > wrong is that, if you wish to be accessible beyond the localhost you > need to tell soks your ip or domain name. Either answer the question > when you do soks-create-wiki, or if you have a wiki already, by > editing the soks-wiki/start.rb file, looking for the line view = > View.new( wiki, "place to insert your ip/domain name") > > Let me know if that helps, or if you figure something else out? > > Thanks > > Tom > From Bil.Kleb at nasa.gov Tue Feb 14 07:19:10 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Tue, 14 Feb 2006 07:19:10 -0500 Subject: [Soks] Revision merge and file deletion errors? Message-ID: <43F1CABE.3070506@NASA.gov> Hi Tom, I have, 24 wiki = Wiki.new( "#{root_directory}/content", "#{root_directory}/caches" ) .. 64 MergeOldRevisionsHelper.new( wiki, :day, 2, 60*60*24) .. 66 DeleteOldPagesHelper.new( wiki, :day, 60*60*24*7 ) in my startup script. And I happened to notice the following in standard output last night: /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:30:in `following_revision' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:21:in `previous_content' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:16:in `content' [..previous two lines repeated thousands(?) of times..] /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:112:in `check_revisions_to_merge_on' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:91:in `check_for_pages_to_merge' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:90:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:90:in `check_for_pages_to_merge' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:89:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:173:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:173:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:89:in `check_for_pages_to_merge' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:85:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:85:in `call' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:78:in `notify' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:76:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:76:in `notify' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:71:in `check_for_events' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:63:in `start_thread' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:62:in `loop' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:62:in `start_thread' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:61:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:61:in `new' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:61:in `start_thread' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:29:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:20:in `new' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:20:in `event_queue' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:6:in `watch_for' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:152:in `initialize' ./iiwikiweb.rb:24:in `new' ./iiwikiweb.rb:24 /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-storage.rb:69:in `delete' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-storage.rb:69:in `delete_files_for_page' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:207:in `wipe_from_disk' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:206:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:206:in `wipe_from_disk' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:17:in `check_and_delete_pages' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:13:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:173:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:173:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:13:in `check_and_delete_pages' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:7:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/maintenance-helpers.rb:7:in `call' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:78:in `notify' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:76:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:76:in `notify' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:71:in `check_for_events' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:63:in `start_thread' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:62:in `loop' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:62:in `start_thread' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:61:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:61:in `new' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:61:in `start_thread' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:29:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:20:in `new' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:20:in `event_queue' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:6:in `watch_for' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:152:in `initialize' ./iiwikiweb.rb:24:in `new' ./iiwikiweb.rb:24 which seems to correspond to events around midnight: I, [2006-02-14 00:00:03#22596] INFO -- : Saving revisions for Popular Pages I, [2006-02-14 00:00:03#22596] INFO -- : Refreshing Popular Pages I, [2006-02-14 00:00:03#22596] INFO -- : Saving revisions for Principal Authors I, [2006-02-14 00:00:03#22596] INFO -- : Refreshing Principal Authors W, [2006-02-14 00:00:04#22596] WARN -- : ERROR stack level too deep: day - W, [2006-02-14 00:00:04#22596] WARN -- : Permanently wiping past innovation lectures from wiki AND from disk W, [2006-02-14 00:00:04#22596] WARN -- : ERROR No such file or directory - /var/www/ii-wiki/content/past%20innovation%20lectures.textile: day - I, [2006-02-14 00:00:04#22596] INFO -- : Saving revisions for Recent changes to this site I, [2006-02-14 00:00:04#22596] INFO -- : Refreshing Recent changes to this site Do I have a corrupt file, or is there possibly a bug? Regards, -- Bil Kleb http://fun3d.larc.nasa.gov From Bil.Kleb at nasa.gov Tue Feb 14 07:20:53 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Tue, 14 Feb 2006 07:20:53 -0500 Subject: [Soks] attachment/upload directory confusion In-Reply-To: References: <43B3C503.5000007@NASA.gov> Message-ID: <43F1CB25.5030606@NASA.gov> Tom Counsell wrote: > On 29 Dec 2005, at 11:14, Bil Kleb wrote: > >> I'm now confused by the capitalization in the lines, >> >> servlet.static_file_directories[ 'Attachment' ] = "# >> {root_directory}/attachment" >> servlet.upload_directory = 'Attachment' # Must be one of the static >> file directories >> >> Currently, our wiki uses a lower-case directory 'attachments', >> but prepends capitalized 'Attachment' to page titles to access >> these. >> >> I don't understand the second line being set to >> a capitalized "Attachment". The method name seems >> to imply that this is the name of the uploads directory, >> but isn't it just the hash key of the static_file_directories? > > Potentially a poor choice of method name. > > The idea is that you can have several static_file_directories > (so you can have, for instance, a servlet.static_file_directories [ > 'Documents' ] = "/groups/team/pdfs" as well) > > and then the servlet.upload_directory is set to the hash key for the > directory into which uploads can be made. > > Let me know if that isn't clear? That's much better. Thanks, -- Bil Kleb http://fun3d.larc.nasa.gov From Bil.Kleb at nasa.gov Tue Feb 14 07:28:57 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Tue, 14 Feb 2006 07:28:57 -0500 Subject: [Soks] FOAF-a-matic -- Describe yourself in RDF In-Reply-To: References: <43BD8386.9040008@NASA.gov> Message-ID: <43F1CD09.1050704@NASA.gov> Tom Counsell wrote: > Hello Bil Hello. > On 5 Jan 2006, at 20:37, Bil Kleb wrote: > >> Our Soks wiki users want to get people FOAFed, >> >> http://www.ldodds.com/foaf/foaf-a-matic >> >> Is this a feasible extension of Soks? > > Umm, I'm not sure. I guess you are asking whether there could be some > form of mark up that people add, that would be automatically turned > into a FOAF rdf file? If so, then, I guess the big question would be > what that mark up should be and coding a transformer. Good answer. Currently, the interest has faded somewhat; so I'll invoke YAGNI (you ain't going to need it, and when you do, you'll know better how to implement it) Regards, -- Bil Kleb http://fun3d.larc.nasa.gov From tamc2 at cam.ac.uk Tue Feb 14 15:49:23 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Tue, 14 Feb 2006 20:49:23 +0000 Subject: [Soks] Revision merge and file deletion errors? In-Reply-To: <43F1CABE.3070506@NASA.gov> References: <43F1CABE.3070506@NASA.gov> Message-ID: Hi Bil I have seen the same thing I think: http://www.soks.org/view/ BugErrorStackLevelTooDeepDay But I haven't traced what is causing it yet. Tom On 14 Feb 2006, at 12:19, Bil Kleb wrote: > Hi Tom, > > I have, > > 24 wiki = Wiki.new( "#{root_directory}/content", "# > {root_directory}/caches" ) > .. > 64 MergeOldRevisionsHelper.new( wiki, :day, 2, 60*60*24) > .. > 66 DeleteOldPagesHelper.new( wiki, :day, 60*60*24*7 ) > > in my startup script. And I happened to notice the following > in standard output last night: > > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 30:in `following_revision' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 21:in `previous_content' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 16:in `content' > [..previous two lines repeated thousands(?) of times..] > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:112:in `check_revisions_to_merge_on' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:91:in `check_for_pages_to_merge' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:90:in `synchronize' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:90:in `check_for_pages_to_merge' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:89:in `each' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 173:in `each' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 173:in `each' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:89:in `check_for_pages_to_merge' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:85:in `initialize' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:85:in `call' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 78:in `notify' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 76:in `each' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 76:in `notify' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 71:in `check_for_events' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 63:in `start_thread' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 62:in `loop' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 62:in `start_thread' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 61:in `initialize' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 61:in `new' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 61:in `start_thread' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 29:in `initialize' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 20:in `new' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 20:in `event_queue' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:6:in > `watch_for' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 152:in `initialize' > ./iiwikiweb.rb:24:in `new' > ./iiwikiweb.rb:24 > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-storage.rb: > 69:in `delete' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-storage.rb: > 69:in `delete_files_for_page' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 207:in `wipe_from_disk' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 206:in `synchronize' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 206:in `wipe_from_disk' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:17:in `check_and_delete_pages' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:13:in `each' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 173:in `each' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 173:in `each' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:13:in `check_and_delete_pages' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:7:in `initialize' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/ > maintenance-helpers.rb:7:in `call' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 78:in `notify' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 76:in `each' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 76:in `notify' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 71:in `check_for_events' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 63:in `start_thread' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 62:in `loop' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 62:in `start_thread' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 61:in `initialize' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 61:in `new' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 61:in `start_thread' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 29:in `initialize' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 20:in `new' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb: > 20:in `event_queue' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:6:in > `watch_for' > /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb: > 152:in `initialize' > ./iiwikiweb.rb:24:in `new' > ./iiwikiweb.rb:24 > > which seems to correspond to events around midnight: > > I, [2006-02-14 00:00:03#22596] INFO -- : Saving revisions for > Popular Pages > I, [2006-02-14 00:00:03#22596] INFO -- : Refreshing Popular Pages > I, [2006-02-14 00:00:03#22596] INFO -- : Saving revisions for > Principal Authors > I, [2006-02-14 00:00:03#22596] INFO -- : Refreshing Principal Authors > W, [2006-02-14 00:00:04#22596] WARN -- : ERROR stack level too > deep: day - > W, [2006-02-14 00:00:04#22596] WARN -- : Permanently wiping past > innovation lectures from wiki AND from disk > W, [2006-02-14 00:00:04#22596] WARN -- : ERROR No such file or > directory - /var/www/ii-wiki/content/past%20innovation% > 20lectures.textile: day - > I, [2006-02-14 00:00:04#22596] INFO -- : Saving revisions for > Recent changes to this site > I, [2006-02-14 00:00:04#22596] INFO -- : Refreshing Recent changes > to this site > > Do I have a corrupt file, or is there possibly a bug? > > Regards, > -- > Bil Kleb > http://fun3d.larc.nasa.gov > > _______________________________________________ > Soks-discuss mailing list > Soks-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/soks-discuss From Bil.Kleb at nasa.gov Wed Feb 22 10:19:25 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Wed, 22 Feb 2006 10:19:25 -0500 Subject: [Soks] Switching style sheets based on page name Message-ID: <43FC80FD.7090202@NASA.gov> Hi Tom, Our wiki users want pages matching /yp: /i to use a "yellowpages" style sheet. I am thinking that this could be accomplished by a simple one-line change in the frame.rhtml view. So, ' rel='stylesheet' type='text/css' media='screen' /> becomes something like, ' rel='stylesheet' type='text/css' media='screen' /> Is this the appropriate tact? Thanks, -- Bil Kleb http://fun3d.larc.nasa.gov From tamc2 at cam.ac.uk Wed Feb 22 10:26:04 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Wed, 22 Feb 2006 15:26:04 +0000 Subject: [Soks] Switching style sheets based on page name In-Reply-To: <43FC80FD.7090202@NASA.gov> References: <43FC80FD.7090202@NASA.gov> Message-ID: <3842CD46-36D8-4555-90B3-67F9FB75DC99@cam.ac.uk> Good idea. Your proposal would certainly mean the fewest code changes, and looks like it should work fine, although maybe it will need a few parentheses? Tom On 22 Feb 2006, at 15:19, Bil Kleb wrote: > Hi Tom, > > Our wiki users want pages matching /yp: /i to use > a "yellowpages" style sheet. > > I am thinking that this could be accomplished by > a simple one-line change in the frame.rhtml view. So, > > ' rel='stylesheet' > type='text/css' media='screen' /> > > becomes something like, > > ' rel='stylesheet' type='text/ > css' media='screen' /> > > Is this the appropriate tact? > > Thanks, > -- > Bil Kleb > http://fun3d.larc.nasa.gov > _______________________________________________ > Soks-discuss mailing list > Soks-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/soks-discuss From Bil.Kleb at nasa.gov Fri Feb 24 05:52:47 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Fri, 24 Feb 2006 05:52:47 -0500 Subject: [Soks] Switching style sheets based on page name In-Reply-To: <3842CD46-36D8-4555-90B3-67F9FB75DC99@cam.ac.uk> References: <43FC80FD.7090202@NASA.gov> <3842CD46-36D8-4555-90B3-67F9FB75DC99@cam.ac.uk> Message-ID: <43FEE57F.7010608@NASA.gov> Tom Counsell wrote: > Good idea. Your proposal would certainly mean the fewest code changes, > and looks like it should work fine, although maybe it will need a few > parentheses? Thanks to your fine design, it did work fine with the addition of a set of parentheses, ' ... But, they always want more, don't they? :) Here's one response to this simple tweak. (We had been discussing making the yellow pages a separate wiki, but decided that having automatic links between yellow and non-yellow pages was worth keeping if possible.) OK, lets assume that we are not going to have a new site, it will just be a part of the current wiki. However, my concern will be making it user friendly enough for the bunch of newbies we will be inviting to participate in putting up their ?page?. So, [it seems] that we could configure the menu based on the @yp:@ designation ? good. Now to the data entry piece ? I assume we could make a data entry page for yellowpages, that would have the @yp:@ automatically entered in the page name field, as we do with other special pages. However, if some newbie erases the @yp:@, we have a [non-yellow] page that will freak them out. So, on the create a new yellow page, can the @yp:@ be added in behind the scenes so that the name they enter in the title box can not mess up the code? Someone else responds: I think this is what happens whenever someone enters a new @News@ item (the title automatically starts @News:@) and other similar pages in which the "headlines" are collected on a single page that [...] shows recent news items by sorting on the @News:@ string in the page title. Regarding the data entry piece... Couldn't we create a default "Add YP:" page that has certain predefined fields that prompt the user for certain info. For example, a text box for name (last, first, mi), email address, phone number, service/skill/expertise offered, etc.? That would provide the user with guidance as to what type of info is wanted. So it sounds like they want a yellow-pages-specific menu. Fine, that can be done in a similar manner as the stylesheet switch. (Although now I am getting scared that we're on the slippery slope of logic in the view...) However, what is the best way to create a non-Redcloth, field-based entry method like they describe? I am thinking that you'd want a new action, e.g., "edit-yp", that gives you a form and spits out Redcloth behind the scenes. However, what do you do when they edit the page again after it is created? Going back to the normal Redcloth edit mode might create even more confusion? Can you think of a more natural (Soks) way to handle this request? Thanks, -- Bil Kleb http://fun3d.larc.nasa.gov From tamc2 at cam.ac.uk Fri Feb 24 09:11:37 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Fri, 24 Feb 2006 14:11:37 +0000 Subject: [Soks] Switching style sheets based on page name In-Reply-To: <43FEE57F.7010608@NASA.gov> References: <43FC80FD.7090202@NASA.gov> <3842CD46-36D8-4555-90B3-67F9FB75DC99@cam.ac.uk> <43FEE57F.7010608@NASA.gov> Message-ID: <890505C3-AC62-4900-9676-D323FBBD410E@cam.ac.uk> Hi Bil On 24 Feb 2006, at 10:52, Bil Kleb wrote: > So, on the create a new yellow page, can the @yp:@ be > added in behind the scenes so that the name they enter > in the title box can not mess up the code? I think so, yes. If the edit form has a 'titleprefix' hidden field then it is automatically added to the front of the page title on save (this is what it does on the UploadPage edit form etc) . The awkward bit is that you might end up adding yet more control code to the view to make sure this prefix was there. This, and your previous query, has led me to ponder whether there might be a better way to select which view template is rendered for a particular page. Perhaps using some form of regexp match. > Someone else responds: > Regarding the data entry piece... Couldn't we create > a default "Add YP:" page that has certain predefined > fields that prompt the user for certain info. For example, > a text box for name (last, first, mi), email address, > phone number, service/skill/expertise offered, etc.? > That would provide the user with guidance as to what > type of info is wanted. Predefined content that prompts the user is doable. However I'm a bit loath to gently turn a wiki into a general purpose database/ content management system with fields, and formatting, and so on and so forth. Would think there are better tools for that. But I'll have a think about it? Tom From eknapp at gmail.com Tue Feb 28 21:06:17 2006 From: eknapp at gmail.com (Eric Knapp) Date: Tue, 28 Feb 2006 20:06:17 -0600 Subject: [Soks] Exporting to HTML Message-ID: <3531474a0602281806g1330397fje8733909530c5541@mail.gmail.com> Hello, I'm trying to get exporting to html working. I have read the docs and I need to put this code somewhere in start.rb: require 'helpers/wiki2html' Wiki2Html.new( wiki, view, :views_to_copy => ['view','meta','rss'], :extension => '.html', :destination_dir => '/home/user/my_wiki_html', :destination_url => '/') Where should this go in the file? And is this going to do what I want? I just want the entire wiki output to a directory as html. Thanks, -Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/soks-discuss/attachments/20060228/e54e86f6/attachment.htm From tamc2 at cam.ac.uk Wed Mar 1 05:16:44 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Wed, 1 Mar 2006 10:16:44 +0000 Subject: [Soks] Exporting to HTML In-Reply-To: <3531474a0602281806g1330397fje8733909530c5541@mail.gmail.com> References: <3531474a0602281806g1330397fje8733909530c5541@mail.gmail.com> Message-ID: <04BB5136-0CE0-4C6D-BD07-C98FC4383062@cam.ac.uk> Hello Eric On 1 Mar 2006, at 02:06, Eric Knapp wrote: > I'm trying to get exporting to html working. I have read the docs > and I need to put this code somewhere in start.rb: > require 'helpers/wiki2html' > Wiki2Html.new( wiki, view, > :views_to_copy => ['view','meta','rss'], > > :extension => '.html', > :destination_dir => '/home/user/my_wiki_html', > :destination_url => '/') > > Where should this go in the file? And is this going to do what I > want? I just want the entire wiki output to a directory as html. This should go between the 'wiki.watch_for(:start) do | event,wiki,view|' and 'end' bits of your start.rb file. This is the spot where all the helper classes get started. I use it on one site to duplicate the entire wiki as html, so that it can be served directly by apache. That site is actually running a previous version of soks, but hopefully nothing has broken between that and this version. Let me know if it has, and I'll make fixing it a priority. Tom From Bil.Kleb at nasa.gov Wed Mar 1 05:34:55 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Wed, 01 Mar 2006 05:34:55 -0500 Subject: [Soks] Subsetting Popular Pages Message-ID: <440578CF.3040304@NASA.gov> Hello, I naively tried, ViewCountHelper.new( wiki, [ 'view/Yp' ], 'Popular Yellow Pages', :hour, 50 ) To create a Popular Pages for a subset of pages beginning with "Yp", but it didn't work. How should I really do it? Thanks, -- Bil http://fun3d.larc.nasa.gov From tamc2 at cam.ac.uk Wed Mar 1 05:42:46 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Wed, 1 Mar 2006 10:42:46 +0000 Subject: [Soks] Subsetting Popular Pages In-Reply-To: <440578CF.3040304@NASA.gov> References: <440578CF.3040304@NASA.gov> Message-ID: Hi Bil On 1 Mar 2006, at 10:34, Bil Kleb wrote: > I naively tried, > > ViewCountHelper.new( wiki, [ 'view/Yp' ], 'Popular Yellow > Pages', :hour, 50 ) > > To create a Popular Pages for a subset of pages beginning > with "Yp", but it didn't work. > > How should I really do it? Umm, unfortunately that would require new code as the counters don't match through a regexp. You could kludge something together by: class YellowPageCounter < ViewCountHelper def should_count?( page, view, author ) return false unless @views_to_count.include?( view.downcase ) page.name =~ /^Yp/ end end YellowPageCounter.new( wiki, [ 'view' ], 'Popular Yellow Pages', :hour, 50 ) I guess in the long run, I may rewrite the counter helpers so that the should_count? is replaced by a block passed at initialisation. Tom From Bil.Kleb at nasa.gov Wed Mar 1 05:44:18 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Wed, 01 Mar 2006 05:44:18 -0500 Subject: [Soks] html in the page link name field Message-ID: <44057B02.5010805@NASA.gov> We have folks that insist on putting HTML tags in the page "title". I think this is partly due to confusion created by the name "Title". (We also have folks that put "h1. " or "*title*" in there, but it creates less confusion because the page name doesn't render oddly on the recent changes page.) Maybe change the field label from "Title:" to "Page name:" on the edit view and "Type a title here" to "Type a page name here"? In addition, perhaps strip html tags out of the "title" field, just to be more robust? Regards, -- Bil Kleb http://fun3d.larc.nasa.gov From tamc2 at cam.ac.uk Wed Mar 1 05:48:54 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Wed, 1 Mar 2006 10:48:54 +0000 Subject: [Soks] html in the page link name field In-Reply-To: <44057B02.5010805@NASA.gov> References: <44057B02.5010805@NASA.gov> Message-ID: Thanks for the feedback Bil. This sounds easy enough to do. Tom On 1 Mar 2006, at 10:44, Bil Kleb wrote: > We have folks that insist on putting HTML tags > in the page "title". I think this is partly due > to confusion created by the name "Title". > > (We also have folks that put "h1. " or "*title*" in there, > but it creates less confusion because the page name doesn't > render oddly on the recent changes page.) > > Maybe change the field label from "Title:" to "Page name:" > on the edit view and "Type a title here" to "Type a page > name here"? > > In addition, perhaps strip html tags out of the > "title" field, just to be more robust? > > Regards, > -- > Bil Kleb > http://fun3d.larc.nasa.gov > _______________________________________________ > Soks-discuss mailing list > Soks-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/soks-discuss From eknapp at gmail.com Wed Mar 1 10:37:27 2006 From: eknapp at gmail.com (Eric Knapp) Date: Wed, 1 Mar 2006 09:37:27 -0600 Subject: [Soks] Exporting to HTML In-Reply-To: <04BB5136-0CE0-4C6D-BD07-C98FC4383062@cam.ac.uk> References: <3531474a0602281806g1330397fje8733909530c5541@mail.gmail.com> <04BB5136-0CE0-4C6D-BD07-C98FC4383062@cam.ac.uk> Message-ID: <3531474a0603010737y5c15511fq4dfb6ce30542ebd5@mail.gmail.com> Hello Tom, I'm getting closer. I am getting this error: start-.rb:5:in `require': no such file to load -- helpers/wiki2html (LoadError) I'm assuming that I have to install wiki2html? Can you point me to this? Thanks, -Eric On 3/1/06, Tom Counsell wrote: > > Hello Eric > > On 1 Mar 2006, at 02:06, Eric Knapp wrote: > > I'm trying to get exporting to html working. I have read the docs > > and I need to put this code somewhere in start.rb: > > require 'helpers/wiki2html' > > Wiki2Html.new( wiki, view, > > :views_to_copy => ['view','meta','rss'], > > > > :extension => '.html', > > :destination_dir => '/home/user/my_wiki_html', > > :destination_url => '/') > > > > Where should this go in the file? And is this going to do what I > > want? I just want the entire wiki output to a directory as html. > > This should go between the 'wiki.watch_for(:start) do | > event,wiki,view|' and 'end' bits of your start.rb file. This is the > spot where all the helper classes get started. > > I use it on one site to duplicate the entire wiki as html, so that it > can be served directly by apache. That site is actually running a > previous version of soks, but hopefully nothing has broken between > that and this version. Let me know if it has, and I'll make fixing > it a priority. > > Tom > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/soks-discuss/attachments/20060301/32a7f99b/attachment.htm From tamc2 at cam.ac.uk Wed Mar 1 10:40:46 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Wed, 1 Mar 2006 15:40:46 +0000 Subject: [Soks] Exporting to HTML In-Reply-To: <3531474a0603010737y5c15511fq4dfb6ce30542ebd5@mail.gmail.com> References: <3531474a0602281806g1330397fje8733909530c5541@mail.gmail.com> <04BB5136-0CE0-4C6D-BD07-C98FC4383062@cam.ac.uk> <3531474a0603010737y5c15511fq4dfb6ce30542ebd5@mail.gmail.com> Message-ID: <30996C5E-2710-4481-85A8-D4F92425E83C@cam.ac.uk> Hi Eric On 1 Mar 2006, at 15:37, Eric Knapp wrote: > I'm getting closer. I am getting this error: > > start-.rb:5:in `require': no such file to load -- helpers/wiki2html > (LoadError) > > I'm assuming that I have to install wiki2html? Can you point me to > this? Very sorry. I must have renamed it at some point. It is installed with soks, but you need to use require 'helpers/wiki2html-helper' Tom From eknapp at gmail.com Wed Mar 1 10:47:03 2006 From: eknapp at gmail.com (Eric Knapp) Date: Wed, 1 Mar 2006 09:47:03 -0600 Subject: [Soks] Exporting to HTML In-Reply-To: <30996C5E-2710-4481-85A8-D4F92425E83C@cam.ac.uk> References: <3531474a0602281806g1330397fje8733909530c5541@mail.gmail.com> <04BB5136-0CE0-4C6D-BD07-C98FC4383062@cam.ac.uk> <3531474a0603010737y5c15511fq4dfb6ce30542ebd5@mail.gmail.com> <30996C5E-2710-4481-85A8-D4F92425E83C@cam.ac.uk> Message-ID: <3531474a0603010747x24cb6ae8w7b14b1d33731411f@mail.gmail.com> Tom, I'm still getting this: start.rb:5:in `require': no such file to load -- helpers/wiki2html-helper (LoadError) Thanks for all the help. -Eric On 3/1/06, Tom Counsell wrote: > > Hi Eric > > On 1 Mar 2006, at 15:37, Eric Knapp wrote: > > I'm getting closer. I am getting this error: > > > > start-.rb:5:in `require': no such file to load -- helpers/wiki2html > > (LoadError) > > > > I'm assuming that I have to install wiki2html? Can you point me to > > this? > > Very sorry. I must have renamed it at some point. It is installed > with soks, but you need to use require 'helpers/wiki2html-helper' > > Tom > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/soks-discuss/attachments/20060301/3c8fa20d/attachment.htm From Andreas.Semt at gmx.net Tue Mar 7 16:07:25 2006 From: Andreas.Semt at gmx.net (Andreas Semt) Date: Tue, 7 Mar 2006 22:07:25 +0100 (MET) Subject: [Soks] How does "Tag: Include this page in the distribution" works? Message-ID: <27686.1141765645@www103.gmx.net> Hello list! I have a question related to the Automatic Summary for the Page: "Tag: Include this page in the distribution". If i try to edit the page, i see: --- snip --- [[insert pages to include in the distribution]] --- snap --- My question: Where can i find the functionality (aka: Ruby code) for that automatic page? It's a great feature and i want to build a similar automatic page for other tags ... Thanks in advance! Greetings, Andreas Semt From tamc2 at cam.ac.uk Wed Mar 8 05:06:51 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Wed, 8 Mar 2006 10:06:51 +0000 Subject: [Soks] How does "Tag: Include this page in the distribution" works? In-Reply-To: <27686.1141765645@www103.gmx.net> References: <27686.1141765645@www103.gmx.net> Message-ID: Hello Andreas On 7 Mar 2006, at 21:07, Andreas Semt wrote: > I have a question related to the Automatic Summary for the Page: > "Tag: Include this page in the distribution". > My question: Where can i find the functionality (aka: Ruby code) > for that > automatic page? It's a great feature and i want to build a similar > automatic > page for other tags ... The way it works on www.soks.org is: In the start.rb file, somewhere after wiki.watch_for(:start) do | event,wiki,view| it has the code: AutomaticList.new(wiki,'Pages to include in the distribution') { | page| page.content =~ /Tag: Include this page in the distribution/i } Tom From Andreas.Semt at gmx.net Wed Mar 8 06:31:53 2006 From: Andreas.Semt at gmx.net (Andreas Semt) Date: Wed, 8 Mar 2006 12:31:53 +0100 (MET) Subject: [Soks] How can i use the entered search string in the Soks code base? Message-ID: <26809.1141817513@www029.gmx.net> Hello list! @Tom Counsell: Thanks for the hint. That's the reason why i didn't found the specific code in my local Soks version. However, i have a new question: Is there a possibility to use the entered search string from the side bar search field in my start.rb file? I want use it to find all wiki pages with a specific tag (identified with the "Tag:" notation in the page content). Thanks for any helpful suggestions! Greetings, Andreas Semt From tamc2 at cam.ac.uk Wed Mar 8 06:42:07 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Wed, 8 Mar 2006 11:42:07 +0000 Subject: [Soks] How can i use the entered search string in the Soks code base? In-Reply-To: <26809.1141817513@www029.gmx.net> References: <26809.1141817513@www029.gmx.net> Message-ID: Hello Andreas On 8 Mar 2006, at 11:31, Andreas Semt wrote: > Is there a possibility to use the entered search string from the > side bar > search field in my start.rb file? I want use it to find all wiki > pages with > a specific tag (identified with the "Tag:" notation in the page > content). Umm, I'm not sure I understand the question. If you put "tag: include this page in the distribution" in the search box in the side bar, then it will present pages with the tag. Doing something specific with the search field would mean customising the views/Page_find.rhtml file in your soks-wiki (which is, I know, a bad case of mixing control code with view code). Tom From Bil.Kleb at nasa.gov Tue Mar 14 09:15:14 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Tue, 14 Mar 2006 09:15:14 -0500 Subject: [Soks] revised by AutomaticRecentChanges Message-ID: <4416CFF2.6040809@NASA.gov> Hello Tom, I have noticed lately that many of our pages are "last revised by AutomaticRecentChanges", but the meta data typically says a particular author last changed the page. What's up? (Soks 1.0.3 on Linux with Ruby 1.8.2) Regards, -- Bil http://fun3d.larc.nasa.gov From tamc2 at cam.ac.uk Tue Mar 14 09:47:24 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Tue, 14 Mar 2006 14:47:24 +0000 Subject: [Soks] revised by AutomaticRecentChanges In-Reply-To: <4416CFF2.6040809@NASA.gov> References: <4416CFF2.6040809@NASA.gov> Message-ID: <6B5F6AD9-DABC-4367-95DB-F50F6830E918@cam.ac.uk> Hello Bil On 14 Mar 2006, at 14:15, Bil Kleb wrote: > I have noticed lately that many of our pages are "last > revised by AutomaticRecentChanges", but the meta data typically > says a particular author last changed the page. Umm, not sure how that could happen. The only page that should have last revised by AutomaticRecentChange should be the recent changes page? Tom From Bil.Kleb at nasa.gov Tue Mar 14 10:06:21 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Tue, 14 Mar 2006 10:06:21 -0500 Subject: [Soks] revised by AutomaticRecentChanges In-Reply-To: <6B5F6AD9-DABC-4367-95DB-F50F6830E918@cam.ac.uk> References: <4416CFF2.6040809@NASA.gov> <6B5F6AD9-DABC-4367-95DB-F50F6830E918@cam.ac.uk> Message-ID: <4416DBED.20201@NASA.gov> Tom Counsell wrote: > Hello Bil Hello. > On 14 Mar 2006, at 14:15, Bil Kleb wrote: >> I have noticed lately that many of our pages are "last >> revised by AutomaticRecentChanges", but the meta data typically >> says a particular author last changed the page. > > Umm, not sure how that could happen. The only page that should have > last revised by AutomaticRecentChange should be the recent changes page? Could it be due to any of these? MergeOldRevisionsHelper.new( wiki, :day, 2, 60*60*24) DeleteOldPagesHelper.new( wiki, :day, 60*60*24*7 ) AutomaticUpdateCrossLinks.new( wiki, view, banned_titles ) Or maybe I corrupted one of my view templates? On the Recent Changes page, the "last revised by" for each page is correct and the whole page is "last revised by AutomaticRecentChanges" (as appears to be the case for *all* the other pages). Later, -- Bil Kleb http://fun3d.larc.nasa.gov From tamc2 at cam.ac.uk Wed Mar 15 06:29:31 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Wed, 15 Mar 2006 11:29:31 +0000 Subject: [Soks] revised by AutomaticRecentChanges In-Reply-To: <4416DBED.20201@NASA.gov> References: <4416CFF2.6040809@NASA.gov> <6B5F6AD9-DABC-4367-95DB-F50F6830E918@cam.ac.uk> <4416DBED.20201@NASA.gov> Message-ID: <268FA9BE-F998-4EF0-A05C-E2A0AC10BFBF@cam.ac.uk> Hello Bil I don't think the AutomaticUpdateCrossLinks helper could do it, as it doesn't touch the author. The MergeOldRevisionsHelper and DeleteOldPagesHelper do modify authorship, so could I suppose, but I can't think how at the moment. It would seem unlikely to me that modifying the view template could produce the wrong author. I'll have a think. Tom On 14 Mar 2006, at 15:06, Bil Kleb wrote: > Tom Counsell wrote: >> Hello Bil > > Hello. > >> On 14 Mar 2006, at 14:15, Bil Kleb wrote: >>> I have noticed lately that many of our pages are "last >>> revised by AutomaticRecentChanges", but the meta data typically >>> says a particular author last changed the page. >> >> Umm, not sure how that could happen. The only page that should have >> last revised by AutomaticRecentChange should be the recent changes >> page? > > Could it be due to any of these? > > MergeOldRevisionsHelper.new( wiki, :day, 2, 60*60*24) > DeleteOldPagesHelper.new( wiki, :day, 60*60*24*7 ) > AutomaticUpdateCrossLinks.new( wiki, view, banned_titles ) > > Or maybe I corrupted one of my view templates? > > On the Recent Changes page, the "last revised by" for each > page is correct and the whole page is "last revised by > AutomaticRecentChanges" (as appears to be the case for > *all* the other pages). > > Later, > -- > Bil Kleb > http://fun3d.larc.nasa.gov > _______________________________________________ > Soks-discuss mailing list > Soks-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/soks-discuss From Bil.Kleb at nasa.gov Thu Mar 16 11:48:25 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Thu, 16 Mar 2006 11:48:25 -0500 Subject: [Soks] Restarting an abruptly shutdown wiki Message-ID: <441996D9.7070601@NASA.gov> Hi Tom, We had an SA take the machine down abruptly this morning, and now the wiki doesn't seem to be coming back to life (many pages are missing). I tried removing the caches and restarting, but a message like, W, [2006-03-16 12:33:00#960] WARN -- : Notification queue backlog of 3245 W, [2006-03-16 12:33:11#960] WARN -- : ERROR undefined method `name' for nil:NilClass: start - # # shows up a little while after startup. The corresponding output stream has, /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/default-helpers.rb:97:in `summarise?' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/default-helpers.rb:121:in `scan_revisions_allready_in_wiki' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/default-helpers.rb:120:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/default-helpers.rb:120:in `scan_revisions_allready_in_wiki' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/default-helpers.rb:119:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:173:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:173:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/default-helpers.rb:119:in `scan_revisions_allready_in_wiki' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/default-helpers.rb:104:in `add_existing_pages' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/default-helpers.rb:73:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/helpers/default-helpers.rb:211:in `initialize' ./iiwikiweb.rb:112:in `new' ./iiwikiweb.rb:112 ./iiwikiweb.rb:65:in `call' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:78:in `notify' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:76:in `each' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:76:in `notify' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:71:in `check_for_events' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:63:in `start_thread' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:62:in `loop' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:62:in `start_thread' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:61:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:61:in `new' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:61:in `start_thread' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:29:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:20:in `new' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:20:in `event_queue' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-utils.rb:6:in `watch_for' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-model.rb:152:in `initialize' ./iiwikiweb.rb:24:in `new' ./iiwikiweb.rb:24 where iiwikiweb.rb has, 24 wiki = Wiki.new( "#{root_directory}/content", "#{root_directory}/caches" ) 25 wiki.check_files_every = :min 65 wiki.watch_for(:start) do |event,wiki,view| 112 AutomaticRecentChanges.new( wiki ) 117 end It seems as though it is slowly bring pages back online, but only spardically, i.e., once a minute it does a few? I have debug logging on, but I haven't seen any updates of the backlog queue as I thought I had noticed in the past (before caching): How does one speed up the rebuilding? Or is has it become corrupt in some fashion? Regards, -- Bil Kleb http://fun3d.larc.nasa.gov From tamc2 at cam.ac.uk Thu Mar 16 12:51:59 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Thu, 16 Mar 2006 17:51:59 +0000 Subject: [Soks] Restarting an abruptly shutdown wiki In-Reply-To: <441996D9.7070601@NASA.gov> References: <441996D9.7070601@NASA.gov> Message-ID: Hi Bil On 16 Mar 2006, at 16:48, Bil Kleb wrote: > We had an SA take the machine down abruptly this morning, Sorry to hear that. > and now the wiki doesn't seem to be coming back to life > (many pages are missing). Missing from the content folder? Or just missing from the view on start up? > I tried removing the caches and restarting, but a message like, > > W, [2006-03-16 12:33:00#960] WARN -- : Notification queue > backlog of 3245 > W, [2006-03-16 12:33:11#960] WARN -- : ERROR undefined method > `name' for nil:NilClass: start - # # Not seen anything like it. The error suggests that one of the revisions is missing. You could put a $LOG.warn "Revision missing for #{name}" unless revision on line 121 of lib/helpers/ default-helpers.rb to try and find out where it is, and then check the revisions file for that page to see what has happened. > It seems as though it is slowly bring pages back online, > but only spardically, i.e., once a minute it does a few? > > I have debug logging on, but I haven't seen any updates > of the backlog queue as I thought I had noticed in the > past (before caching): > > How does one speed up the rebuilding? Using something like http://www.soks.org/view/ HowToReBuildThePageCache might help (I have been working on making the start up faster in the development version) > Or is has it become > corrupt in some fashion? Well, I hope that it is fairly impossible for the textile content (in the content folder) to be corrupted. I guess from the message above that it is possible that the revisions could get corrupted somehow. Worse case I guess you could delete all the revisions files from the wiki. Tom From Bil.Kleb at nasa.gov Thu Mar 16 15:36:27 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Thu, 16 Mar 2006 15:36:27 -0500 Subject: [Soks] Restarting an abruptly shutdown wiki In-Reply-To: References: <441996D9.7070601@NASA.gov> Message-ID: <4419CC4B.4050008@NASA.gov> Tom Counsell wrote: > Hi Bil Hello. >> and now the wiki doesn't seem to be coming back to life >> (many pages are missing). > > Missing from the content folder? Or just missing from the view on start up? Pages are not crosslinked and the attachments are showing up as missing completely. Very gradually things were coming back online, but after 4 hours it seemed that it was only about half finished. > You could put a > $LOG.warn "Revision missing for #{name}" unless revision > to try and find out where it is, and then > check the revisions file for that page to see what has happened. Perfect. (Actually, I just reopened AutomaticSummary in my start.rb and overrode the scan method.) I just chunked all the caches and the yamls for that page (actually to pages that were similarly named just to be sure). I have attached them if you want to take a look as I can't make sense of them. Things are humming along now. Thanks! -- Bil Kleb http://fun3d.larc.nasa.gov -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Fixed Bug: Problem with entering a bug.textile Url: http://rubyforge.org/pipermail/soks-discuss/attachments/20060316/b645d28d/attachment.bat -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Fixed Bug: Problem with entering a bug.yaml Url: http://rubyforge.org/pipermail/soks-discuss/attachments/20060316/b645d28d/attachment-0001.bat -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Fixed Bug: Problem with entering a bug .textile Url: http://rubyforge.org/pipermail/soks-discuss/attachments/20060316/b645d28d/attachment-0002.bat -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Fixed Bug: Problem with entering a bug .yaml Url: http://rubyforge.org/pipermail/soks-discuss/attachments/20060316/b645d28d/attachment-0003.bat From Bil.Kleb at nasa.gov Thu Mar 16 16:01:11 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Thu, 16 Mar 2006 16:01:11 -0500 Subject: [Soks] Restarting an abruptly shutdown wiki In-Reply-To: <4419CC4B.4050008@NASA.gov> References: <441996D9.7070601@NASA.gov> <4419CC4B.4050008@NASA.gov> Message-ID: <4419D217.5080104@NASA.gov> Bil Kleb wrote: > > Things are humming along now. W, [2006-03-16 15:59:00#1198] WARN -- : Notification queue backlog of 2670 1198 root 19 5 98436 96M 1880 R N 99.9 9.5 39:40 iiwikiweb.rb model name : Intel(R) Pentium(R) 4 CPU 1700MHz Later, -- Bil Kleb http://fun3d.larc.nasa.gov From tamc2 at cam.ac.uk Thu Mar 16 16:23:49 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Thu, 16 Mar 2006 21:23:49 +0000 Subject: [Soks] Restarting an abruptly shutdown wiki In-Reply-To: <4419CC4B.4050008@NASA.gov> References: <441996D9.7070601@NASA.gov> <4419CC4B.4050008@NASA.gov> Message-ID: <9C7461B0-7EFE-45B6-A9F2-D1DD3C85645E@cam.ac.uk> This is the source of the "Undefined method name for nilclass" error. The first number after a --- in the yaml file indicates the revision number. The revisions yaml starts with revision number 5, causing the AutomaticRecentChanges script to think that there are 4 earlier revisions that it needs to scan, but they don't exist so are nil. You can probably fix by changing the 5 to a zero, although that would require a fresh restart of soks to propagate through. I'm a bit concerned as to how this happened though. Tom On 16 Mar 2006, at 20:36, Bil Kleb wrote: > page deleted > --- > - 5 > - > - > - > - "-" > - 0 > - "I entered a bug, [[Bug: Problem with acronym]]. the text > of the page shows up > in the All Bugs page, but the link gives a 'create page' > link instead of the > text. (as does the Recent changes page) where is the > page? why didn't it act > 'right'? This time (for Bug: Problem with entering a bug) > it did! --Bibb" > - > - "-" > - 1 > - '' > - > - "+" > - 0 > - page deleted > - > - "-" > - 2 > - "p(. Did you have a question mark or some other \"special\" > character in your > page title? --Bil" > - > - "-" > - 3 > - '' > - > - "-" > - 4 > - "p(. Ah, you had a trailing space in the page title. I'll > report this bug to the > Soks author. --Bil" > - the import script > - 2006-01-05 10:39:01.912944 -05:00 From Bil.Kleb at nasa.gov Thu Mar 16 23:17:09 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Thu, 16 Mar 2006 23:17:09 -0500 Subject: [Soks] trailing spaces in page names Message-ID: <441A3845.8060708@NASA.gov> We had another trailing spaces in the page name incident today, so I add a .strip on the Page_edit.rhtml: [..]this.value.replace('Type a title here' ,'')"><%= page.name.strip %> (Taking your lead from UploadPage_edit.rhtml) Later, -- Bil Kleb http://fun3d.larc.nasa.gov From Bil.Kleb at nasa.gov Fri Mar 17 00:40:20 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Fri, 17 Mar 2006 00:40:20 -0500 Subject: [Soks] Yellow Pages again... Message-ID: <441A4BC4.1010502@NASA.gov> So they want the page name to begin with a suffix like 'YP: ' but not be editable like the UploadPage subclasses. In addition to creating a new view[1], YellowPage_edit.html, I stuck the following in my start.rb: class YellowPage < Page end class Wiki PAGE_CLASSES.insert( -2, [ /^yp:/i, YellowPage ] ) end but when I try to edit a YP: page, I get a Internal Server Error undefined method `strip' for nil:NilClass with [2006-03-17 00:31:32] ERROR NoMethodError: undefined method `strip' for nil:NilClass (erb):32:in `render' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-view.rb:335:in `render' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-servlet.rb:104:in `renderView' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-servlet.rb:75:in `wiki_service' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-servlet.rb:55:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' ./iiwikiweb.rb:152 in-136-39.larc.nasa.gov - Bil.Kleb [17/Mar/2006:00:31:32 EST] "GET /edit/YpTypeATitleHere HTTP/1.1" 500 326 http://ii.larc.nasa.gov/view/YpTypeATitleHere -> /edit/YpTypeATitleHere in the output. The view template currently looks exactly like the Page_edit.rhtml except for, $ diff YellowPage_edit.rhtml Page_edit.rhtml 30,32c30,32 < < YP: --- > What am I missing in this hack? Thanks, -- Bil Kleb http://fun3d.larc.nasa.gov [1] I couldn't seem to reuse Page_edit.html with a switch on is_a? YellowPage like the UploadPage_edit template has -- it kept looking for a YellowPage_edit.rhtml despite what looks to be a recursively upward template filename search in soks-view.rb, def erb_filename( klass, view ) $LOG.info "Looking for #{path_for( klass, view)}" until File.exists?( path_for( klass, view ) ) if klass.superclass klass = klass.superclass else $LOG.warn "Not found #{path_for( klass, view)}" raise WEBrick::HTTPStatus::NotFound end end [..] From tamc2 at cam.ac.uk Fri Mar 17 03:02:16 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Fri, 17 Mar 2006 08:02:16 +0000 Subject: [Soks] Yellow Pages again... In-Reply-To: <441A4BC4.1010502@NASA.gov> References: <441A4BC4.1010502@NASA.gov> Message-ID: Hello Bil On 17 Mar 2006, at 05:40, Bil Kleb wrote: > The view template currently looks exactly like the Page_edit.rhtml > except for, > > $ diff YellowPage_edit.rhtml Page_edit.rhtml > 30,32c30,32 > < > < YP: > --- >> > > What am I missing in this hack? Think this is it: YellowPage_edit.rhtml 32 "YP:"[3,-1] == nil # Bad "YP:"[3..-1] == "" # Better > [1] I couldn't seem to reuse Page_edit.html with a switch > on is_a? YellowPage like the UploadPage_edit template has -- > it kept looking for a YellowPage_edit.rhtml despite what > looks to be a recursively upward template filename search > in soks-view.rb, Oh. That is odd. I'll put it on the list of things to check. Tom From Bil.Kleb at nasa.gov Fri Mar 17 08:04:36 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Fri, 17 Mar 2006 08:04:36 -0500 Subject: [Soks] Yellow Pages again... In-Reply-To: References: <441A4BC4.1010502@NASA.gov> Message-ID: <441AB3E4.8010009@NASA.gov> Tom Counsell wrote: > Hello Bil Hello. > "YP:"[3,-1] == nil # Bad > "YP:"[3..-1] == "" # Better Doh! Thanks, -- Bil Kleb http://fun3d.larc.nasa.gov From Bil.Kleb at nasa.gov Wed Mar 22 12:41:03 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Wed, 22 Mar 2006 12:41:03 -0500 Subject: [Soks] Odd error Message-ID: <44218C2F.4070803@NASA.gov> Just saw this one go by: somemachine.somwhere.gov - login_name [22/Mar/2006:12:33:47 EST] "GET /attachment/newpage.js HTTP/1.1" 304 0 - -> /attachment/newpage.js [2006-03-22 12:33:47] ERROR NoMethodError: undefined method `split_header_valie' for WEBrick::HTTPUtils:Module /usr/local/lib/ruby/1.8/webrick/httpservlet/filehandler.rb:54:in `not_modified?' /usr/local/lib/ruby/1.8/webrick/httpservlet/filehandler.rb:32:in `do_GET' /usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `__send__' /usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' /usr/local/lib/ruby/1.8/webrick/httpservlet/filehandler.rb:207:in `exec_handler' /usr/local/lib/ruby/1.8/webrick/httpservlet/filehandler.rb:170:in `do_GET' /usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `__send__' /usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' /usr/local/lib/ruby/1.8/webrick/httpservlet/filehandler.rb:166:in `service' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-servlet.rb:99:in `serveStaticFile' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-servlet.rb:70:in `wiki_service' /usr/local/lib/ruby/gems/1.8/gems/Soks-1.0.3/lib/soks-servlet.rb:55:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' ./iiwikiweb.rb:152 Look familiar? (152 is server.start) -- Bil Kleb http://fun3d.larc.nasa.gov From tamc2 at cam.ac.uk Wed Mar 22 12:49:03 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Wed, 22 Mar 2006 17:49:03 +0000 Subject: [Soks] Odd error In-Reply-To: <44218C2F.4070803@NASA.gov> References: <44218C2F.4070803@NASA.gov> Message-ID: Hi Bil Google suggests this is a bug in Webrick: http://rubyforge.org/tracker/? func=detail&atid=1698&aid=3211&group_id=426 Causing problems? Tom On 22 Mar 2006, at 17:41, Bil Kleb wrote: > `split_header_valie From Bil.Kleb at nasa.gov Wed Mar 22 15:17:45 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Wed, 22 Mar 2006 15:17:45 -0500 Subject: [Soks] Odd error In-Reply-To: References: <44218C2F.4070803@NASA.gov> Message-ID: <4421B0E9.6070803@NASA.gov> Tom Counsell wrote: > Hi Bil Hello. > Google suggests this is a bug in Webrick: > > http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3211&group_id=426 Ah. > Causing problems? Not that I can tell. Thanks, -- Bil Kleb http://fun3d.larc.nasa.gov From Bil.Kleb at nasa.gov Thu Mar 30 17:04:10 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Thu, 30 Mar 2006 17:04:10 -0500 Subject: [Soks] Wikipedia and technorati links Message-ID: <442C55DA.9070509@NASA.gov> So, there I was, listening to the IT Conversations podcasts, one after another, regardless of topic, and I hit this one, http://www.itconversations.com/shows/detail472.html and he mentions automatically making links on his site point to a list of titles in Wikipedia and then later about tying into discussions from Technorati. I thought, this is something Soks could do fairly easily? No? Regards, -- Bil Kleb http://fun3d.larc.nasa.gov From Bil.Kleb at nasa.gov Wed Apr 26 13:31:19 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Wed, 26 Apr 2006 13:31:19 -0400 Subject: [Soks] converting from UseMod to Soks Message-ID: <444FAE67.6010606@NASA.gov> Does anyone have a solution? (I have a couple UseMod wikis I'd like to convert.) Thanks, -- Bil Kleb http://fun3d.larc.nasa.gov From Bil.Kleb at nasa.gov Thu Jun 8 08:09:03 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Thu, 08 Jun 2006 08:09:03 -0400 Subject: [Soks] Wikipedia and technorati links In-Reply-To: <442C55DA.9070509@NASA.gov> References: <442C55DA.9070509@NASA.gov> Message-ID: <4488135F.9030600@NASA.gov> Hi Tom, I didn't get a rise out of you, so I thought I'd try pinging you again.. Regards, -- Bil http://fun3d.larc.nasa.gov Bil Kleb wrote at the end of March: > So, there I was, listening to the IT Conversations podcasts, > one after another, regardless of topic, and I hit this one, > > http://www.itconversations.com/shows/detail472.html > > and he mentions automatically making links on his site > point to a list of titles in Wikipedia and then later about > tying into discussions from Technorati. > > I thought, this is something Soks could do fairly easily? > > No? From tamc2 at cam.ac.uk Thu Jun 8 08:15:52 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Thu, 8 Jun 2006 13:15:52 +0100 Subject: [Soks] Wikipedia and technorati links In-Reply-To: <4488135F.9030600@NASA.gov> References: <442C55DA.9070509@NASA.gov> <4488135F.9030600@NASA.gov> Message-ID: <20FD4ABC-F5DB-4E55-8FB6-25A86FCCBEBE@cam.ac.uk> Hi Bil On 8 Jun 2006, at 13:09, Bil Kleb wrote: > I didn't get a rise out of you, so I thought I'd > try pinging you again.. Sorry, been distracted by trying to finish my PhD. > Bil Kleb wrote at the end of March: >> and he mentions automatically making links on his site >> point to a list of titles in Wikipedia and then later about >> tying into discussions from Technorati. >> >> I thought, this is something Soks could do fairly easily? Well, I guess anything where you could get a list of titles could be linked up to the auto-linker fairly easily. A lot of pages on Wikipedia though, so might be a little slow. One of my ambitions someday is to see whether I can write soks so that the autolinking could scale to a size where it could host a copy of wikipedia. Tom From Bil.Kleb at nasa.gov Thu Jun 8 09:40:41 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Thu, 08 Jun 2006 09:40:41 -0400 Subject: [Soks] Wikipedia and technorati links In-Reply-To: <20FD4ABC-F5DB-4E55-8FB6-25A86FCCBEBE@cam.ac.uk> References: <442C55DA.9070509@NASA.gov> <4488135F.9030600@NASA.gov> <20FD4ABC-F5DB-4E55-8FB6-25A86FCCBEBE@cam.ac.uk> Message-ID: <448828D9.2030308@NASA.gov> Tom Counsell wrote: > Hi Bil Hello. > Sorry, been distracted by trying to finish my PhD. Definitely no need to be sorry. I went dark for a long time during my final push; so I know how it is. > Well, I guess anything where you could get a list of titles could be > linked up to the auto-linker fairly easily. Can you point to a Class or file where I'd start and briefly sketch the basic design as you see it? Thanks, -- Bil, http://fun3d.larc.nasa.gov From Bil.Kleb at nasa.gov Tue Jun 13 14:05:19 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Tue, 13 Jun 2006 14:05:19 -0400 Subject: [Soks] soks.org down? Message-ID: <448EFE5F.7010306@NASA.gov> Hi Tom, I'm getting "503 - Service Not Available" Later, -- Bil http://fun3d.larc.nasa.gov From daniel.r.barlow at gmail.com Fri Aug 18 07:45:01 2006 From: daniel.r.barlow at gmail.com (Daniel Barlow) Date: Fri, 18 Aug 2006 12:45:01 +0100 Subject: [Soks] Interactive development Message-ID: I installed Soks a couple of days ago to replace my hosted blog with a blog-cum-wiki thing - it's been good fun to play with, and an excuse to learn Ruby. There are a bunch of things I'm trying to do with AutomaticSummaries and suchlike for which the development process (edit start.rb, stop the server, restart it) is a little more cumbersome than I'd like. Is this how everyone does it, or does anyone have a neato redefine-stuff-in-one-thread-while-the-rest-is-still-running setup? As I say, I'm brand new to Ruby (yes, I'm coming from a Lisp background) but experiementing with irb seems to indicate that the language has enough late-binding stuff going on that when you redefine classes existing code will call the new definition, so I'm guessing it ought to be possible. If I come up with anything I'll add it to "how to hack Soks", I suppose, but I thought I'd ask first. (Bonus points if there's a "Soks Interaction" mode for emacs ;-) From Bil.Kleb at nasa.gov Fri Sep 15 05:24:40 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Fri, 15 Sep 2006 05:24:40 -0400 Subject: [Soks] Excluding known crawlers from viewer counts Message-ID: <450A7158.7010505@NASA.gov> Hi, The IT folks have pointed a web crawler at our site, and I am trying to figure out how to exclude it's hostname/IP from the ViewerCounter, otherwise the crawler swamps the results. I've spent some time looking at lib/helpers/counter-helpers.rb but I haven't managed to crack the code. Can I regex using 'author' or something? Thanks, -- Bil Kleb http://fun3d.larc.nasa.gov From tamc2 at cam.ac.uk Fri Sep 15 06:33:49 2006 From: tamc2 at cam.ac.uk (Tom Counsell) Date: Fri, 15 Sep 2006 11:33:49 +0100 Subject: [Soks] Excluding known crawlers from viewer counts In-Reply-To: <450A7158.7010505@NASA.gov> References: <450A7158.7010505@NASA.gov> Message-ID: <6087207B-C281-4A0D-97EB-7C7D91D773DE@cam.ac.uk> Hi Bil Not tested, but the ViewCountHelper class of lib/helpers/counter- helpers.rb should have: def should_count?( page, view, author ) return false if author =~ /whatever/ # Add this line? @views_to_count.include?( view.downcase ) end Tom On 15 Sep 2006, at 10:24, Bil Kleb wrote: > Hi, > > The IT folks have pointed a web crawler at our > site, and I am trying to figure out how to > exclude it's hostname/IP from the ViewerCounter, > otherwise the crawler swamps the results. > > I've spent some time looking at > > lib/helpers/counter-helpers.rb > > but I haven't managed to crack the code. > > Can I regex using 'author' or something? > > Thanks, > -- > Bil Kleb > http://fun3d.larc.nasa.gov > _______________________________________________ > Soks-discuss mailing list > Soks-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/soks-discuss From Bil.Kleb at nasa.gov Fri Sep 15 10:05:05 2006 From: Bil.Kleb at nasa.gov (Bil Kleb) Date: Fri, 15 Sep 2006 10:05:05 -0400 Subject: [Soks] Excluding known crawlers from viewer counts In-Reply-To: <6087207B-C281-4A0D-97EB-7C7D91D773DE@cam.ac.uk> References: <450A7158.7010505@NASA.gov> <6087207B-C281-4A0D-97EB-7C7D91D773DE@cam.ac.uk> Message-ID: <450AB311.1080605@NASA.gov> Tom Counsell wrote: > Hi Bil Hello. > Not tested, but the ViewCountHelper class of lib/helpers/counter- > helpers.rb should have: > > def should_count?( page, view, author ) > return false if author =~ /whatever/ # Add this line? > @views_to_count.include?( view.downcase ) > end Tested. Works. Thanks, -- Bil Kleb http://fun3d.larc.nasa.gov