[ANN] Soks - Yet Another Wiki

http://rubyforge.org/projects/soks/

Soks is yet another wiki. Sorry about that. It was written mainly for my own gratification and in no way reflects on the quality of other wikis available, nor on the fact that my time could probably have been better spent on improving one of them. As is always the way, none of them was quite right for me, and I've been enjoying using it to learn ruby.

What was right for me?
* Automatic linking between pages (no need for wiki words or any bracket shenanigans).
* Easy to add, move and delete pages
* Textile
* Flat file storage (incidentally, this makes it easy to import from instiki using its export function)
* Per wiki templates.
* Webrick (No need for Apache).
* Uploads and Images
* Calendars, automatic summaries and the like

Some of that might be right for you to, if so I'd be grateful if you would give it a go (instructions below) and let me know how you get on / what you think.

First release, so don't trust your mission critical sites to it. In particular, I have not tested it on any flavour of windows or any version of ruby except the 1.8.2 series. If anyone does/doesn't get it working on windows, please let me know. It is also not as fast as other wikis, so I wouldn't advise it on any 100MHz 64MB virtual hosts.

Thanks

Tom

USE

Best installed by a ruby gem:
1. gem install Soks
2. soks-create-wiki.rb (will create a folder called soks-wiki in the current directory)
3. http://localhost:8000

Otherwise install by
1. Download the tar or zip from http://rubyforge.org/projects/soks/ ,
2. untar or zip,
3. cd Soks-0.0.2,
4. ruby bin/soks-create-wiki.rb (will create a folder called soks-wiki in the current directory)
5. http://localhost:8000

To restart
A. soks-create-wiki.rb (will not recreate the wiki if the folder soks-wiki already exists in the current directory)
OR B. ruby soks-wiki/start.rb

To allow the site to be accessible from beyond localhost:
1. cd soks-wiki
2. edit start.rb
3. un-comment the :url => 'http://localhost:8000' line and write your preferred url. If required also un-comment and change the :port line.

To tinker
A. Have a look at the start.rb file. Lots of things you can change there.
B. Read the How to hack soks page either on rubyforge or in the soks wiki you have started.

···

----
Tom Counsell. http://tom.counsell.org

Thomas Counsell wrote:

http://rubyforge.org/projects/soks/

Soks is yet another wiki. Sorry about that. It was written mainly for my own gratification and in no way reflects on the quality of other wikis available, nor on the fact that my time could probably have been better spent on improving one of them. As is always the way, none of them was quite right for me, and I've been enjoying using it to learn ruby.

Any demo wiki online? The automatic linking sounds interesting. I'd like to see that in action.

Hi,

···

On Wed, 12 Jan 2005 04:15:27 +0900, Thomas Counsell <tamc2@cam.ac.uk> wrote:

http://rubyforge.org/projects/soks/

Soks is yet another wiki. Sorry about that. It was written mainly for
my own gratification and in no way reflects on the quality of other
wikis available, nor on the fact that my time could probably have been
better spent on improving one of them. As is always the way, none of
them was quite right for me, and I've been enjoying using it to learn
ruby.

Thanks for this new Wiki. :slight_smile:

Cheers,
Joao

Thomas Counsell wrote:

http://rubyforge.org/projects/soks/

Soks is yet another wiki. Sorry about that. It was written mainly for my own gratification and in no way reflects on the quality of other wikis available, nor on the fact that my time could probably have been better spent on improving one of them. As is always the way, none of them was quite right for me, and I've been enjoying using it to learn ruby.

Sweet! I just installed it on a Win2K box.

Chuckle... "With Soks, there really *is* no step three!" (TM)

Time to play around ...

James

PS

A suggestion: Make the pages use XHTML transitional, or at least HTML 4.01, with a proper doctype and all that w3c stuff.

I may go hack this up now ...

Thanks Tom!

In the wiki page "How to export a site from this wiki" you write:
--- snip ---
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.
--- snap ---

Does exists a converter from Textile -> PDF? Would be great! So i could print the wiki content to give it to some people who "love" printed pages :wink:

