Hi Stian, Some changes in command line options..... The new commands would be
usage: tavlang <command> [<args>] > The most commonly used tavlang commands are: > convert Convert the given workflow > help Display help information about Tvarna > inspect Inspect the given workflow and show the results on the > terminal > validate validate the given workflow > version Show version informantion > See 'tavlang help <command>' for more information on a specific command. This was because the airline library which produces a git like command line option structure. There are commands which are considered as top level. Eg: $git config So I used them as $tavlang convert Other type is options which can be used under commands. eg: -i, --recursive etc. This will be the sample help page for 'convert' command. (Generated by the library) $ tavlang help convert > NAME > tavlang convert - Convert the given workflow > SYNOPSIS > tavlang convert [(-i <in_file_dir> | --input <in_file_dir>)] > [-json] > [(-o <out_file_dir> | --output <out_file_dir>)] [(-r | > --recursive)] > [-robundle] [-structure] [(-V | --validate)] [-wfbundle] > [-wfdesc] [--] > <output format> <input files> > OPTIONS > -i <in_file_dir>, --input <in_file_dir> > Input file/ file dir for conversion > -json > Convert the workflow into json > -o <out_file_dir>, --output <out_file_dir> > Output file/ directory > -r, --recursive > Execute the command recursively > --robundle > Convert given bundel in to Research Object bundel > --structure > Convert the workflow into *.structure > -V, --validate > Validate the workflow before convert > --wfbundle > Convert the workflow file to wfbundel > --wfdesc > Convert the workflow file to wfdesc-turtle > -- > This option can be used to separate command-line options from > the > list of argument, (useful when arguments might be mistaken for > command-line options > <output format> <input files> > List of files to be converted. Give the list of files to be > converted without -i/-o and the converted files will be saved > in to > /converted folder in the same dir There is a top level 'validate' command as well as I used here as an option. Is this structure is acceptable or do I need to change it? Thank you very much Menaka On 11 June 2015 at 21:10, Stian Soiland-Reyes <[email protected]> wrote: > On 5 June 2015 at 11:53, Menaka Madushanka <[email protected]> wrote: > >> What is [tool] here? > > For convert, we have to give the output file format. I used tool here to > > specify the converter which convert to the specified format. > > So that it will be like this. > > tavlang -C -wfdesc ../hello.t2flow ../output/ > > tavlang -C -r -json ../toConvert/ ../output/ > > Ah, I see, you've made one option for each output format.. does that > mean you could in theory ask for multiple outputs? > > Why a single -, I would expect it to be double-dashed: --wfdesc, --json > etc. > > > I would perhaps have done it as > > tavlang -C --out-format=wfdesc ../hello.t2flow > > ..with that a similar --in-format (wish item!) could be used for > hard-coding input to avoid guessing (e.g. for files from stdin) > > > But I think you can have a go with what you prefer for now so we don't > dance too much about. > > > > *-C --convert [output format] [options] [input] [output] * > > yeah, that's more understandable documentation. :) > > > > I thought of writing the results to a text file with the same name of the > > inspected file. > > Yes, that is probably a good solution - and you hardcode the output > file extensions. > > > > > > -- > Stian Soiland-Reyes > Apache Taverna (incubating), Apache Commons RDF (incubating) > http://orcid.org/0000-0001-9842-9718 > -- Menaka Madushanka Jayawardena Faculty of Engineering, <http://www.pdn.ac.lk/eng> University of Peradeniyaya. LinkedIn <http://lk.linkedin.com/in/menakajayawardena>
