Tags:
user_interface1Add my vote for this tag version_control1Add my vote for this tag create new tag
, view all tags

TWiki Diff word by word Add-on

Support for the integration of Diff word by word. Comes bundled with a modified diff Python application.
This add-on compares two revisions and shows differences with a word by word context. These differences can be visualized in normal view, html code or TML code using two layouts (in place and side by side).

UPDATED: the 1.03 release is more TWiki independant to facilitate update:
The TWiki distribution has been patch to allow administrator to select a specific Diff from the configuration page.
By this way, other diff which will implement RDiff.pm procedures should be integrated.

For the impatient: add-on test

Screenshot inplace-view Screenshot sbs-view
Screenshot inplace-raw Screenshot sbs-raw

Features

  • Diff with word by word context
  • Several parameters are editables by the interface:
    • Revisions to compare
    • The layout { in place and side by side }
    • The rendering style { Normal view (like the view script), raw view (TML view) and html code }
  • With the rendering styles raw view and html code you can select a line number to higtlight it. This selection creates a new URL that you can send to another person
  • Comes with additional templates and doesn't edit current TWiki files (except if you use the optional patch which replaces all the references from rdiff to rdiffword script but undo is always possible).

Demo

Details

What's in the package

  • The package includes the following pieces:
    • New templates, perl scripts, icons, css and a patch
    • A modified Python application to process the diff word by word

Parameters

  • rev1: by default the higher revision
  • rev2 : by default the lower revision
  • layout: the layout style {inplace, sidebyside}. Preferences: DIFFWORDLAYOUTSTYLE (default: inplace )
  • render: the rendering style {view, raw, html}. Preferences: DIFFWORDRENDERSTYLE (default: view )
  • skin: the skin used to display the diff
  • sel: the selected line number

Add-On Installation Instructions

Requirements

  • TWiki dakar 4.x (with x > 2)
  • Python 2.2 to execute the modified diff Python application
  • Perl dependency:
    Name Description
    File::Temp Required. Available from CPAN

Installation

  • Download the ZIP file from the Plugin web (see below)
  • Unzip DiffWordByWordAddOn.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/DiffWordByWordAddOn.txt Add-on topic
    data/TWiki/DiffWordByWordAddOn.txt,v Add-on topic repository
    pub/TWiki/DiffWordByWordAddOn/inplace-raw.jpg Add-on topic image
    pub/TWiki/DiffWordByWordAddOn/inplace-view.jpg Add-on topic image
    pub/TWiki/DiffWordByWordAddOn/sbs-raw.jpg Add-on topic image
    pub/TWiki/DiffWordByWordAddOn/sbs-view.jpg Add-on topic image
    lib/TWiki/UI/RDiffWord.pm Perl module
    lib/Python/webdiff Python module
    templates/rdiffword.pattern.tmpl Template for display the Diff
    templates/viewtopicactionbuttons.rdiffword.tmpl Template to integrate this Add-on in the topic action buttons bar
    templates/oopsmore.rdiffword.tmpl Template to integrate this Add-on in the more topic
    pub/TWiki/PatternSkinCustomization/diffword.css New CSS styles
    pub/TWiki/PatternSkinCustomization/addedMarker.png Button image
    pub/TWiki/PatternSkinCustomization/deletedMarker.png Button image
    pub/TWiki/PatternSkinCustomization/btn_end.gif Button image
    pub/TWiki/PatternSkinCustomization/btn_next.gif Button image
    pub/TWiki/PatternSkinCustomization/btn_prev.gif Button image
    pub/TWiki/PatternSkinCustomization/btn_start.gif Button image
    pub/TWiki/PatternSkinCustomization/oopsmore_diffword_inplace.png More action image
    pub/TWiki/PatternSkinCustomization/oopsmore_diffword_sidebyside.png More action image
    diffword.patch Patch for Dakar 4.x (x > 2) to integrate this diff

  • Execute the following command to automatically integrate the new TWiki diff: patch -p1 -i diffword.patch
    Modifications:
    File: Modification:
    bin/rdiff take in charge a new configuraiton variable to call a specific diff
    bin/rdiffauth take in charge a new configuration variable to call a specific diff
    lib/TWiki.spec New diff variable to activiate the diff from the configuration page (Miscellaneous settings section)
  • Go to your TWiki configuration url
    • In the "Miscellaneous settings" update the "DiffMod" parameters
  • To enable the new oopsmore template update SKIN variable in your TWikiPreferences page by adding the 'rdiffword' skin.
    • ex.: if your skin is "SET SKIN = pattern" replace this line by "Set SKIN = rdiffword, pattern"