Greetings,
Andreas

Florian Gross ha scritto:

Thomas Counsell wrote:

http://rubyforge.org/projects/soks/

Soks is yet another wiki. Sorry about that. It was written mainly for my own gratification and in no way reflects on the quality of other wikis available, nor on the fact that my time could probably have been better spent on improving one of them. As is always the way, none of them was quite right for me, and I've been enjoying using it to learn ruby.

Any demo wiki online? The automatic linking sounds interesting. I'd like to see that in action.

+1
Actually I think it's not only interesting but also scaring. I'm afraid of autolinking an "in" or "to" page :slight_smile:

James Britt wrote:

Chuckle... "With Soks, there really *is* no step three!" (TM)

If you refer to a certain Instiki bug (not creating storage/2500 directory on startup), it has been fixed in release 0.9.2 :slight_smile:

Brgds,
Alex

Thank you for all the responses and kind words. I'll try to answer the all questions posed in this thread below. I'm going to fix a few of the more obvious bugs, and incorporate some small improvements on Sunday, so there should be a new release early next week.

Tom

···

----
Tom Counsell. http://tom.counsell.org

On 11 Jan 2005, at 19:36, Florian Gross wrote:

Any demo wiki online? The automatic linking sounds interesting. I'd like to see that in action

Well, in my announcement I mentioned that Soks is slower than your average wiki and therefore not suited to on any 100MHz 64MB virtual hosts. Well, http://soks.counsell.org is on just such a cheap, highly contested, low powered virtual host. It may give you a bit of an impression, but it is slow, and if it may need to go off-line pretty fast. If anyone is willing to offer a higher performance space I'd appreciate that (although I understand that might be a bit of a leap of faith given it is only first release).

On 11 Jan 2005, at 19:46, gabriele renzi wrote:

Actually I think it's not only interesting but also scaring. I'm afraid of autolinking an "in" or "to" page :slight_smile:

A really frequent autolink would be annoying and would slow the wiki down. It could be straightforwardly solved by deleting the page titled 'to' or 'in' (which is easy to do). You are right to bring it up though, I clearly haven't thought properly about what a malicious (or clumsy) user might do. I'll put thought into it.

On 11 Jan 2005, at 21:51, Florian Gross wrote:

So how do I create a new page? I think the work flow in previous Wikis was link word, click word, enter content. Maybe this could use something like Ctrl-clicking a word (yeah, JavaScript, there also needs to be another way of doing this, but this one will be the more rapid one) to go to a non-existing page?

As Bill Atkins kindly mentioned, currently you click on a new page link. You can also, if you want to keep the usual wiki work flow, use bracketed wiki links. Your mention of JavaScript set me googling and turns out you can use JavaScript to enable you to highlight a word or phrase, press ctrl-n, and have the browser skip to editing a new page with the phrase as its title. So thanks for the brilliant inspiration! Will appear in the next version (however only certain browsers seem to do this Javascript in a way I can understand. On a mac Safari seems to work, but not Omniweb).

On 11 Jan 2005, at 22:11, Douglas Livingstone wrote:

Another thing I miss is the linkback, where you click the title of a
page, and you see a list of all the links to that page.

Link back is implemented. The links currently appear in the side-bar. This may be a little cramped and unintuitive for seasoned wiki users, so I'll make clicking the title give a link back in the next version.

How far are you planning to take this wiki Thomas?

Not sure yet. I'm definitely keen on the concept of wikis, thing there are lots of improvements to be made, and have a few evenings a week free to work on this sort of thing for at least the next two years (doing a PhD at present). I'll definitely try and stabilise this version and get the RSS feeds working. I'd also like to write some import/export filters to different wiki formats. After that I'm wondering is whether I should spend my time helping to put some of my ideas into instiki or ruwiki rather than continuing to develop a third way.

I'm also wondering about working on _why's RedCloth, which is great, but the errors I occasionally get suggest its enormous and fiendishly cunning regexps are pushing String#gsub to the limit and I was wondering about rewriting it using a StringScanner and doing the conversion on a token by token basis.

