oq

A performant, and portable jq wrapper to facilitate the consumption and output of formats other than JSON; using jq filters to transform the data.

MIT License

Downloads
14
Stars
190
Committers
8

Bot releases are hidden (Show)

oq - v1.3.5 Latest Release

Published by Blacksmoke16 7 months ago

Changes

Fixes

New Contributors

oq - Handle reading null JSON values when creating CDATA elements

Published by Blacksmoke16 about 2 years ago

Fixed

oq - Fix Typos in docs

Published by Blacksmoke16 about 2 years ago

Changes

Fixes

oq - Fix space after `-L` option

Published by Blacksmoke16 almost 3 years ago

Fixes

oq - Fix null input

Published by Blacksmoke16 almost 3 years ago

Fixes

oq - XML Improvements

Published by Blacksmoke16 about 3 years ago

Additions

  • Adds install instructions for Arch linux (#87)
  • Add --xmlns option that will tell oq to parse namespaces (#89)
    • NOTE: This will become the default in oq 2.x.
  • Add --xml-namespace-alias option to allow normalizing namespaced element names (#89)
    • E.g. --xml-namespace-alias myKey=https://namespace.org would re-write the prefix of any element within the https://namespace.org namespace to be myKey
    • NOTE: The --xmlns option is required to use this
  • Add --xml-force-array elementName option that will force the provided element to be parsed as an array even if it only has one item (#93)

Changes

  • Various build improvements (#91, #95)

Fixes

  • Correctly treat elements with namespace prefixes as unique elements (#88, #90)
  • Handle empty jq input on serialization (#83)

Deprecations

  • Deprecate Processor#tab and Processor#xml_prolog methods, use Processor#tab? and Processor#xml_prolog? instead
oq - Allow for file/directory (json)arg references

Published by Blacksmoke16 over 3 years ago

Fixes

  • Allow the "name" portion of the --arg/--jsonarg option to match a file/directory within the current directory
oq - Library support + SimpleYAML format + Better multi non JSON file input

Published by Blacksmoke16 over 3 years ago

Dependency Upgrades

Additions

  • Adds the SimpleYAML format
    • Is the same as the YAML format, but doesn't support aliases and anchors; allowing for the input data to be streamed. Useful for large "simple" inputs

Changes

  • Convert input files individually to JSON if more than 1 is provided and the input format is not JSON
    • Better simulates jq behavior, especially with the --slurp option
  • Made some updates to OQ::Processor to allow supplying custom input arguments and/or IOs.
    • Allows oq to be used within an existing Crystal project in addition to as a binary

Fixes

  • Allow oq snap to access home and USB drives
  • Build oq snaps with the --release flag
  • Various doc updates/improvements
oq - Update specs for new libyaml version

Published by Blacksmoke16 over 4 years ago

Fixes

  • Makes the YAML serialization specs less strict
    • Removes need to do version checking and should make them more robust going forward
oq - Crystal 0.35.0 Support

Published by Blacksmoke16 over 4 years ago

Dependency Upgrades

Fixes

  • Fix now invalid variable name
    • in is now a reserved variable name
  • Fix format list within help info
    • Now properly lists the formats Format of the input data. Supported formats: json, yaml, xml versus Format of the input data. Supported formats: OQ::Format

Changes

  • Some updates related to 0.35.0
    • Use exhaustive case for OQ::Format.converter method
    • Remove --link-flags option when building as libxml2 is now properly linked
oq - `ARGV` parsing refactor

Published by Blacksmoke16 over 4 years ago

Changes

  • ARGV parsing refactor #58
    • Better supports files and multiple arguments
oq - Better handle empty JSON array to XML

Published by Blacksmoke16 over 4 years ago

Bug Fixes

  • Dont emit anything for empty JSON arrays #56
oq - Release 1.0.2

Published by Blacksmoke16 over 4 years ago

Bug Fixes

  • Better handle some cases #55
    • Correctly sets JSON value content when XML content is blank
    • Sets mixed content #text value if there is a single text node child

Changes

  • Support wrapping XML value in CDATA #54
    • When converting to XML, JSON keys prefixed with ! will have the value wrapped in <![CDATA[]]. See the specs for an example.
  • Switch CI to GH actions #47
    • Related: #48, #49, #50, #51, #52
oq - Fix jq argument passing & add docs on using oq with Docker

Published by Blacksmoke16 over 4 years ago

Bug Fixes

  • Remove unneeded escape sequences (#45)

Changes

  • Add support for additional jq arguments (#43)
  • Update readme to include usage instructions for Docker (#44)
oq - Release 1.0.0

Published by Blacksmoke16 almost 5 years ago

Bug Fixes

  • Fix output getting cutoff on MacOS (#29)

Changes

  • Add support for XML as an input format (#37)
  • Fix typo in readme (#40)
oq - Some bug fixes

Published by Blacksmoke16 about 5 years ago

Bug Fixes

  • Return the correct error code on jq process failures (#25)
  • Check libyaml version to deflake YAML specs (#24)

Changes

  • Updated MacOS install instructions (#28)
  • Migrate json.kind to use enum syntax as it is now deprecated (#30)
oq - IO Streaming + CLI improvements

Published by Blacksmoke16 about 5 years ago

Bug Fixes

  • Fix the -h and --help options on the oq binary (#15)
  • Better define how JSON arrays are translated into XML (#17)
  • Correctly null values in XML (#8)

New Features

  • Ability to omit the XML prolog (#14)
  • Add a -V/--version to output the current jq and oq versions
  • Input/Output for all formats (except input YAML due to anchors/aliases, see #20) is now streamed directly to/from jq.
    • Allows oq to simply act as a "proxy" and not have to load the data into memory.
    • Big thanks to @asterite for the initial gist that made this possible.
oq - Optimize Input/Output

Published by Blacksmoke16 over 5 years ago

Optimizes IO when the input or output format is JSON. Allows oq to act as a simple proxy to jq when no conversion is needed.

oq - Initial Release

Published by Blacksmoke16 over 5 years ago

Initial release of oq.

Package Rankings
Top 15.9% on Alpine-v3.17
Top 33.77% on Formulae.brew.sh
Top 11.77% on Alpine-v3.14
Top 13.37% on Alpine-v3.15
Top 10.7% on Alpine-v3.12
Top 11.05% on Alpine-v3.13
Top 14.43% on Alpine-v3.16
Top 14.29% on Alpine-edge
Top 8.17% on Proxy.golang.org
Top 10.15% on Alpine-v3.18