1. Yuya Nishihara
  2. hgext-textful


hgext-textful /

Filename Size Date modified Message
57 B
add basic .hgignore rules
241 B
makefile: add rule to fetch README from wiki
1.5 KB
readme: sync with wiki
== Textful Extension ==

'''This extension is not distributed with Mercurial.'''

''Author: [[YuyaNishihara|Yuya Nishihara]]''

Download site: http://bitbucket.org/yuja/hgext-textful/

=== Overview ===

This extension tries to convert unreadable binary content to plain text when displaying,
so that you can see decent diff of binary files.

Currently supports the following conversions:

 * `textful.encoding`: convert character encoding
 * `textful.msexcel`: Microsoft Excel (*.xls), requires xlrd or pyExcelerator
 * `textful.pipe`: filter by external command, e.g. `catdoc` for Microsoft Word (*.doc)

=== Configuration ===

Configure your .hgrc to enable the extension by adding following lines:

textful = /path/to/hgext/textful
#textful.encoding = /path/to/hgext/textful/encoding.py
#textful.msexcel = /path/to/hgext/textful/msexcel.py
#textful.pipe = /path/to/hgext/textful/pipe.py

To enable conversion of character encoding for Japanese:

textful = /path/to/hgext/textful
textful.encoding = /path/to/hgext/textful/encoding.py

encoding = utf-8, euc-jp, cp932, iso-2022-jp

To add textful `cat` command without breaking original `cat`:

scat = cat

attend = annotate, diff, glog, log, qdiff, scat

To textize Microsoft Word document (*.doc):

textful = /path/to/hgext/textful
textful.pipe = /path/to/hgext/textful/pipe.py

pipe.doc = antiword -w0 $<
# or
# pipe.doc = catdoc -w $<