https://github.com/jgwoolley/nf2t-cli
A Java CLI for parsing Apache NiFi FlowFiles.
https://github.com/jgwoolley/nf2t-cli
flowfile flowfile-format flowfiles nifi tar targz zip
Last synced: 7 months ago
JSON representation
A Java CLI for parsing Apache NiFi FlowFiles.
- Host: GitHub
- URL: https://github.com/jgwoolley/nf2t-cli
- Owner: jgwoolley
- License: apache-2.0
- Created: 2024-12-29T03:46:36.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-16T17:43:49.000Z (7 months ago)
- Last Synced: 2025-03-16T18:58:08.605Z (7 months ago)
- Topics: flowfile, flowfile-format, flowfiles, nifi, tar, targz, zip
- Language: Java
- Homepage: https://jgwoolley.github.io/nf2t-cli/
- Size: 377 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.asciidoc
- License: LICENSE
Awesome Lists containing this project
README
= nf2t-cli
:url-repo: https://github.com/jgwoolley/nf2t-cli
:description: A Java CLI for parsing Apache NiFi FlowFiles.
:favicon: ./favicon.svg== Description
A Java CLI for parsing Apache NiFi FlowFileStreams. One or more FlowFiles can be serialized into a FlowFileStream, in one of three formats.
* link:https://www.nf2t.net/[Web Gui Version]
ifdef::env-github[]
* link:https://jgwoolley.github.io/nf2t-cli/nf2t-cli/man/[Usage Guide].
endif::[]
ifndef::env-github[]
* link:./man/index.html[Usage Guide].
endif::[]
* link:https://github.com/jgwoolley/nf2t-cli[Source Code].
* link:https://jgwoolley.github.io/nf2t-cli/[Documentation].
ifdef::env-github[]
* link:https://jgwoolley.github.io/nf2t-cli/nf2t-cli/javadoc/[Javadocs].
endif::[]
ifndef::env-github[]
* link:./javadocs/index.html[Javadocs].
endif::[]
ifndef::env-github[]
* link:https://central.sonatype.com/artifact/com.yelloowstone.nf2t/nf2t-cli[Maven Central Repository].
* link:./maven.zip[Artifacts to Publish to Maven Central (Currently Lack GPG Signing)].
endif::[]ifndef::env-github[]
== Artifact Information
|===
|Maven GroupId|link:https://central.sonatype.com/artifact/{mavenGroupId}/{mavenArtifactId}[{mavenGroupId}]
|Maven ArtifactId|link:https://central.sonatype.com/artifact/{mavenGroupId}/{mavenArtifactId}[{mavenArtifactId}]
|Maven Version|link:https://central.sonatype.com/artifact/{mavenGroupId}/{mavenArtifactId}[{mavenVersion}]
|Git Hash|link:https://github.com/jgwoolley/nf2t-cli/commit/{gitHash}[{gitHash}]
|===
endif::[]== Background
While the Apache Foundation has its own Unpackager (link:https://github.com/apache/nifi/blob/main/nifi-commons/nifi-flowfile-packager/src/main/java/org/apache/nifi/util/Unpackage.java[nifi-flowfile-packager]). It lacks a packager, and dumps all attributes into their own text files which is a little messy for large projects. This CLI dumps all FlowFile Attributes to the STDOUT (Standard Output), and thus can easily be redirected to a file.
I've developed several versions of this project over the years, and created a WebGUI based version: link:https://www.nf2t.net/[].
== Technologies Used
* link:https://picocli.info/[Picocli]: Picocli is a one-file framework for creating Java command line applications with almost zero code.
* link:https://asciidoctor.org/[Asciidoctor]: A fast text processor & publishing toolchain for converting AsciiDoc to HTML5, DocBook & more.== How to Build
* Run the link:./update.sh[update.sh] script to update the versions of the project.
* Run the link:./build.sh[build.sh] to build the project and get the *.maven.zip file to upload to Maven Central Repository.== Example Scripts
* link:./download_jar.sh[download_jar.sh]: Download the JAR from MAVEN
* link:./test.sh[test.sh]: After running the build script, will test the executable jar.== TODO
* Add SLF4J Logging
== nf2t-cli
* In the link:test.sh[] example the FlowFile path is "./quick_test//2/data.flowfilev3" which the /2/data.flowfilev3 seems to be refering to the path in the ZIP file.
* Can pass variables with asciidoc link:https://stackoverflow.com/questions/63622953/asciidoctor-activate-substitution-in-cli-attributes[]
* Remove concept of version as provided by CLI arg, or make version and prefix additional options for configuring how FlowFileStream(s) are parsed.
* Add a seperate file metadata section w/ uuids, and connect parents w/ uuids, and flowfiles to uuids
* Figure out why progress bars are still appearing even though i added the argument to mvn clean install.
* Get Favicons into manpages.
* Review the standard implementation, make sure this implementation is as similiar as possible: link:https://github.com/apache/nifi/blob/main/nifi-commons/nifi-flowfile-packager/src/main/java/org/apache/nifi/util/Unpackage.java[].
* Always say unpackage before package reflecting its primacy.== setup-projecet
** Add ability to specify a name and description of main documentation index?
** Move to another seperate project?
* https://picocli.info/autocomplete.html
** java -cp nf2t-cli-0.0.9-SNAPSHOT.jar picocli.AutoComplete -n nf2t com.yelloowstone.nf2t.cli.App
* Add JavaDocs Comments to page to stop "warning: no comment" errors.
* Add link:https://picocli.info/man/picocli.AutoComplete.html[AutoComplete].
* link:https://docs.asciidoctor.org/asciidoc/latest/docinfo/#head[].== nf2t-javafx
* link:https://gist.github.com/timbuethe/7becdc4556225e7c5b7b[]