#!/usr/bin/env php
<?php
/**
 * Converts CSV to atlassian confluence markup
 *
 * @author Christian Weiske <cweiske@cweiske.de>
 */
$file = $argv[1];
if (!file_exists($file)) {
    echo "File does not exist\n";
    exit(1);
}

$hdl = fopen($file, 'r');
while ($row = fgetcsv($hdl)) {
    echo '|' . implode(' | ', $row) . "|\n";
}
?>
