{
  "Comments" : "Performs difference analysis on input passed to it in the current test against the input passed to it in the previous test, so best used after a change.\n\nIt outputs a rich-text representation of the differences and commonalities, which is better suited to a rich text email or other HTML enabled destination than something like Notification Centre.\n\nIt works especially well with simple text, but also with strings of all sorts.  Text \/ strings may span many lines and the filter should be able to handle most special characters.\n\nThe looseness variable, if set, determines the accuracy of the difference analysis.  A looseness of 0 will output every little difference and commonality.  A value of 8, give or take, will factor out most small commonalities that are likely to be coincidental and may offer a good compromise between precision and readability \n\nA blank, or non-numeric, value for the Looseness variable will cause the filter to default to a preset algorithm that optimises the output for easy readability.  This default preset will normally give a similar output to a looseness of about 10, but should offer superior readability to that algorithm.",
  "forChanged" : true,
  "forFailure" : false,
  "PauseUntilDate" : "0001-01-01T00:00:00Z",
  "IntroRelease" : "4026b",
  "Name" : "Rich Text Representation of Changes",
  "PluginSettings" : {
    "ScriptInstructions" : "A looseness of 0 will output every little difference and commonality.  10 or so will optimise for readability by factoring out those that are likely to be coincidental.  A blank value follows a special algorithm for readability. ",
    "ScriptVariables" : {
      "Looseness" : ""
    },
    "ScriptType" : "Python: \/usr\/bin\/python",
    "ScriptSourceBase64" : "aW1wb3J0IG1hdGgKaW1wb3J0IHJlCmltcG9ydCBzeXMKaW1wb3J0IHRpbWUKaW1w\nb3J0IHVybGxpYgoKaWYgIntMb29zZW5lc3N9Ii5pc2RpZ2l0KCk6Cglsb29zZSA9\nIGludCgie0xvb3NlbmVzc30iKQoJaHVtYW5fZGlmZiA9IEZhbHNlCmVsc2U6Cgls\nb29zZSA9IDQKCWh1bWFuX2RpZmYgPSBUcnVlCgpjbGFzcyBkaWZmX2FuYWx5c2lz\nOgoKICBkZWYgX19pbml0X18oc2VsZik6CgogICAgIyBOdW1iZXIgb2Ygc2Vjb25k\ncyB0byBtYXAgYSBkaWZmIGJlZm9yZSBnaXZpbmcgdXAgKDAgZm9yIGluZmluaXR5\nKS4KICAgIHNlbGYuRGlmZl9UaW1lb3V0ID0gMAogICAgIyBDb3N0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ICAgIG92ZXJsYXBfbGVuZ3RoMSA+PSBs\nZW4oaW5zZXJ0aW9uKSAvIDIuMCk6CiAgICAgICAgICAgICMgT3ZlcmxhcCBmb3Vu\nZC4gIEluc2VydCBhbiBlcXVhbGl0eSBhbmQgdHJpbSB0aGUgc3Vycm91bmRpbmcg\nZWRpdHMuCiAgICAgICAgICAgIGRpZmZzLmluc2VydChwb2ludGVyLCAoc2VsZi5E\nSUZGX0VRVUFMLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlu\nc2VydGlvbls6b3ZlcmxhcF9sZW5ndGgxXSkpCiAgICAgICAgICAgIGRpZmZzW3Bv\naW50ZXIgLSAxXSA9IChzZWxmLkRJRkZfREVMRVRFLAogICAgICAgICAgICAgICAg\nICAgICAgICAgICAgICAgICAgZGVsZXRpb25bOmxlbihkZWxldGlvbikgLSBvdmVy\nbGFwX2xlbmd0aDFdKQogICAgICAgICAgICBkaWZmc1twb2ludGVyICsgMV0gPSAo\nc2VsZi5ESUZGX0lOU0VSVCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg\nICAgIGluc2VydGlvbltvdmVybGFwX2xlbmd0aDE6XSkKICAgICAgICAgICAgcG9p\nbnRlciArPSAxCiAgICAgICAgZWxzZToKICAgICAgICAgIGlmIChvdmVybGFwX2xl\nbmd0aDIgPj0gbGVuKGRlbGV0aW9uKSAvIDIuMCBvcgogICAgICAgICAgICAgIG92\nZXJsYXBfbGVuZ3RoMiA+PSBsZW4oaW5zZXJ0aW9uKSAvIDIuMCk6CiAgICAgICAg\nICAgICMgUmV2ZXJzZSBvdmVybGFwIGZvdW5kLgogICAgICAgICAgICAjIEluc2Vy\ndCBhbiBlcXVhbGl0eSBhbmQgc3dhcCBhbmQgdHJpbSB0aGUgc3Vycm91bmRpbmcg\nZWRpdHMuCiAgICAgICAgICAgIGRpZmZzLmluc2VydChwb2ludGVyLCAoc2VsZi5E\nSUZGX0VRVUFMLCBkZWxldGlvbls6b3ZlcmxhcF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W5nIHJhdGhlciB0aGFuIGxlYWRp\nbmcgd2hpdGVzcGFjZSBvbiBlZGl0cy4KICAgICAgICAgIGlmIHNjb3JlID49IGJl\nc3RTY29yZToKICAgICAgICAgICAgYmVzdFNjb3JlID0gc2NvcmUKICAgICAgICAg\nICAgYmVzdEVxdWFsaXR5MSA9IGVxdWFsaXR5MQogICAgICAgICAgICBiZXN0RWRp\ndCA9IGVkaXQKICAgICAgICAgICAgYmVzdEVxdWFsaXR5MiA9IGVxdWFsaXR5MgoK\nICAgICAgICBpZiBkaWZmc1twb2ludGVyIC0gMV1bMV0gIT0gYmVzdEVxdWFsaXR5\nMToKICAgICAgICAgICMgV2UgaGF2ZSBhbiBpbXByb3ZlbWVudCwgc2F2ZSBpdCBi\nYWNrIHRvIHRoZSBkaWZmLgogICAgICAgICAgaWYgYmVzdEVxdWFsaXR5MToKICAg\nICAgICAgICAgZGlmZnNbcG9pbnRlciAtIDFdID0gKGRpZmZzW3BvaW50ZXIgLSAx\nXVswXSwgYmVzdEVxdWFsaXR5MSkKICAgICAgICAgIGVsc2U6CiAgICAgICAgICAg\nIGRlbCBkaWZmc1twb2ludGVyIC0gMV0KICAgICAgICAgICAgcG9pbnRlciAtPSAx\nCiAgICAgICAgICBkaWZmc1twb2ludGVyXSA9IChkaWZmc1twb2ludGVyXVswXSwg\nYmVzdEVkaXQpCiAgICAgICAgICBpZiBiZXN0RXF1YWxpdHkyOgogICAgICAgICAg\nICBkaWZmc1twb2ludGVyICsgMV0gPSAoZGlmZnNbcG9pbnRlciArIDFdWzBdLCBi\nZXN0RXF1YWxpdHkyKQogICAgICAgICAgZWxzZToKICAgICAgICAgICAgZGVsIGRp\nZmZzW3BvaW50ZXIgKyAxXQogICAgICAgICAgICBwb2ludGVyIC09IDEKICAgICAg\ncG9pbnRlciArPSAxCgogICMgRGVmaW5lIHNvbWUgcmVnZXggcGF0dGVybnMgZm9y\nIG1hdGNoaW5nIGJvdW5kYXJpZXMuCiAgQkxBTktMSU5FRU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xkZWw+QjwvZGVs\nPlg8ZGVsPkM8L2RlbD4KCiAgICAgICAgaWYgbGFzdGVxdWFsaXR5IGFuZCAoKHBy\nZV9pbnMgYW5kIHByZV9kZWwgYW5kIHBvc3RfaW5zIGFuZCBwb3N0X2RlbCkgb3IK\nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGxlbihsYXN0ZXF1YWxpdHkp\nIDwgc2VsZi5EaWZmX0VkaXRDb3N0IC8gMikgYW5kCiAgICAgICAgICAgICAgICAg\nICAgICAgICAgICAgIChwcmVfaW5zICsgcHJlX2RlbCArIHBvc3RfaW5zICsgcG9z\ndF9kZWwpID09IDMpKToKICAgICAgICAgICMgRHVwbGljYXRlIHJlY29yZC4KICAg\nICAgICAgIGRpZmZzLmluc2VydChlcXVhbGl0aWVzWy0xXSwgKHNlbGYuRElGRl9E\nRUxFVEUsIGxhc3RlcXVhbGl0eSkpCiAgICAgICAgICAjIENoYW5nZSBzZWNvbmQg\nY29weSB0byBpbnNlcnQuCiAgICAgICAgICBkaWZmc1tlcXVhbGl0aWVzWy0xXSAr\nIDFdID0gKHNlbGYuRElGRl9JTlNFUlQsCiAgICAgICAgICAgICAgZGlmZnNbZXF1\nYWxpdGllc1stMV0gKyAxXVsxXSkKICAgICAgICAgIGVxdWFsaXRpZXMucG9wKCkg\nICMgVGhyb3cgYXdheSB0aGUgZXF1YWxpdHkgd2UganVzdCBkZWxldGVkLgogICAg\nICAgICAgbGFzdGVxdWFsaXR5ID0gTm9uZQogICAgICAgICAgaWYgcHJlX2lucyBh\nbmQgcHJlX2RlbDoKICAgICAgICAgICAgIyBObyBjaGFuZ2VzIG1hZGUgd2hpY2gg\nY291bGQgYWZmZWN0IHByZXZpb3VzIGVudHJ5LCBrZWVwIGdvaW5nLgogICAgICAg\nICAgICBwb3N0X2lucyA9IHBvc3RfZGVsID0gVHJ1ZQogICAgICAgICAgICBlcXVh\nbGl0aWVzID0gW10KICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgIGlmIGxlbihl\ncXVhbGl0aWVzKToKICAgICAgICAgICAgICBlcXVhbGl0aWVzLnBvcCgpICAjIFRo\ncm93IGF3YXkgdGhlIHByZXZpb3VzIGVxdWFsaXR5LgogICAgICAgICAgICBpZiBs\nZW4oZXF1YWxpdGllcyk6CiAgICAgICAgICAgICAgcG9pbnRlciA9IGVxdWFsaXRp\nZXNbLTFdCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgcG9pbnRlciA9\nIC0xCiAgICAgICAgICAgIHBvc3RfaW5zID0gcG9zdF9kZWwgPSBGYWxzZQogICAg\nICAgICAgY2hhbmdlcyA9IFRydWUKICAgICAgcG9pbnRlciArPSAxCgogICAgaWYg\nY2hhbmdlczoKICAgICAgc2VsZi5kaWZmX2NsZWFudXBNZXJnZShkaWZmcykKCiAg\nZGVmIGRpZmZfY2xlYW51cE1lcmdlKHNlbGYsIGRpZmZzKToKCiAgICBkaWZmcy5h\ncHBlbmQoKHNlbGYuRElGRl9FUVVBTCwgJycpKSAgIyBBZGQgYSBkdW1teSBlbnRy\neSBhdCB0aGUgZW5kLgogICAgcG9pbnRlciA9IDAKICAgIGNvdW50X2RlbGV0ZSA9\nIDAKICAgIGNvdW50X2luc2VydCA9IDAKICAgIHRleHRfZGVsZXRlID0gJycKICAg\nIHRleHRfaW5zZXJ0ID0gJycKICAgIHdoaWxlIHBvaW50ZXIgPCBsZW4oZGlmZnMp\nOgogICAgICBpZiBkaWZmc1twb2ludGVyXVswXSA9PSBzZWxmLkRJRkZfSU5TRVJU\nOgogICAgICAgIGNvdW50X2luc2VydCArPSAxCiAgICAgICAgdGV4dF9pbnNlcnQg\nKz0gZGlmZnNbcG9pbnRlcl1bMV0KICAgICAgICBwb2ludGVyICs9IDEKICAgICAg\nZWxpZiBkaWZmc1twb2ludGVyXVswXSA9PSBzZWxmLkRJRkZfREVMRVRFOgogICAg\nICAgIGNvdW50X2RlbGV0ZSArPSAxCiAgICAgICAgdGV4dF9kZWxldGUgKz0gZGlm\nZnNbcG9pbnRlcl1bMV0KICAgICAgICBwb2ludGVyICs9IDEKICAgICAgZWxpZiBk\naWZmc1twb2ludGVyXVswXSA9PSBzZWxmLkRJRkZfRVFVQUw6CiAgICAgICAgIyBV\ncG9uIHJlYWNoaW5nIGFuIGVxdWFsaXR5LCBjaGVjayBmb3IgcHJpb3IgcmVkdW5k\nYW5jaWVzLgogICAgICAgIGlmIGNvdW50X2RlbGV0ZSArIGNvdW50X2luc2VydCA+\nIDE6CiAgICAgICAgICBpZiBjb3VudF9kZWxldGUgIT0gMCBhbmQgY291bnRfaW5z\nZXJ0ICE9IDA6CiAgICAgICAgICAgICMgRmFjdG9yIG91dCBhbnkgY29tbW9uIHBy\nZWZpeGllcy4KICAgICAgICAgICAgY29tbW9ubGVuZ3RoID0gc2VsZi5kaWZmX2Nv\nbW1vblByZWZpeCh0ZXh0X2luc2VydCwgdGV4dF9kZWxldGUpCiAgICAgICAgICAg\nIGlmIGNvbW1vbmxlbmd0aCAhPSAwOgogICAgICAgICAgICAgIHggPSBwb2ludGVy\nIC0gY291bnRfZGVsZXRlIC0gY291bnRfaW5zZXJ0IC0gMQogICAgICAgICAgICAg\nIGlmIHggPj0gMCBhbmQgZGlmZnNbeF1bMF0gPT0gc2VsZi5ESUZGX0VRVUFMOgog\nICAgICAgICAgICAgICAgZGlmZnNbeF0gPSAoZGlmZnNbeF1bMF0sIGRpZmZzW3hd\nWzFdICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRfaW5zZXJ0Wzpj\nb21tb25sZW5ndGhdKQogICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAg\nICBkaWZmcy5pbnNlcnQoMCwgKHNlbGYuRElGRl9FUVVBTCwgdGV4dF9pbnNlcnRb\nOmNvbW1vbmxlbmd0aF0pKQogICAgICAgICAgICAgICAgcG9pbnRlciArPSAxCiAg\nICAgICAgICAgICAgdGV4dF9pbnNlcnQgPSB0ZXh0X2luc2VydFtjb21tb25sZW5n\ndG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V0dXJuIGRpZmZzCgogIGRlZiBvbGRfY29udGVudChzZWxmLCBkaWZm\ncyk6CiAgICAgICAgaHRtbCA9IFtdCiAgICAgICAgZm9yIChmbGFnLCBkYXRhKSBp\nbiBkaWZmczoKICAgICAgICAgICAgdGV4dCA9IChkYXRhLnJlcGxhY2UoIiYiLCAi\nJmFtcDsiKQogICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKCI8IiwgIiZsdDsi\nKQogICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKCI+IiwgIiZndDsiKQogICAg\nICAgICAgICAgICAgICAgIC5yZXBsYWNlKCJcbiIsICI8YnI+IikpCgogICAgICAg\nICAgICBpZiBmbGFnID09IHNlbGYuRElGRl9ERUxFVEU6CiAgICAgICAgICAgICAg\nICBodG1sLmFwcGVuZCgiIiI8ZGVsIHN0eWxlPVwiYmFja2dyb3VuZDojZmZlNmU2\nO1wiPiVzPC9kZWw+IiIiICUgdGV4dCkKICAgICAgICAgICAgZWxpZiBmbGFnID09\nIHNlbGYuRElGRl9FUVVBTDoKICAgICAgICAgICAgICAgIGh0bWwuYXBwZW5kKCI8\nc3Bhbj4lczwvc3Bhbj4iICUgdGV4dCkKICAgICAgICByZXR1cm4gIiIuam9pbiho\ndG1sKQoKICBkZWYgbmV3X2NvbnRlbnQoc2VsZiwgZGlmZnMpOgogICAgICAgIGh0\nbWwgPSBbXQogICAgICAgIGZvciAoZmxhZywgZGF0YSkgaW4gZGlmZnM6CiAgICAg\nICAgICAgIHRleHQgPSAoZGF0YS5yZXBsYWNlKCImIiwgIiZhbXA7IikKICAgICAg\nICAgICAgICAgICAgICAucmVwbGFjZSgiPCIsICImbHQ7IikKICAgICAgICAgICAg\nICAgICAgICAucmVwbGFjZSgiPiIsICImZ3Q7IikKICAgICAgICAgICAgICAgICAg\nICAucmVwbGFjZSgiXG4iLCAiPGJyPiIpKQogICAgICAgICAgICBpZiBmbGFnID09\nIHNlbGYuRElGRl9JTlNFUlQ6CiAgICAgICAgICAgICAgICBodG1sLmFwcGVuZCgi\nIiI8aW5zIHN0eWxlPVwiYmFja2dyb3VuZDojZTZmZmU2O1wiPiVzPC9pbnM+IiIi\nICUgdGV4dCkKICAgICAgICAgICAgZWxpZiBmbGFnID09IHNlbGYuRElGRl9FUVVB\nTDoKICAgICAgICAgICAgICAgIGh0bWwuYXBwZW5kKCI8c3Bhbj4lczwvc3Bhbj4i\nICUgdGV4dCkKICAgICAgICByZXR1cm4gIiIuam9pbihodG1sKQoKCm9sZCA9ICIi\nIntGaWx0ZXJQcmlvcjFQcmV2aW91c1RleHR9IiIiCm5ldyA9ICIiIntGaWx0ZXJJ\nbnB1dFRleHR9IiIiCgoKaWYgb2xkID09IG5ldzoKCXN5cy5leGl0KDk4KQoKZGEg\nPSBkaWZmX2FuYWx5c2lzKCkKcmVzdWx0ID0gZGEuZGlmZl9tYWluKG9sZCwgbmV3\nKQoKaWYgaHVtYW5fZGlmZjoKCWRhLmRpZmZfY2xlYW51cFNlbWFudGljKHJlc3Vs\ndCkKZWxzZToKCWRhLmRpZmZfY2xlYW51cEVmZmljaWVuY3kocmVzdWx0KQoKb2xk\nX2RpZmZzID0gZGEub2xkX2NvbnRlbnQocmVzdWx0KSAKbmV3X2RpZmZzID0gZGEu\nbmV3X2NvbnRlbnQocmVzdWx0KQoKcHJpbnQgIjxoMj5OZXcgUmVjb3JkOjwvaDI+\nIixuZXdfZGlmZnMsIjxicj48YnI+PGgyPk9sZCBSZWNvcmQ6PC9oMj4iLG9sZF9k\naWZmcwoK",
    "ScriptResults" : {
      "0" : "(Success; automatically detect change state)",
      "99" : "(Success; input text changed from previous check)",
      "98" : "(Success; input text unchanged from previous check)"
    }
  },
  "Identifier" : "Script Rich Text Rep of Changes",
  "IsGroup" : false,
  "LastSaveName" : "Rich Text Representation of Changes",
  "GroupIdentifier" : "",
  "AutoPauseSettings" : [

  ],
  "PluginIdentifier" : "Script",
  "useTestControls" : true,
  "NextAutoResumeDate" : "4001-01-01T00:00:00Z",
  "Mode" : 0,
  "timeoutInterval" : {
    "usingRange" : 0,
    "secondAmount" : 3,
    "representedClassName" : "DejalInterval",
    "firstAmount" : 3,
    "units" : 1,
    "version" : 1
  },
  "LastSaveDate" : "2019-11-07T03:35:21Z",
  "lookForChanges" : true,
  "NextAutoPauseDate" : "4001-01-01T00:00:00Z",
  "forUnchanged" : true,
  "DeviceIdentifier" : "E9413342-9FF0-4B01-BE45-639894573DDE"
}