Page 1 of 1

farming custom scripts

Posted: Tue Oct 10, 2017 1:51 pm
by lulu116
hello
I have some custom scripts that generates images.
"myscript -f 100 110" would generate "image.{0100,0110}.png" for example...
I'm trying to find how I could submit that kind of custom commands to afanasy.
so far I understand you have to create a .json description of the job but I'm not sure how I have to handle "service" and "parser" for that kind of thing.

if someone could give me some hints or examples how to do that it would be great.
luc

Re: farming custom scripts

Posted: Sat Oct 14, 2017 8:38 am
by timurhai
Hi.
Better to use Python API:
http://cgru.info/afanasy/api#python

It should be very simple:

Code: Select all

j=af.Job('job_name')
b=af.Block('block_name')
b.setCommand('myscript -f @###@ @###@')
b.setNumeric( 100, 110, 1, 1)
j.blocks.append(b)
j.send()
- but i did not check this code

Re: farming custom scripts

Posted: Sat Oct 14, 2017 10:27 am
by lulu116
thank you.it's working fine.luc