diff --git a/.gitignore b/.gitignore index bc42122..235b508 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,6 @@ op # Coverage coverage.txt + +# Misc +.DS_Store diff --git a/README.md b/README.md index 515278a..935c4ab 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,15 @@ Omniparser is a native Golang ETL parser that ingests input data of various form XML, EDI/X12/EDIFACT, JSON**, and custom formats) in streaming fashion and transforms data into desired JSON output based on a schema written in JSON. -**Please kindly consider sponsoring the project to fund future development and issue resolutions**: https://github.com/sponsors/jf-tech - Min Golang Version: 1.14 +## Licenses and Sponsorship +Omniparser is publicly available under [MIT License](./LICENSE). +[Individual and corporate sponsorships](https://github.com/sponsors/jf-tech/) are welcome and gratefully +appreciated, and will be listed in the [SPONSORS](./sponsors/SPONSORS.md) page. +[Company-level sponsors](https://github.com/sponsors/jf-tech/) get additional benefits and supports +granted in the [COMPANY LICENSE](./sponsors/COMPANY_LICENSE.md). + ## Documentation Docs: @@ -46,12 +51,12 @@ Examples: In the example folders above you will find pairs of input files and their schema files. Then in the `.snapshots` sub directory, you'll find their corresponding output files. -## Online Playground +## Online Playground (not functioning) -Use https://omniparser.herokuapp.com/ (may need to wait for a few seconds for heroku instance to wake up) -for trying out schemas and inputs, yours or existing samples, to see how ingestion and transform work. +~~Use [The Playground](https://omniparser-prod-omniparser-qd0sj4.mo2.mogenius.io/) (may need to wait for a few seconds for instance to wake up) +for trying out schemas and inputs, yours or existing samples, to see how ingestion and transform work.~~ -![](./cli/cmd/web/playground-demo.gif) +As for now (2023/03/14), all of our previous free docker hosting solutions went away and we haven't found another one yet. For now please clone the repo and use `./cli.sh` as described in the [Getting Started](./doc/gettingstarted.md) page. ## Why - No good ETL transform/parser library exists in Golang. @@ -83,8 +88,8 @@ back-compatibility, it is just removed from all public docs and samples). - `'keep_leading_trailing_space'` -> `'no_trim'` - Changed how we handle custom functions: previously we always use strings as in param type as well as result param type. Not anymore, all types are supported for custom function in and out params. - - Changed the way how we package custom functions for extensions: previously we collect custom functions from all - extensions and then pass all of them to the extension that is used; This feels weird, now changed to only the custom + - Changed the way we package custom functions for extensions: previously we collected custom functions from all + extensions and then passed all of them to the extension that is used; this feels weird, now only the custom functions included in a particular extension are used in that extension. - Deprecated/removed most of the custom functions in favor of using 'javascript'. - A number of package renaming. diff --git a/extensions/omniv21/samples/edi/1_canadapost_edi_214.schema.json b/extensions/omniv21/samples/edi/1_canadapost_edi_214.schema.json index 820f457..7f4b592 100644 --- a/extensions/omniv21/samples/edi/1_canadapost_edi_214.schema.json +++ b/extensions/omniv21/samples/edi/1_canadapost_edi_214.schema.json @@ -12,6 +12,7 @@ "child_segments": [ { "name": "GS", + "_comment": "functional group", "child_segments": [ { "name": "scanInfo", "type": "segment_group", "min": 0, "max": -1, "is_target": true, @@ -26,7 +27,7 @@ { "name": "N4", "elements": [ - { "name": "cityName", "index": 1 }, + { "name": "cityName", "index": 1, "_comment": "E19" }, { "name": "provinceCode", "index": 2 }, { "name": "postalCode", "index": 3 }, { "name": "countryCode", "index": 4 } diff --git a/extensions/omniv21/samples/edi/2_ups_edi_210.schema.json b/extensions/omniv21/samples/edi/2_ups_edi_210.schema.json index 11e8c7d..e6ce9b3 100644 --- a/extensions/omniv21/samples/edi/2_ups_edi_210.schema.json +++ b/extensions/omniv21/samples/edi/2_ups_edi_210.schema.json @@ -14,6 +14,7 @@ "child_segments": [ { "name": "GS", + "_comment": "functional group", "child_segments": [ { "name": "invoiceInfo", "type": "segment_group", "min": 0, "max": -1, "is_target": true, @@ -74,7 +75,7 @@ "elements": [ { "name": "refIdQualifier_N901", "index": 1 }, { "name": "refId_N902", "index": 2, "default": "" }, - { "name": "date", "index": 4, "default": "" }, + { "name": "date", "index": 4, "default": "", "_comment": "YYYYMMDD"}, { "name": "product_code_C04004", "index": 7, "component_index": 4, "default": "" } ] }, diff --git a/extensions/omniv21/validation/ediFileDeclaration.go b/extensions/omniv21/validation/ediFileDeclaration.go index bf65a8c..c93f8f3 100644 --- a/extensions/omniv21/validation/ediFileDeclaration.go +++ b/extensions/omniv21/validation/ediFileDeclaration.go @@ -49,7 +49,8 @@ const ( "index": { "type": "integer", "minimum": 1 }, "component_index": { "type": "integer", "minimum": 1 }, "empty_if_missing": { "type": "boolean","$comment": "deprecated, use 'default'" }, - "default": { "type": "string" } + "default": { "type": "string" }, + "_comment": { "$ref": "#/definitions/value_comment" } }, "required": [ "name", "index" ], "additionalProperties": false @@ -60,11 +61,13 @@ const ( "items": { "$ref": "#/definitions/segment_declaration_type" } - } + }, + "_comment": { "$ref": "#/definitions/value_comment" } }, "required": [ "name" ], "additionalProperties": false - } + }, + "value_comment": { "type": "string" } } } ` diff --git a/extensions/omniv21/validation/ediFileDeclaration.json b/extensions/omniv21/validation/ediFileDeclaration.json index e5d4db4..2a30335 100644 --- a/extensions/omniv21/validation/ediFileDeclaration.json +++ b/extensions/omniv21/validation/ediFileDeclaration.json @@ -42,7 +42,8 @@ "index": { "type": "integer", "minimum": 1 }, "component_index": { "type": "integer", "minimum": 1 }, "empty_if_missing": { "type": "boolean","$comment": "deprecated, use 'default'" }, - "default": { "type": "string" } + "default": { "type": "string" }, + "_comment": { "$ref": "#/definitions/value_comment" } }, "required": [ "name", "index" ], "additionalProperties": false @@ -53,10 +54,12 @@ "items": { "$ref": "#/definitions/segment_declaration_type" } - } + }, + "_comment": { "$ref": "#/definitions/value_comment" } }, "required": [ "name" ], "additionalProperties": false - } + }, + "value_comment": { "type": "string" } } } \ No newline at end of file diff --git a/sponsors/COMPANY_LICENSE.md b/sponsors/COMPANY_LICENSE.md new file mode 100644 index 0000000..430b4d5 --- /dev/null +++ b/sponsors/COMPANY_LICENSE.md @@ -0,0 +1,23 @@ +# Company License + +Copyright (c) 2023 - present [JF Technology](https://github.com/jf-tech) + +## Licensing Information + +In addition to the terms and conditions mentioned in the [main license](../LICENSE), your +company is entitled to the following when company level sponsorship is active: + +| Item | - | +| ---------------------------------- | --- | +| Team Size | **Unlimited** | +| Number of Apps/Services Using This Code | **Unlimited** | +| Feature Updates and Bug Fixes: | **Yes** | +| Prioritized Feature Request Discussion and Response | **Yes** | +| Prioritized [Support](mailto:jf.tech.llc@gmail.com) or [Issues](https://github.com/jf-tech/omniparser/issues) Response | **Yes** | +| Included in [Sponsors Page](./SPONSORS.md) | **Yes** | +| --- | --- | +| Remove copyright mentions/license from source code | NO | +| Production deployment and troubleshooting assistance | NO | + +--- +For more information regarding licensing, please contact [support](mailto:jf.tech.llc@gmail.com). diff --git a/sponsors/SPONSORS.md b/sponsors/SPONSORS.md new file mode 100644 index 0000000..caf74cb --- /dev/null +++ b/sponsors/SPONSORS.md @@ -0,0 +1,11 @@ +# Sponsors & Backers + +> Omniparser is an MIT-licensed open source project with its ongoing development made possible entirely by the support of the awesome sponsors and backers listed in this file. If you'd like to join them, please consider [ sponsor its development](https://github.com/sponsors/jf-tech). + +### Corporate Sponsors + +- Entos LLC + +- ![HealthSherpa](resources/HealthSherpa.png) + +### Generous Individual Backers diff --git a/sponsors/resources/HealthSherpa.png b/sponsors/resources/HealthSherpa.png new file mode 100644 index 0000000..f172f11 Binary files /dev/null and b/sponsors/resources/HealthSherpa.png differ diff --git a/sponsors/resources/template.jpg b/sponsors/resources/template.jpg new file mode 100644 index 0000000..a59e6a1 Binary files /dev/null and b/sponsors/resources/template.jpg differ