>
= sc Parser =
== Description ==
The sctable parser allows you to create spreadsheats inside of Moin by using sc syntax.
== Download & Release Notes ==
|| Download || Release Version || Moin Version || Release Notes ||
|| [[attachment:sctable-1.5.2-5.py]] || 1.0 || 1.5 || [[ParserMarket/Sctable/ReleaseNotes]] ||
== Installation ==
For general installation instructions, see [[ParserMarket/InstallingParsers]]. This parser requires [[http://freshmeat.net/projects/sc/|sc]] to be installed, and for more detailed instructions, see [[/Installation]]
== Usage ==
To use this parser, simply put #!sctable after the beginning of the code block.
== Example ==
{{{{
{{{#!sctable
||1||2||=A0+B0||
||10||20||=@sum(A1:B1)||
}}}
}}}}
For more detailed examples, see [[/Examples]].
== Copyright ==
This parser is copyrighted by ReimarBauer
== License ==
This parser is released under the terms of the GNU GPL.
= Discussion =
* we need a better routine to destinguish between strings and numbers, i have still some problems with e.g
{{{
def is_number(txt):
ItIs = True
try:
f =float(txt)
except TypeError:
ItIs = False
return(ItIs)
}}}
This doesn't work with formulars =@sum(a0:a2) <
>
At the moment I scan for digits and signs from a string. This does not right identify a dot (.)
in a string. This will be formatted as number. Thats the only bad thing I know on.
ideas are welcome.
* I'm curious how to use =@date functions of sc. is there any way? -- ZdenekPizl <>
I am too at them moment. -- ReimarBauer <>
* I had problems running this on FreeBSD. I had to install manually the source because the ports in FreeBSD seem to be out of date (using version 6.x of sc). Furthermore, i had to comment out the f.flush() call that was causing an I/O error for some reason. -- TheAnarcat <>
''I do refactor this the next days because I have used tabs in the past X-( '' -- ReimarBauer <>
* I am getting an index error whenever I try using this. I don't know python so I am really no help here, sorry.
{{{
list index out of range
* args = ('list index out of range',)
}}}
More detailed
{{{
/usr/local/share/moin/foxwiki/data/plugin/parser/sctable.py in format (self=, formatter=)
569 # - matrix is here: [ "||cell||cell||...||", "||cell||...||", ... ]
570
Error => 571 if (len(matrix[0]) == 2): # das ist noch nicht die beste Loesung (workaround)
572 matrix=matrix[1:]
573
* builtin len =
* matrix = []
}}}
* I have had to patch the parser to use the "rightstring" instead of the "leftstring" command because it was sometimes leaving me with a misaligned table. In fact, some cells were being merged together when using leftstring. I just did a search and replace in the source to change the command and everything is ok now. -- TheAnarcat <>