On 12 Jan 2005, at 03:15, James Britt wrote:

Sweet! I just installed it on a Win2K box.

Chuckle... "With Soks, there really *is* no step three!" (TM)

Time to play around ...

Did it work?

A suggestion: Make the pages use XHTML transitional, or at least HTML 4.01, with a proper doctype and all that w3c stuff.

Fair point. I'll put all the doctype stuff in and do what I can to make it validate. Don't know if I can guarantee validation on all pages, what with all the messing with the textile to html conversion. Would be a good goal.

On 12 Jan 2005, at 05:51, Alexey Verkhovsky wrote:

If you refer to a certain Instiki bug (not creating storage/2500 directory on startup), it has been fixed in release 0.9.2 :slight_smile:

I like Instiki, and experimented at one point with editing its code to make it do what I want, but found it heavy going. I understand that Instiki is going through a major re-write now. I hope that will make things easier for me to understand, and then I can perhaps help merge some of the Soks ideas into Instiki. (not that I'm saying the Soks code is any easier to understand, just easier for me to understand).

On 12 Jan 2005, at 14:29, Ruth A. Kramer wrote (To Alex, but I'd like to answer as well):

The first bug, IMHO, is that HTML entities don't work as I'm used to,
they are not saved as HTML entities but instead are converted to the
"real" character, thus, for example, if you (I) want to display
something like <an example HTML tag>, it disappears after (iirc) the
next edit.

I haven't noticed this in instiki? perhaps it depends on the tag? A word of warning. At the moment Soks does not filter any tags which is clearly not a good thing if you suspect malicious users. _why has just published a handy piece of filter code on his blog which I'll use on the next version.

On 12 Jan 2005, at 15:02, Andreas Semt wrote:

Does exists a converter from Textile -> PDF? Would be great! So i could print the wiki content to give it to some people who "love" printed pages :wink:

I know that instiki has / had this. I think it converted textile into latex and then latex into pdf and was therefore dependent on having the appropriate system libraries. It is an interesting idea, and probably of particular use to projects like http://www.hieraki.org/\. I notice that Austin Ziegler started a pure ruby pdf writing project on rubyforge http://rubyforge.org/projects/ruby-pdf/ but I don't know if that has developed far enough to be a useful starting point.

Andreas Semt <as@computer-leipzig.de> writes:

Thanks Tom!

In the wiki page "How to export a site from this wiki" you write:
--- snip ---
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.
--- snap ---

Does exists a converter from Textile -> PDF? Would be great! So i
could print the wiki content to give it to some people who "love"
printed pages :wink:

I hacked a simple HTML (generated by BlueCloth) to ConTeXt XSLT over
the weekend, it probably can be easily adjusted for RedCloth's HTML
usage too.

···

Greetings,
Andreas

--
Christian Neukirchen <chneukirchen@gmail.com> http://kronavita.de/chris/

It looks like it only creates a link if a page with that name exists,
so unless you have a page named "In" Soks wouldn't autolink that word.

+1 to the author

Bill

···

On Wed, 12 Jan 2005 04:46:18 +0900, gabriele renzi <rff_rff@remove-yahoo.it> wrote:

Florian Gross ha scritto:
> Thomas Counsell wrote:
>
>> http://rubyforge.org/projects/soks/
>>
>> Soks is yet another wiki. Sorry about that. It was written mainly for
>> my own gratification and in no way reflects on the quality of other
>> wikis available, nor on the fact that my time could probably have been
>> better spent on improving one of them. As is always the way, none of
>> them was quite right for me, and I've been enjoying using it to learn
>> ruby.
>
>
> Any demo wiki online? The automatic linking sounds interesting. I'd like
> to see that in action.

+1
Actually I think it's not only interesting but also scaring. I'm afraid
of autolinking an "in" or "to" page :slight_smile:

--
$stdout.sync = true
"Just another Ruby hacker.".each_byte do |b|
  ('a'..'z').step do|c|print c+"\b";sleep 0.007 end;print b.chr
end; print "\n"

Alexey Verkhovsky wrote:

If you refer to a certain Instiki bug (not creating storage/2500
directory on startup), it has been fixed in release 0.9.2 :slight_smile:

Hello Alex,

I meant to reply to your announcement of 0.9.2 the other day. How far
are you going to take Instiki? Do you want bug reports and RFEs?

I'm thinking about learning Ruby (I've spent some time looking at C,
C++, Perl, and Python, and I'm currently doing a short exploration (I
think) of Lisp and maybe Smalltalk before jumping in) and then writing
my own wiki-like thing (with quite a few enhancements).

