index a2a699ccbfc132613ea9ca8d25c9ac73858a2442..a7ec05ec822cc20d7fc6edb89766f9029714f1a8 100644 (file)
--- a/README
+++ b/README
You can directly replace DevSearch.Compare with DiffUtils.Compare in Dev/Rsrc/Menus.odc.
-^Q DiffUtils.CompareThis <oldfile> <newfile> [">" <outfile>]
+^Q DiffUtils.CompareThis <old> <new> [">" <outfile>]
Compare two files and produce patch in unified diff format.
2. Create script odctool-gitdiff:
#! /bin/sh
- odctool diff -p "$1" "$2" "$5"
+ odctool diff -C -p "$1" "$2" "$5"
3. Add to .git/config:
*.osf
odc[0-9][0-9][0-9][0-9][0-9]
-
Now you can see diffs using `git diff' and resolve conflicts from BlackBox.
+Integration with ranger
+-----------------------
+
+1. To preview documents add to $HOME/.config/ranger/scope.sh:
+
+ handle_extension() {
+ case "${FILE_EXTENSION_LOWER}" in
+
+ ...
+
+ # BlackBox Compound Document
+ odc)
+ odctool -C cat "${FILE_PATH}" && exit 5
+ exit 1;;
+ esac
+ }
+
+2. To open/read documents add to $HOME/.config/ranger/rifle.conf:
+
+ ext odc, has odctool, terminal, file = odctool -C cat "$1" | less --tabs=2 -S
+
+
Current state
--------------------