Editing Zz.unkrig.de

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 17: Line 17:
Finds files in directory trees and entries in archive files by various criteria; widely compatible with the UNIX™ FIND command line utility.
Finds files in directory trees and entries in archive files by various criteria; widely compatible with the UNIX™ FIND command line utility.


Read the [http://zz.unkrig.de/maindoc/zz-find/Main.main(String%5b%5d).html command line tool documentation] (or the [http://zz.unkrig.de/maindoc/zz-find/Main.main(String%5b%5d).txt plain text version]).
Read the [http://zz.unkrig.de/maindoc/zz-find/Main.main(String%5b%5d).html command line tool documentation].


Read the [http://zz.unkrig.de/antdoc/index.html?tasks/zzfind.html ANT task documentation].
Read the [http://zz.unkrig.de/antdoc/index.html?tasks/zzfind.html ANT task documentation].
Line 127: Line 127:
=== Java Library ===
=== Java Library ===


The ZZ tools also have a public Java API that can be used from by any Java application. You can either download and use this JAR file, or, if you're using MAVEN, put in your "pom.xml" file:
The runnable JAR files (see above) can also be used from within Java; here is the API documentation:
 
<dependency>
    <groupId>de.unkrig.zz</groupId>
    <artifactId>zz-diff</artifactId> <!-- Or zz-find, zz-grep, zz-pack, zz-patch. -->
    <version>x.y.z</version>
</dependency>
 
Here is the API documentation:


* [http://zz.unkrig.de/javadoc/zz-diff/ zz-diff API documentation]
* [http://zz.unkrig.de/javadoc/zz-diff/ zz-diff API documentation]
Line 152: Line 144:
     <input type="hidden" name="c" value="sources" />
     <input type="hidden" name="c" value="sources" />


     Source code is available on <a href="https://github.com/aunkrig/zz">GITHUB</a>,
     Source code is available in <a href="https://svn.code.sf.net/p/loggifier/code/de.unkrig.zz/trunk/">SOURCEFORGE SVN</a>,
     and also through MAVEN:
     and also through MAVEN:
     <select name="a">
     <select name="a">
Line 173: Line 165:
== Change Log ==
== Change Log ==


; Changes in version 1.3.11-SNAPSHOT (not yet released):
; Changes in version 1.3.2-SNAPSHOT (not yet released):
:* -
:* -
; Changes in version 1.3.10, 2022-12-29:
:* Changed handling of "-" to ResourceProcessings.STDIN_URL.
:* ZZDIFF can now handle "-" (stdin) as one of its two inputs.
:* ZZPATCH: --substitute: Removed the concept of the "replacement mode", because the extended replacement syntax just implements the "literal" and "expression" replacement modes.
:* ZZPACK: Added the "--rename" feature.
:* ZZPATCH: Substitution: Replacement mode "REPLACEMENT_STRING" now supports "ext syntax", i.e. "${...}" embedded expressions.
:* ZZPATCH: ExitException message is now "Printers.info()"ed instead of "Printers.verbose()"ed.
:* ZZFIND: Greatly simplified the computation of the expression variables.
:* ZZFIND: Fixed an exception when finding in STDIN: STDIN does not have the properties "readable", "writable" and "executable".
:* ZZFIND: Class file version can now be accessed by "cf.javaVersion".
:* ZZFIND: MAINDOC: Documented the "archiveEntry" variable.
:* ZZGREP: Moved "Grep.lineCounter()" to "ConsumerUtil".
:* ZZGREP: Eliminated the 65536-characters-per-line limit -- finds and counts matches now also in very long lines.
:* ZZPATCH: Added the "--assert-count" condition for updates/substitution replacements/patch hunks/removals/renamings/additions.
:* ZZFIND: Learned that the various ZIP archive libraries return random values for "ZipEntry.getMethod()" and "ZipEntry.getCrc()", thus made the test cases tolerant against these.
:* ZZFIND: Don't print a stack trace on predicate parse errors; only print the error message.
:* ZZPATCH: Added command line options for archive decryption: --7z-input-file-password --zip-input-file-password --password
:* ZZPATCH: Added command line options for archive compression and encryption: --zip-output-entry-compression-level --zip-output-file-password --zip-output-file-encryption-method
:* ZZFIND: Added short command line option for archive decryption: --password
:* ZZFIND: Added the "-version" command line option.
:* ZZGREP: Added command line options "--input-encoding" and "--output-encoding". (Previously, the output encoding was not configurable.)
:* ZZGREP: Fixed the printing of "--" separator lines between context-grep chunks.
:* ZZFIND: MAINDOC: Documented priority of operators.
:* ZZFIND: CatAction: Entries that have no input stream (e.g. directories or directory archive entries) are silently ignored, because that is practical: Otherwise, you'd always have to put "-type normal*" right before the "-cat" action.
:* ZZFIND: -copy action: Now ignore entries that have no input stream (e.g. directories or directory archive entries), because that is practical: Otherwise, you'd always have to put "-type normal*" right before the "-copy" action.
:* ZZFIND: -copy action: Attempt to restore each file's "last modification date", too.
:* ZZPATCH: Unified DIFF format: Some DIFF tools (namely GNU diffutils 3.5) put a TAB character (instead of a SPACE) between the file name and the date.
:* ZZFIND: Added "--toFile" option to "-disassemble".
:* ZZFIND: Added new variable "archiveEntry".
:* ZZFIND: Added action "-java-class-file".
:* ZZFIND: Added expression variable "compressionMethod" (for archive entries).
; Changes in version 1.3.9, 2020-11-06:
:* Updated jdisasm to 1.0.6.
:* Updated de.unkrig.commons to 1.2.15.
:* Removed the generation of the "...-antlib.jar" file, because "...-jar-with-dependencies.jar" can be used as an ANTLIB as well.
:* Fixed the file type in the output of -ls.
:* Added expression variables "readable", "writable" and "executable".
:* Adapted to an incompatible API change in "commons-file" (all content processing was augmented with an optional "lastModifiedDate" parameter).
:* Fixed an NPE that occurred with 7Z archive entries that have NO modification date set.
:* ZZFIND now compiles with JDK 1.8 (before it was 1.6).
:* Major refactoring: Replaced "Mappings properties" with "Map<String, Function<Object, Object>> properties.
:* Implemented the new expression variables "_map", "_keys" and "_values".
:* Context diff: The "hunk separator line" ("--") was missing.
:* Actions that read the contents of a document (-cat, -copy, -disassemble, -digest, -checksum) didn't for "normal-file" documents.
:* "--nowarn", "--quiet", "--verbose" and "--debug" now not only configure the "Printers", but also "SimpleLogging".
:* Added the "--replacementMode" option which allows for more complex replacements than the java.util.regex.Matcher can offer
; Changes in version 1.3.8, 2019-10-09:
:* zzgrep: Implemented "-e".
:* zzgrep: Implemented "--byte-offset", "--with-path", "--no-path", "--label", "--line-number", "--after-context", "--before-context" and "--context".
:* <zzpatch> Ant task: "<substitution><regex>..." and "...<replacement>...": Property "replacement" was missing for "addText()".
:* Major refactoring of "zz.Find" - removed tons of copied code.
:* zzfind: Improved handling of corrupt archives and compressed contents.
; Changes in version 1.3.7, 2019-08-05:
:* In addition to "...-jar-with-dependencies.jar", generate a "...-antlib.jar" file, where the ANT classes are NOT included.
:* The "-copy" action now supports a "--append" (alias "-a") modifier.
:* Now using "ExpressionEvaluator.parseExt()".
:* Added "--printf" command line action.
:* Fixed the "line equivalence" and the "ignore" feature; both were accidentially broken with revision 6980 (affects only release 1.3.5).
:* The "zz-diff" command line tool now also accepts URLs on its command line.
:* "--verbose" had no effect; now it prints the names of files and archive entries that are searched.
; Changes in Version 1.3.6, 2018-07-24:
:* Added a test case for "zzpatch --substitute --iff".
:* Substitution conditions now support a new variable, "occurrence".
:* Added a "<condition>" subelement on the "<substitution>" element. This is useful, e.g., to replace only the FIRST match.
:* For conformance with GREP, exit with status 2 (not 1) on errors.
:* <zzfind>: Added the "<prune />" and "<delete />" subelements.
:* zzfind: Renamed option "--depth" to "--descendants-first" (and left the original as an alias).
:* <zzfind>: Renamed the depth="..." attribute to descendantsFirst="...".
:* Added the "-prune" and "-delete" actions.
:* Added "&&" and "-and" as aliases for "-a".
:* Added "||" and "-or" as aliases for "-o".
:* Added options "da-verbose", "da-source-directory" and "da-symbolic-labels".
:* Continue with next archive entry on IOException.
:* ZZGREP: When run with a list file-or-dirs, only every second file-or-dir was searched.
; Changes in version 1.3.4, 2017-02-03:
:* Added a workaround for: MS WINDOWS 7: Read-protected directory produces: isDirectory() => true canRead()    => true list()        => null listFiles()  => null (Caused NPEs.)
:* ZZDIFF: Bug fixed: Document DIFF was always UNIFIED, regardless of the document diff mode setting.
:* Change version of de.unkrig.commons from "1.2.6-SNAPSHOT" to "1.2.7-SNAPSHOT" (because THAT is the correct post-1.2.6 version).
:* Renamed "namePredicate" to "pathPredicate".
:* Replaced the "name=..." attribute with "path=...", and marked the old attribute as @deprecated.
:* The "pathPredicate" was missing from content processors.
:* Generate ANTDOC only for the "zz-all" module, not for "zz-(diff|find|grep|pack|patch)" individually. Saves on build time, and reduces redundant documentation.
; Changes in version 1.3.3, 2016-11-28:
:* Removed unnecessary dependency on "jdisasm".
:* Fixed the classpath for zz-all antdoc.
:* Added the "--no-recurse-subdirctories" command line option.
:* Extracted the "DOcumentDiff" class from the "Diff" class.
:* Added task attribute "recurseSubdirectories=false".
:* Added the "Diff.diff(path1, path2, stream1, stream2)" method.
; Changes in version 1.3.2, 2016-11-25:
:* Added test cases for ZZDIFF.
:* Added "Diff.execute(String path1, String path2, ...)" to allow for custom "path1" and "path2" strings when reporting differences.
:* Improved many "DiffException"s' messages.
:* Slightly clarified the wording of the license: Replaced "author" with "copyright holder and its contributors".
:* Include project name and version in APIDOC's "-header" and "-footer".


; Changes in version 1.3.1, 2016-11-07:
; Changes in version 1.3.1, 2016-11-07:
Please note that all contributions to unkrig.de may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Unkrig.de:Copyrights for details). Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)