Instiki might serve as a good learning / jumping off point.

But I have found some bugs (IMHO) and can see some things that I think
might be improvements.

The first bug, IMHO, is that HTML entities don't work as I'm used to,
they are not saved as HTML entities but instead are converted to the
"real" character, thus, for example, if you (I) want to display
something like <an example HTML tag>, it disappears after (iirc) the
next edit.

Since I went this far, let me ask, do you see that as a major problem to
fix (like requiring a major rewrite of the "parsing" code, or something
fairly simple?

regards,
Randy Kramer

Alexey Verkhovsky wrote:

James Britt wrote:

Chuckle... "With Soks, there really *is* no step three!" (TM)

If you refer to a certain Instiki bug (not creating storage/2500 directory on startup), it has been fixed in release 0.9.2 :slight_smile:

Actually, when I last tried Instiki (two weeks ago), I had to download the archive, unpack it, run "instiki", fix the storage directory issue, and then do some minor config stuff that maybe isn't a real step.

It's a great piece of work, but I was left thinking it should be "There's no step five (TM)"

But if there's a gem for instiki now (and there appears to be) that's quite good.

If the perpetual "Bad file descriptor" error on Win32 is fixed too, that would rock; if not, I could never recommend it to my co-workers.

But Soks uses flat files, not Madeleine, which wins the day for me, because other apps can use/create the wiki files for their own nefarious reasons.

James

Christian Neukirchen wrote:

Andreas Semt <as@computer-leipzig.de> writes:

Thanks Tom!

In the wiki page "How to export a site from this wiki" you write:
--- snip ---
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.
--- snap ---

Does exists a converter from Textile -> PDF? Would be great! So i
could print the wiki content to give it to some people who "love"
printed pages :wink:

I hacked a simple HTML (generated by BlueCloth) to ConTeXt XSLT over
the weekend, it probably can be easily adjusted for RedCloth's HTML
usage too.

Hello Christian!

Do you have some code snippets laying around?
Also: "ConTeXt XSLT": Is that an own format/standard? Sounds new to me.

Greetings (again),
Andreas

···

Greetings,
Andreas

It works okay. I've used it for writing a chart module, and haven't found any major problems -- except for the documentation being out of sync with the code.

I haven't done too much text processing with it (more graphics), but ruby-pdf/pdf-writer's own documentation is a long PDF file generated from a markup file, which proves the point. I suppose the biggest advantage over a LaTeX solution is that there's a whole lot less to install & maintain.

I built a simple .gemspec for pdf-writer if you or anyone else is interested. Let me know.

···

On Jan 12, 2005, at 8:44 AM, Thomas Counsell wrote:

I notice that Austin Ziegler started a pure ruby pdf writing project on rubyforge http://rubyforge.org/projects/ruby-pdf/ but I don't know if that has developed far enough to be a useful starting point.

--
John Labovitz
Macintosh support, research, and software development
John Labovitz Consulting, LLC
johnl@johnlabovitz.com | +1 503.949.3492 | www.johnlabovitz.com/consulting

Thomas Counsell wrote:

Thank you for all the responses and kind words. I'll try to answer the all questions posed in this thread below. I'm going to fix a few of the more obvious bugs, and incorporate some small improvements on Sunday, so there should be a new release early next week.

Tom

...

···

On 12 Jan 2005, at 03:15, James Britt wrote:

Sweet! I just installed it on a Win2K box.

Chuckle... "With Soks, there really *is* no step three!" (TM)

Time to play around ...

Did it work?

Yes. I set it up on at work, edited the styles, and off I went. Very nice.

Soks rocks.

James

Bill Atkins wrote:

It looks like it only creates a link if a page with that name exists,
so unless you have a page named "In" Soks wouldn't autolink that word.

So how do I create a new page? I think the work flow in previous Wikis was link word, click word, enter content. Maybe this could use something like Ctrl-clicking a word (yeah, JavaScript, there also needs to be another way of doing this, but this one will be the more rapid one) to go to a non-existing page?

Bill Atkins ha scritto:

It looks like it only creates a link if a page with that name exists,
so unless you have a page named "In" Soks wouldn't autolink that word.

+1 to the author

Bill

yup, what I meant was "what if someone creates 'In', "To" and "A" pages?" Would that suddenly mess up the wiki? What if the only one allowed to delete pages is the admin so noone else can fix this?

Probably it would just make sense to avoid pages with a name < 4 or something like that. And probably the author himself have already though of this :slight_smile:

Andreas Semt <as@computer-leipzig.de> writes:

Christian Neukirchen wrote:

Andreas Semt <as@computer-leipzig.de> writes:

Thanks Tom!

In the wiki page "How to export a site from this wiki" you write:
--- snip ---
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.
--- snap ---

Does exists a converter from Textile -> PDF? Would be great! So i
could print the wiki content to give it to some people who "love"
printed pages :wink:

I hacked a simple HTML (generated by BlueCloth) to ConTeXt XSLT over
the weekend, it probably can be easily adjusted for RedCloth's HTML
usage too.

Hello Christian!

Do you have some code snippets laying around?

Sure, grab it at:

            http://kronavita.de/chris/data/md2context.xsl

Also: "ConTeXt XSLT": Is that an own format/standard? Sounds new to me.

It's a XSLT to generate ConTeXt (which you then can convert to .pdf if
you have a recent TeX distribution).

