Mercurial > repos > jjohnson > sqlite_to_tabular
comparison sqlite_to_tabular.xml @ 2:bc50a7b7f246 draft
Uploaded
| author | jjohnson |
|---|---|
| date | Sun, 04 Oct 2015 10:51:12 -0400 |
| parents | 1819a06a01eb |
| children | f079ea3884b3 |
comparison
equal
deleted
inserted
replaced
| 1:1819a06a01eb | 2:bc50a7b7f246 |
|---|---|
| 1 <?xml version="1.0"?> | 1 <?xml version="1.0"?> |
| 2 <tool id="sqlite_to_tabular" name="SQLite to tabular" version="0.0.1"> | 2 <tool id="sqlite_to_tabular" name="SQLite to tabular" version="0.0.1"> |
| 3 <description>for SQL query</description> | 3 <description>for SQL query</description> |
| 4 <stdio> | 4 <stdio> |
| 5 <exit_code range="1:" level="fatal" description="Error" /> | 5 <exit_code range="1:" level="fatal" description="Error" /> |
| 6 </stdio> | 6 </stdio> |
| 7 <command interpreter="python"> | 7 <configfiles> |
| 8 sqlite_to_tabular.py | 8 <configfile name="query_file"> |
| 9 --sqlitedb="$sqlitedb" | 9 $sqlquery |
| 10 --query='$sqlquery' | 10 </configfile> |
| 11 $no_header | 11 </configfiles> |
| 12 --output="$query_results" | 12 |
| 13 </command> | 13 <command interpreter="python"> |
| 14 <inputs> | 14 sqlite_to_tabular.py |
| 15 <param name="sqlitedb" type="data" format="sqlite" label="SQLite Database"/> | 15 --sqlitedb="$sqlitedb" |
| 16 <param name="sqlquery" type="text" area="True" size="120x20" label="SQL query"> | 16 --query_file="$query_file" |
| 17 <validator type="regex">^(?im)\s*SELECT\s.*\sFROM\s.*$</validator> | 17 $no_header |
| 18 <sanitizer sanitize="False"/> | 18 --output="$query_results" |
| 19 </param> | 19 </command> |
| 20 <param name="no_header" type="boolean" truevalue="-n" falsevalue="" checked="False" label="Omit column headers"/> | 20 <inputs> |
| 21 </inputs> | 21 <param name="sqlitedb" type="data" format="sqlite" label="SQLite Database"/> |
| 22 <outputs> | 22 <param name="sqlquery" type="text" area="True" size="120x20" label="SQL query"> |
| 23 <data name="query_results" format="tabular" /> | 23 <validator type="regex">^(?im)\s*SELECT\s.*\sFROM\s.*$</validator> |
| 24 </outputs> | 24 <sanitizer sanitize="False"/> |
| 25 <tests> | 25 </param> |
| 26 <!-- | 26 <param name="no_header" type="boolean" truevalue="-n" falsevalue="" checked="False" label="Omit column headers"/> |
| 27 --> | 27 </inputs> |
| 28 <test> | 28 <outputs> |
| 29 <param name="sqlitedb" ftype="sqlite" value="testdb.sqlite" /> | 29 <data name="query_results" format="tabular" /> |
| 30 <param name="sqlquery" value="SELECT first_name, last_name, age FROM contacts WHERE first_name = 'Sam'" /> | 30 </outputs> |
| 31 <output name="query_results"> | 31 <tests> |
| 32 <assert_contents> | 32 <test> |
| 33 <has_text text="Smith" /> | 33 <param name="sqlitedb" ftype="sqlite" value="testdb.sqlite" /> |
| 34 <not_has_text text="Doe" /> | 34 <param name="sqlquery" value="SELECT first_name, last_name, age FROM contacts WHERE first_name = 'Sam'" /> |
| 35 </assert_contents> | 35 <output name="query_results"> |
| 36 </output> | 36 <assert_contents> |
| 37 </test> | 37 <has_text text="Smith" /> |
| 38 </tests> | 38 <not_has_text text="Doe" /> |
| 39 <help> | 39 </assert_contents> |
| 40 Outputs the results of a query on a SQLite Database as a tabular file. | 40 </output> |
| 41 </help> | 41 </test> |
| 42 </tests> | |
| 43 <help> | |
| 44 Outputs the results of a query on a SQLite Database as a tabular file. | |
| 45 </help> | |
| 42 </tool> | 46 </tool> |
