1. Welcome to Smogon! Check out the Smogon Starters Hangout for everything you need to know about starting out in the community. Don't forget to introduce yourself in the Introduction and Hangout Thread, too!
  2. Welcome to Smogon Forums! Please take a minute to read the rules.

Programming Python Diff Application Ideas!

Discussion in 'Technical Projects' started by ShortsTheory, Mar 17, 2013.

  1. ShortsTheory

    ShortsTheory

    Joined:
    Jan 7, 2012
    Messages:
    120
    The purpose of this thread is to gauge interest for a new diff application. If you're a GP checker/writer for analyses/articles/the smog, chances are you've heard of diff applications. Diff applications are programs that compare two samples of text and produce an output, indicating differences between the two samples (hence the name, diff). Currently, most GP checkers on smogon use the diff app available at http://shaym.in/apps/diff/
    While this application is an invaluably useful resource, it suffers from a few main problems:

    1. Computing diffs for large texts invariably screws up the BB code output
    2. There's no way you can add comments in between your grammar checks without the comments themselves getting formatted in bold and green in your output
    3. The UI has suffers from a few shortcomings:
      UI issues BIG (open)
      [​IMG]
    4. The current diff application does not support changing the text color combinations. While this is easy to do manually (by using find and replace in a text editor), it would be far better to simply have in-built support for changing text colors.
    Ideas:

    I plan to make a new diff application written in Python using Google's diff APIs. I'm still unsure about specifics such as interface designers (using pyGTK+Glade or tkinter). However, I have made a diff application for Windows using VB6 (for a school project). While the diff algorithm it uses is far from complete, it exhibits the sort of interface and usability changes that I intend to carry on to the Python version. By no means is it a replacement to the current JS diff application and I highly insist that you use my application for TESTING PURPOSES ONLY. DO NOT, DO NOT USE IT FOR OFFICIAL GP CHECKS.

    Download diff! 0.2.6 Smogon Beta>>
    No installation required! Use only for testing interface changes!
    Windows only. Does not work with WINE for Linux.


    Plans:


    I intend to incorportate several new features in the diff application that I'll be writing in Python. Salient features will include:

    1. Options to change color combinations for deleted/added text
    2. Options to add comments
    3. Faster and more accurate operation: this includes making the diff app stable enough, such that it can compute outputs for highly varied paragraphs without screwing the additions/deletions in red
    I plan to make the diff application available to Linux users first (it can be ported to Mac and Windows later on). I'm still in the process of learning Python, so help will be highly appreciated! If you have any suggestion/ideas for new features, please post here/VM/PM me!

Users Viewing Thread (Users: 0, Guests: 0)