[CWB] execute-cli functions

Hardie, Andrew a.hardie at lancaster.ac.uk
Sat Sep 9 13:39:20 CEST 2017


I did try to help before, by warning you how difficult it would be to do what you want.

Short answer: the parameters needed for corpus installation cannot be supplied from the command line using the existing code.

You would need to do a fair bit of coding to create a new script that will set up the correct variables in PHP (IE the contents of the web-form in the superglobal $_GET array) – pulling them from whatever source you want – before calling the install_new_corpus function. There is no way to do what you want with just the existing scripts.

best

Andrew.

From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of "Andrés Chandía"
Sent: 08 September 2017 08:16
To: Open source development of the Corpus WorkBench
Subject: Re: [CWB] execute-cli functions

If at least I could install the corpus at the cqpweb it would be wonderful,

I've tried but no success, I guess there are some parameters to add....

there is a function called:

install_new_corpus

and then this at the file lib/admin-execute.inc.php

case 'installCorpus':
        case 'installCorpusIndexed':
                $_GET['function'] = 'install_new_corpus';
                /* in this case there is no point sending parameters;      */
                /* the function is better off just getting them from $_get */
                $_GET['locationAfter'] = 'XX'; //the function itself sets this
                require('../lib/execute.inc.php');
                exit();

And also a a form to do it: function printquery_installcorpus_indexed()

But I haven't  discovered how to fill it from command line...


Some help?, please?




El Dom, 30 de Julio de 2017, 21:51, Hardie, Andrew escribió:
Not sure how you get from “too complex to do via the CLI” to “that means it is possible”. But if you are keen to try proving me wrong, start by reading admin-install.inc.php.
best
Andrew.
From: "Andrés Chandía" [mailto:andres at chandia.net]

Sent: 30 July 2017 18:35
To: Hardie, Andrew
Cc: Open source development of the Corpus WorkBench
Subject: RE: [CWB] execute-cli functions
Mmm, that means it is possible... could you give me some directions on which way go to try it....

thanks...

El Dom, 30 de Julio de 2017, 16:15, Hardie, Andrew escribió:

“The internals”
= the way CQPweb works behind the scenes. Some things are simple enough that a single function call will suffice. Others aren’t.

Installing a corpus is, unfortunately, one of the things that is too complex to do via the CLI.
best
Andrew.
From:
cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> [mailto:cwb-bounces at sslmit.unibo.it]
On Behalf Of "Andrés Chandía"
Sent: 30 July 2017 00:39
To: Open source development of the Corpus WorkBench
Subject: Re: [CWB] execute-cli functions
Ok, what you mean with "the internals" and any way I'm looking for something that let me do the next things from command line:

someFunction installIndexedCorpus --name="theName" --desc"theDescription" --reg:"defaultDir" --css="thisCss.css"


So I can have the corpus available at the web interface without cliking or choosing parameters.

And hopefully, later do this:

someOtherFunction manageMetadata --source="createMetadataFromXml" --use="fh1,fh2,fh3,fh4..etc" --freqlist="auto"


yetAnotheFunction manageXml --handle.classif="theHandle" --description="theDescription"

andAnotherFunction manageAnnotation --handle="theHandle" --description="theDescription"

andAnotherFunction manageCEQLBindings --prim="primaryAnnotation" --sec="secondaryAnnotation" --terc="terciaryAnnotation" --comb"combinedAnnotation"

andAnotherFunction manageFreqLists --public="true"


and if there are more to manage access to the corpus for instance, much better...

well, thats what I would like to be able to do...

thanks



El Sab, 29 de Julio de 2017, 20:41, Hardie, Andrew escribió:


There isn’t one – sorry. You need knowledge of the internals to use this script safely.
best
Andrew.
From:
cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> [mailto:cwb-bounces at sslmit.unibo.it]
On Behalf Of "Andrés Chandía"
Sent: 29 July 2017 18:43
To: Open source development of the Corpus WorkBench
Subject: [CWB] execute-cli functions
(sorry I should have sent here)


Where can I get a list and definition of the functions that this script accepts...

php execute-cli.php NAME OF FUNCTION ARG1 ARG2 ...

Thanks....

_______________________
andrés chandía
[IMAGE REMOVED]<http://www.chandia.net>
NMT<http://chandia.net/content/nmt> |

Dungupeyem<http://chandia.net/content/dungupeyem> |
Corlexim<http://corlexim.cl>

administrador de:
Parles.upf<http://parles.upf.edu> |
Amind terapia<http://amindterapia.com> | ONG Mapuche koyaktu<http://koyaktumapuche.net> |
Nocando<http://parles.upf.edu/llocs/nocando> |
IAC<https://iac.upf.edu> | CddZ<https://iac.upf.edu/cddz> |
CatCg<https://catcg.upf.edu> |
mail: ONG Mapuche koyaktu<http://mail.corporacionkoyaktu.net> |
Psicoaching<http://mail.psicoaching.net> |
P
No imprima innecesariamente. ¡Cuide el medio ambiente!






_______________________
            andrés chandía
[chandia.net]<http://www.chandia.net>[http://mail.chandia.net/images/ico_tw.png]<https://twitter.com/andreschandia>
NMT<http://chandia.net/content/nmt> | Dungupeyem<http://chandia.net/content/dungupeyem> | Corlexim<http://corlexim.cl>

administrador de:
Parles.upf<http://parles.upf.edu> | Amind terapia<http://amindterapia.com> | ONG Mapuche koyaktu<http://koyaktumapuche.net> | Nocando<http://parles.upf.edu/llocs/nocando> | IAC<https://iac.upf.edu> | CddZ<https://iac.upf.edu/cddz> | CatCg<https://catcg.upf.edu> |
mail: ONG Mapuche koyaktu<http://mail.corporacionkoyaktu.net> | Psicoaching<http://mail.psicoaching.net> |
P No imprima innecesariamente. ¡Cuide el medio ambiente!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20170909/1f8d4296/attachment-0001.html>


More information about the CWB mailing list