Metadata-Version: 1.1
Name: parsedifflib
Version: 0.1.0
Summary: A universal "diff" patch parsing library.
Home-page: http://github.com/metagriffin/parsedifflib
Author: metagriffin
Author-email: mg.pypi@uberdev.org
License: GPLv3+
Description: ==========================
        Diff Patch Parsing Library
        ==========================
        
        The `parsedifflib` package parses any style of diff patch into an
        event stream of patch instructions. These instructions can then be
        applied, colorized, reformatted, dissected, analyzed, etc.
        
        .. warning::
        
          2013/12/09: currently only the `svnlook` format and stream-oriented
          event output is supported. Eventually, all the formats supported by
          colordiff are intended to be supported as well as structured output.
        
        
        Usage
        =====
        
        .. code-block:: python
        
          import parsedifflib, subprocess
        
          data = subprocess.check_output('svnlook diff /path/to/repos', shell=True)
        
          for event, target in parsedifflib.parse_svnlook(data, {'lineNumbers': True}):
        
            if event in ( parsedifflib.Event.PATCH_START,
                          parsedifflib.Event.PATCH_END,
                          parsedifflib.Event.ENTRY_END,
                          parsedifflib.Event.LINE_LOC,
                          parsedifflib.Event.LINE_SAME,
                          parsedifflib.Event.LINE_NOTE,
                          parsedifflib.Event.PROPENTRY,
                        ):
              continue
        
            elif event == parsedifflib.Event.ENTRY_START:
              print target.comment
        
            elif event == parsedifflib.Event.LINE_DELETE:
              print '  - deleted line %d: %s' % (target.oldnum, target.line)
        
            elif event == parsedifflib.Event.LINE_DELETE:
              print '  + added line %d: %s' % (target.newnum, target.line)
        
        
        Credits
        =======
        
        Much inspiration came from:
        
        * https://github.com/ymattw/cdiff
        * https://github.com/kimmel/colordiff
        
Keywords: universal diff parse patch
Platform: any
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
