rouilj: I noticed a lack of symmetry issue in editing. If you are using the WYSIWYG editor, you can click on the pick axe to change to a textarea editor. Is there supposed to be (under TWiki 5.1.1) a way to choose the WYSIWYG editor from the textarea editor? I assume a link similar to the save and continue that changed nowysiwyg=1 to nowysiwyg=0 would do the trick of preserving the edited data and switching back.
Is this functionality already supposed to be there and I just screwed up the merge of my 4.3.1 codebase to the 5.1.1 codebase?
Also on another question, is there a script that performs a checking to rcs and rebuilds the twiki topic? I envision something like: twikici -u <username> topic.txt (or attachment.file) that creates the rcs file and checks in a topic and then checks it out again with all the metadata expanded.
so the history links on the botoom of the page, last edited info etc are all updated. foolove: on the view script trying to convert the twiki contents to html ./view -topic SomeWeb.SomeTopic -skin plain > SomeWeb.SomeTopic.html
i get Too many edit arguments rouilj: what script is this? the on in TWIKI_HOOME/bin meant to be run under apache as a CGI?
HOOME -> HOME foolove: i thought i would process this on the apache server
i need a fast way to convert the files to html rouilj: Yeah, I am not sure what's happening there. From twiki/lib/TWiki/Engine/CLI.pm it looks like the syntax should be -topic=SomeWeb.SomeTopic
perhaps?
the regexp used is:
if ( $arg =~ /^-?([A-Za-z0-9_]+)(?:=(.*))?$/o ) {
I don't remember exactly what ?:= means but I think it's a lookahead for =
ah no ?: means cluster without capturing
so $2 does not include the = sign.
and (.*) is $2.
but from this it looks like the equal sign is needed.
foolove does it work if you use the = sign to separate the option and it's value? foolove: what do you mean
./view -topic SomeWeb.SomeTopic -skin plain > SomeWeb.SomeTopic.html
can you give an example off of my command line rouilj: no read what I wrote space is not valid. use -
use =
./view -topic=SomeWeb.SomeTopic -skin=plain foolove: ahh ok i will try this rouilj: see if that works. It would seem to match the regesp
regexp that is.
Sadly TWikiShellContrib appears to not be supported on a modern TWiki. foolove: garbage after option arguement "-skin=plain"
and nothing writes again
for the view file to run what all has to be called
i seen setlib.cfg
i copied view and setlib.cfg
to the directory i need for processing rouilj: you may also need locallib and a few other things.
I would suggest running it from the twiki bin directory as the apache or whatever user your we server runs under.
we-> web foolove: k
ill try something rouilj: I just ran: sudo -u apache ./view -topic=Main.WebHome -skin=plain > /tmp/foo in my twiki bin directory and it produced the html output I was expecting.
however on some other pages I am getting:
Can't call method "id" on an undefined value at /var/www/auth/twiki/lib/TWiki/LoginManager.pm line 1134.
and not getting the expected output.
looks like that error is coming from sub createCryptToken
not quite sure what to do about that. foolove: thanks for the insight rouilj i got my code to work on converting webs
:) rouilj: cool.
I wonder if this channel is archived anywhere.
. twikiorgbot
to answer one of my questions above (command line to save a topic), I am trying: ./save -user admin -topic Sandbox.WebPreferences -action save -text "`cat ../data/Sandbox/WebPreferences.txt`" in twiki/bin
I get: Can't call method "id" on an undefined value at /var/www/auth/twiki/lib/TWiki/UI.pm line 444.
TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.
| 2012-07-06 - 20:47 | Use of deprecated "action" parameter to "save". Correct your templates!
ideas?
http://twiki.org/cgi-bin/view/TWiki/TWikiScripts has an example of action=saw near the top. That probably needs to be changed to -action_save=1
also it appears that a space between the option and it's value isn't valid anymore. Foolove can you configrm that only an = worked for you?
ok, if I change the config: $TWiki::cfg{CryptToken}{Enable} = 0; it appers that the command line: ./save -user TWikiAdminUser -topic Sandbox.WebPreferences -action_save=1 -text "`cat ../data/Sandbox/WebPreferences.txt`" mostly works. The last user reports as:
date: 2012/07/06 21:10:27; author: BaseUserMapping_333; state: Exp; lines: +10 -5
using rlog on the rcs file
it does show as TWikiAdminUser when viewing the web page and also in diffs and history on the page.