diff options
| author | Christian Weiske <weiske@mogic.com> | 2016-06-21 09:48:01 +0200 |
|---|---|---|
| committer | Christian Weiske <weiske@mogic.com> | 2016-06-21 09:48:01 +0200 |
| commit | 4a2837ee386cbcc033baa56d9ad833f238e8589f (patch) | |
| tree | f80d80d01fc5bb75238f3cb0c23296ac27dcbd47 /tools/convert.php | |
| parent | 3eaf73ae96bff4c0f967a7c2e2f8759dfa2bd006 (diff) | |
| download | grauphel-4a2837ee386cbcc033baa56d9ad833f238e8589f.tar.gz grauphel-4a2837ee386cbcc033baa56d9ad833f238e8589f.zip | |
Add command line tool to convert tombody notes to rST
Diffstat (limited to 'tools/convert.php')
| -rwxr-xr-x | tools/convert.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/convert.php b/tools/convert.php new file mode 100755 index 0000000..2f57d6a --- /dev/null +++ b/tools/convert.php @@ -0,0 +1,14 @@ +#!/usr/bin/env php +<?php +require 'lib/converter/base.php'; +require 'lib/converter/restructuredtext.php'; + +if ($argc != 2) { + echo "Tomboy note file name missing\n"; + exit(1); +} + +$file = $argv[1]; +$conv = new \OCA\Grauphel\Converter\ReStructuredText(); +echo $conv->convert(file_get_contents($file)); +?> |
