Ignoring Sections of a Report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AjayS
    Visitor
    • Mar 2013
    • 4

    Ignoring Sections of a Report

    Hi there,

    I'm trying to find the differences between two text outputs. The outputs are from a older and newer version of a program, so for the most part the issues are just formatting changes.

    The thing is that I don't care to compare certain portions of the document. And unfortunately, it's where most of the changes are occuring. Is there a way to ignore certain these sections or alternatively only check the sections I'm interested in. In either case, there are only a handful and I don't mind making individual rules for each section. The general section format is:

    *********** [Section Title] ***********
    Data
    Data
    Data
    **********************************

    So far, I've attempted using the features available in File Format, but to not much avail. The 'Lines' option for a Grammar rule sort of works, but not all of my sections have a pre-determined number of lines. This also caused some issues when orphan lines were part of the chosen set of lines. And unless I'm using the 'Delimited' feature wrong, it only seems to compare single lines.

    I can also imagine using the 'Conversion' functionality to physically remove the unwanted sections, but I figured I'd come here and ask before writing that program.

    I've scoured through the BC3 boards, and couldn't find anything too relevant.

    Thanks in advance for any help you can offer.
  • Aaron
    Team Scooter
    • Oct 2007
    • 16026

    #2
    Hello,

    You can define a Delimited section to be from:
    *********** [Section Title] ***********
    to
    **********************************

    And span the multiple Data lines in between (as long as Stop at End of Line is unchecked).

    Then, mark this grammar element name as Important in the Session menu -> Session Settings, Importance tab as Important, then uncheck "Everything else" and any other grammar elements to make all other text unimportant.

    Then toggle on Ignore Unimportant Differences.

    We have a KB article and video that go into more detail, here:
    http://www.scootersoftware.com/suppo..._unimportantv3

    How does this work for you?
    Aaron P Scooter Software

    Comment

    • AjayS
      Visitor
      • Mar 2013
      • 4

      #3
      Hey Aaron,

      Thanks a lot. That worked exactly like I needed to. I guess when I tried the Delimited before, it didn't work because I wasn't using the whole line. And I didn't notice/understand what the "Everything Else" did previously.

      I played around with it a bit and I was wondering if, in the Delimited "To" option, there is a way to somehow enter an end-of-file character or something of that nature?

      And also, I'm using this in a script to create a text-report with "rules-based" as a critieria and it seems to pick up the differences I want. I was just wondering if there was a way to "display-all" but only the important sections. I realize that it's a bit of a long shot, but I figured I'd ask.

      Both of these questions would just sort of be icing on the cake, so if there isn't a way/it's really complicated. Don't worry about it.
      Last edited by AjayS; 18-Mar-2013, 02:24 PM.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16026

        #4
        Hello,

        There is a RegEx in the dropdown menu (the little down arrow next to the text field) for End of Line. It's a "$". The text in that will need to match the last characters in the phrase you are searching on. This could be *****$, but if that somehow happens elsewhere in the file, it could match on there first instead.

        Unfortunately, display-all, display-mismatches, etc, can only limit and report on the criteria, not only specific grammar elements. The closest I can think of is using the display-mismatches with context, which can show a configurable number of lines surrounding any differences that are found.
        Aaron P Scooter Software

        Comment

        • AjayS
          Visitor
          • Mar 2013
          • 4

          #5
          Alright, thanks Aaron. That's fine.

          And one last question, is there way to set "Everything else" to unchecked from a script or is the only way to save it as default/load a previous session? I realize this isn't the scripting forum, but I didn't want to start a new thread for this.

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 16026

            #6
            That's fine, Ajay.

            The short answer is no. Unfortunately, you would need to set the default or load a folder compare session (with specific child session settings saved as part of it) in order to change this value. Another option is to have a Portable Install of BC3, and alter the BCSessions.xml on the fly using an automated process, and then calling the BCScript.

            Would there be another set of grammar you could use? Something that would match on 'everything else' in your files without needing to change this checkbox regularly?
            Aaron P Scooter Software

            Comment

            • AjayS
              Visitor
              • Mar 2013
              • 4

              #7
              It's not a big issue. I just wanted to make my system as portable/easy-to-use as possible. So I was hoping I could eliminate the step of the next user having to worry about their session settings. But it's not a big deal, I'll just add it to my instructions. I might give the xml switcheroo a shot though.

              Thanks a lot for your help Aaron.

              Also, just want to let you guys know that you have an awesome product. I've been surprised numerous times now as to how powerful it is.

              Comment

              • Aaron
                Team Scooter
                • Oct 2007
                • 16026

                #8
                Hello,

                Thanks. If you have any questions come up while trying to set this up, please let us know.

                If you are just looking to share settings between multiple users, you can use the Tools menu -> Export/Import, or manually copy/paste the BCSetting.xmls into the proper location on the destination machine (either %AppData%\Scooter Software\Beyond Compare 3\, or the install directory for a Portable install). This would make that user's settings match the import, for either script calls or the graphical interface. If it only needs to match for scripting, you could use a specific Portable install for script, and an individual install for the user to use graphically.
                Aaron P Scooter Software

                Comment

                Working...