forked from dokuwiki/dokuwiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e82b082
commit 1c36b3d
Showing
6 changed files
with
140 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#!/usr/bin/php | ||
<?php | ||
if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__) . '/../') . '/'); | ||
if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../').'/'); | ||
define('NOSESSION', 1); | ||
require_once(DOKU_INC . 'inc/init.php'); | ||
require_once(DOKU_INC.'inc/init.php'); | ||
|
||
|
||
/** | ||
|
@@ -14,7 +14,7 @@ | |
* DokuWiki markup | ||
* | ||
* @license GPL2 | ||
* @author Andreas Gohr <[email protected]> | ||
* @author Andreas Gohr <[email protected]> | ||
*/ | ||
class RenderCLI extends DokuCLI { | ||
|
||
|
@@ -26,11 +26,11 @@ class RenderCLI extends DokuCLI { | |
*/ | ||
protected function setup(DokuCLI_Options $options) { | ||
$options->setHelp( | ||
'A simple commandline tool to render some DokuWiki syntax with a given renderer.' . | ||
"\n\n" . | ||
'This may not work for plugins that expect a certain environment to be ' . | ||
'set up before rendering, but should work for most or even all standard ' . | ||
'DokuWiki markup' | ||
'A simple commandline tool to render some DokuWiki syntax with a given renderer.'. | ||
"\n\n". | ||
'This may not work for plugins that expect a certain environment to be '. | ||
'set up before rendering, but should work for most or even all standard '. | ||
'DokuWiki markup' | ||
); | ||
$options->registerOption('renderer', 'The renderer mode to use. Defaults to xhtml', 'r', 'mode'); | ||
} | ||
|
@@ -49,7 +49,7 @@ protected function main(DokuCLI_Options $options) { | |
|
||
// do the action | ||
$source = stream_get_contents(STDIN); | ||
$info = array(); | ||
$info = array(); | ||
$result = p_render($renderer, p_get_instructions($source), $info); | ||
if(is_null($result)) throw new DokuCLI_Exception("No such renderer $renderer"); | ||
echo $result; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.