···

Greetings (again),
Andreas

Greetings,
Andreas

--
Christian Neukirchen <chneukirchen@gmail.com> http://kronavita.de/chris/

Actually, there's a real gem available for it :wink:

There is a problem with this that I have raised with the maintainer of
image_size.rb -- either to incorporate image_size.rb into PDF::Writer
or to have a Gem for image_size (preferable, I think).

Note that the latest release version has a problem with alternative
fonts; this has been fixed in CVS HEAD and may see a release toward
the end of the month.

···

On Thu, 13 Jan 2005 02:59:12 +0900, John Labovitz <johnl@johnlabovitz.com> wrote:

On Jan 12, 2005, at 8:44 AM, Thomas Counsell wrote:

> I notice that Austin Ziegler started a pure ruby pdf writing project
> on rubyforge http://rubyforge.org/projects/ruby-pdf/ but I don't know
> if that has developed far enough to be a useful starting point.

It works okay. I've used it for writing a chart module, and haven't
found any major problems -- except for the documentation being out of
sync with the code.

I haven't done too much text processing with it (more graphics), but
ruby-pdf/pdf-writer's own documentation is a long PDF file generated
from a markup file, which proves the point. I suppose the biggest
advantage over a LaTeX solution is that there's a whole lot less to
install & maintain.

I built a simple .gemspec for pdf-writer if you or anyone else is
interested. Let me know.

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

James Britt wrote:

If the perpetual "Bad file descriptor" error on Win32 is fixed too, that would rock; if not, I could never recommend it to my co-workers.

All references about this problem on the web are dated in June and seem to be on a one-click installer 1.8.2 RC 7 or thereabouts.
I don't seem to get anything like this on my own Windows box with Ruby 1.8.2 final and Instiki 0.9.2. Has it disappeared and/or was fixed?

If it is happening on a current version, please let me know.

But Soks uses flat files, not Madeleine, which wins the day for me, because other apps can use/create the wiki files for their own nefarious reasons.

I can certainly see the benefit of this. In fact, the same thing (flat file per page persistence) is considered as a possible route for Instiki 2. Although it's more likely that we will go with SQLite / ActiveRecord backend instead.

Alex