DEADSOFTWARE

added new View print modes
[bbdiff.git] / README
diff --git a/README b/README
index 5c03ad50c9be9233bfce2f886cd00f8606a6707c..bbee7baaa06e76f9ac553f47241e2d4e1568829f 100644 (file)
--- a/README
+++ b/README
@@ -7,15 +7,15 @@ Clone of diff and diff3 utilites from *nix for BlackBox and its binary Compound
 Commands
 --------------------
 
-To use tools within Blackbox just compile DevDiff.
+To use tools within Blackbox just compile DiffBase and DiffUtils.
 
 DiffUtils.Compare (guard TextCmds.FocusGuard)
 
        Compare texts from two windows.
-       You can directly replace DevSearch.Compare with it in Dev/Rsrc/Menus.odc.
+       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.
 
@@ -33,27 +33,64 @@ To build it, open DiffMain and execute commanders at the end of document.
 Call `odctool help` to learn how to use it.
 
 
-Integration with Git
+Integration with git
 --------------------
 
-It is possible to integrate three-way merge with git.
+1. Compile odctool.
 
-1. Open .git/config and add this lines:
+2. Create script odctool-gitdiff:
+
+       #! /bin/sh
+       odctool diff -C -p "$1" "$2" "$5"
+
+3. Add to .git/config:
 
        [merge "odctool"]
                name = BlackBox Compound Document merge driver
-               driver = /full/path/to/odctool merge -p %P -o %A %A %O %B
+               driver = odctool merge -p %P -o %A %A %O %B
+       [diff "odctool"]
+               name = BlackBox Compound Document diff driver
+               command = odctool-gitdiff
+
+4. Add to .git/info/attributes:
+
+       *.odc merge=odctool diff=odctool
+
+
+5. Optionally you can ignore some BlackBox related files if add to .git/info/exclude:
+
+       *.ocf
+       *.osf
+       odc[0-9][0-9][0-9][0-9][0-9]
+
+
+Now you can see diffs using `git diff' and resolve conflicts without converting odc to text.
+
+
+Integration with ranger
+-----------------------
+
+1. To preview documents add to $HOME/.config/ranger/scope.sh:
+
+       handle_extension() {
+               case "${FILE_EXTENSION_LOWER}" in
+
+                       ...
 
-2. Open/create .git/info/attributes and add this line:
+                       # BlackBox Compound Document
+                       odc)
+                               odctool -C cat "${FILE_PATH}" && exit 5
+                               exit 1;;
+               esac
+       }
 
-       *.odc merge=odctool
+2. To open/read documents add to $HOME/.config/ranger/rifle.conf:
 
-Now when conflict occurs, it marked like diff3 directly in odc file.
-Checked not only text, but also views and formatting.
+       ext odc, has odctool, terminal, file = odctool -C cat "$1" | less --tabs=2 -S
 
 
 Current state
 --------------------
 
 This is NOT final version of subsustem Diff and odctool. It is NOT well tested, you are warned!
-Also, program and user interface are not stable yet, so it can be changed in future.
+Also, program and user interfaces are not stable yet, so it can be changed in future.