X-Git-Url: https://deadsoftware.ru/gitweb?p=bbdiff.git;a=blobdiff_plain;f=README;h=bbee7baaa06e76f9ac553f47241e2d4e1568829f;hp=a2a699ccbfc132613ea9ca8d25c9ac73858a2442;hb=ea9ebbf9d13b2f0a0fb436dd05972d044fea7d28;hpb=e05e957bb4048a7e40b3095c59fb4e2847bd2dfe diff --git a/README b/README index a2a699c..bbee7ba 100644 --- a/README +++ b/README @@ -15,7 +15,7 @@ DiffUtils.Compare (guard TextCmds.FocusGuard) You can directly replace DevSearch.Compare with DiffUtils.Compare in Dev/Rsrc/Menus.odc. -^Q DiffUtils.CompareThis [">" ] +^Q DiffUtils.CompareThis [">" ] Compare two files and produce patch in unified diff format. @@ -33,7 +33,7 @@ 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 -------------------- 1. Compile odctool. @@ -41,16 +41,16 @@ Integration with Git 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: [merge "odctool"] name = BlackBox Compound Document merge driver - driver = /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 = /path/to/odctool-gitdiff + command = odctool-gitdiff 4. Add to .git/info/attributes: @@ -64,7 +64,29 @@ Integration with Git odc[0-9][0-9][0-9][0-9][0-9] -Now you can see diffs using `git diff' and resolve conflicts from BlackBox. +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 + + ... + + # 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