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
Jari Kanerva
committed
Dec 13, 2009
0 parents
commit f30ac61
Showing
12 changed files
with
3,356 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"Phiff" is a MODX generator that attempts to run a diff and then generate a MODX file with inline edits. | ||
|
||
Do note that this is early beta. Read the issues file. | ||
|
||
Authors: Jari Kanerva (tumba25) | ||
|
||
USAGE: | ||
php modx_diff.php -o path/to/unchanged/dir (or file) -n path/to/changed/dir (or file) | ||
|
||
The parameters to modx_diff.php needs to be after "php modx_diff.php". | ||
-o, --old = The original files, with path from / or the current dir. | ||
-n, --new = The modified files, with path from / or the current dir. | ||
Both old and new need to be either files or dirs. | ||
-f, --outfile = path and name of file to generate. Defautls to ./install_mod.xml | ||
-v, --verbose = Tell what happens. |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* | ||
* @package MODX Generator | ||
* @version $Id$ | ||
* @copyright (c) tumba25 | ||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2 | ||
* | ||
*/ | ||
|
||
/** | ||
* modx_diff configuration file. | ||
*/ | ||
|
||
/** | ||
* The ignore array contains files and directories to ignore. | ||
*/ | ||
$ignore = array( | ||
'Thumbs.db', | ||
'cache', | ||
'install', | ||
'config.php', | ||
'store', | ||
'docs', | ||
); | ||
|
||
/** | ||
* File extensions ignore while diffing | ||
* Images and other binary file types. | ||
*/ | ||
$ignore_ext = array( | ||
'jpg', | ||
'jpeg', | ||
'gif', | ||
'png', | ||
'zip', | ||
'tar', | ||
'rar', | ||
); | ||
|
||
// Ignore version strings like @version $Id$ | ||
// This setting is ignored for now. | ||
$ignore_file_version = true; |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
/** | ||
* | ||
* @package MODX Generator | ||
* @version $Id$ | ||
* @copyright (c) tumba25 | ||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2 | ||
* | ||
*/ | ||
|
||
// Some deafults | ||
// Search rows needs to be high to avoid identical finds. | ||
define('SEARCH_ROWS', 10); | ||
|
||
// Diff options. | ||
define('DIFF_BASIC', 0); | ||
define('DIFF_CUSTOM', 1); | ||
|
||
// Type definitions (type) | ||
//define('NOP', 0); | ||
define('INLINE', 1); | ||
define('EDIT', 2); | ||
|
||
// Edit definitions (add-type) | ||
define('DO_NOTHING', 0); | ||
define('ADD_BEFORE', 1); | ||
define('ADD_AFTER', 2); | ||
define('REPLACE', 3); | ||
define('INLINE_ADD_AFTER', 4); | ||
define('INLINE_ADD_BEFORE', 5); | ||
define('INLINE_REPLACE', 6); | ||
|
||
// Error messages from gen_find() | ||
define('MOVE_UP', 7); | ||
define('MOVE_DOWN', 8); | ||
define('NO_FIND', 8); |
Oops, something went wrong.