Uninstallation

  • Execute this command to undo the patch: patch -p1 -R -i diffword.patch
  • Remove files:
    data/TWiki/DiffWordByWordAddOn.txt Add-on topic
    data/TWiki/DiffWordByWordAddOn.txt,v Add-on topic repository
    pub/TWiki/DiffWordByWordAddOn/inplace-raw.jpg Add-on topic image
    pub/TWiki/DiffWordByWordAddOn/inplace-view.jpg Add-on topic image
    pub/TWiki/DiffWordByWordAddOn/sbs-raw.jpg Add-on topic image
    pub/TWiki/DiffWordByWordAddOn/sbs-view.jpg Add-on topic image
    lib/TWiki/UI/RDiffWord.pm Perl module
    lib/Python/webdiff Python module
    templates/rdiffword.pattern.tmpl Template for display the Diff
    templates/viewtopicactionbuttons.rdiffword.tmpl Template to integrate this Add-on in the topic action buttons bar
    templates/oopsmore.rdiffword.tmpl Template to integrate this Add-on in the more topic
    pub/TWiki/PatternSkinCustomization/diffword.css New CSS styles
    pub/TWiki/PatternSkinCustomization/addedMarker.png Button image
    pub/TWiki/PatternSkinCustomization/deletedMarker.png Button image
    pub/TWiki/PatternSkinCustomization/btn_end.gif Button image
    pub/TWiki/PatternSkinCustomization/btn_next.gif Button image
    pub/TWiki/PatternSkinCustomization/btn_prev.gif Button image
    pub/TWiki/PatternSkinCustomization/btn_start.gif Button image
    pub/TWiki/PatternSkinCustomization/oopsmore_diffword_inplace.png More action image
    pub/TWiki/PatternSkinCustomization/oopsmore_diffword_sidebyside.png More action image
    diffword.patch Optional patch

Configuration Settings

  • Set DIFFWORDLAYOUTSTYLE = The name of the default layout { inplace (default), sidebyside }
  • Set DIFFWORDRENDERSTYLE = The name of the default rendering style { view (default), raw , html }

Add-On Info

  • Set SHORTDESCRIPTION = Show word-by-word differences between revisions of topics

Add-on Author: TWiki:Main/FredericLuddeni (Special thanks to TWiki:Main/ColasNahaboo for his help and feedback)
Add-on Version: 07 July 2008 (v1.03)
Copyright: © ILOG S.A. 2006
Supported version Dakar 4.x (with x > 2)
Change History:  
07 July 2008: Version 1.03: new release for 4.2 with new packaging:
a variable has been added in the configuration page and this release is more TWiki independant to facilite update
13 Nov 2006: Version 1.02: Documentation updated, Zip file rename form TwikiDiffWord.zip to DiffWordByWordAddOn.zip
10 Nov 2006: Version 1.01: new release for Dakar 4.0.5
31 May 2006: Initial version 1.00 for Dakar 4.0.2
Known bugs:  
31 May 2006 Text is not wrap (with IE) with raw/html rendering style
CPAN Dependencies: File::Temp
Other Dependencies: Python 2.2
License: GPL
Add-on Home: http://TWiki.org/cgi-bin/view/Plugins/DiffWordByWordAddOn
Feedback: http://TWiki.org/cgi-bin/view/Plugins/DiffWordByWordAddOnDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/DiffWordByWordAddOnAppraisal

-- TWiki:Main/FredericLuddeni - 31 May 2006

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip DiffWordByWordAddOn103.zip r1 manage 498.7 K 2008-07-07 - 15:37 FredericLuddeni Diff word by Word version 1.03
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2009-04-10 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.