Contents
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 |
1.0 |
1.5 |
Installation
For general installation instructions, see ParserMarket/InstallingParsers. This parser requires 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 2005-02-06 17:52:44
I am too at them moment. -- ReimarBauer 2005-02-06 19:51:32
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 2005-12-18 22:34:15
I do refactor this the next days because I have used tabs in the past
-- ReimarBauer 2005-12-19 20:08:57
- 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=<wikiconfig.plugin.parser.sctable.Parser instance>, formatter=<MoinMoin.formatter.text_html.Formatter instance>)
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 = <built-in function 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 2006-03-07 00:00:52
