name        "Import Data from CSV or TSV file"
icon    "$BIRCH/public_html/images/birch_black_ico.png"
tip    "import from a CSV (comma-separated value) or TSV (tab-separated value) file"

var "sepchar"
    type        chooser
    label       "File format"
    default     1
    choices
        "csv"       ","
        "tsv"       "'\042'"

var "out1"
    type        tempfile
    direction   out
    format      tsv

var "inputfile"
    type        file
    label       "Name of file?"

panel
    var "Run"
        type        button
        label       "Run"
        shell       "cat %INPUTFILE% | tr %SEPCHAR% '	' > %out1%"
        close       true
    var "Help"
        type        button
        label       "Help"
        shell       "$BIRCH/script/chooseviewer.py $BIRCH/doc/blmarker/ImportCSV.help"
        close       false
