Commit Graph

57 Commits

Author SHA1 Message Date
ryenus
d30941b575
Detect input format based on file name extension (#1582)
* detect inputFormat from filename

* refactor and extract func InputFormatFromFilename

* detect inputFormat only when file is provided

* add test for automatic input format detection
2023-03-09 10:17:19 +11:00
Mike Farah
83c5e1bc83 Include blank new lines in leading header preprocessing #1462 2022-12-08 13:33:06 +11:00
Mike Farah
762f46ed54 include yaml directives #1424 2022-11-14 17:22:13 +11:00
Mike Farah
88ce6ffcbe Hotfix: actually update the default xml attribute prefix #1428 2022-11-13 11:13:34 +11:00
Mike Farah
1d35134310 Unwrap scalar now works for JSON encoding when explicitly set #1409 2022-11-10 19:21:18 +11:00
Mike Farah
880397d549
Refactored decoder responsibilities (#1402)
- improved comment handling
- yaml decoder now responsible for leading content work around
2022-10-28 14:16:46 +11:00
Mike Farah
6d6b693fb3
Added XML processing instructions and directive support (#1396) 2022-10-24 10:09:42 +11:00
Mike Farah
33ec66cfdd Fixed handling of UTF8 encoded CSVs #1373 2022-10-08 13:12:50 +11:00
Mike Farah
a4b60039ca Added examples of header-preprocess needing to be turned off 2022-09-30 09:36:38 +10:00
Mike Farah
c8815f5ab9
Csv decoder (#1290)
* WIP: adding CSV decoder

* Adding CSV decoder

* Added CSV roundtrip

* Fixing from review
2022-08-01 10:28:34 +10:00
Mike Farah
06d2aaad80 Adding acceptance test for #1257, fixed panic 2022-06-25 12:15:28 +10:00
Mike Farah
dfd396b480 When split expression includes an extension, dont add .yml automatically 2022-06-23 14:31:09 +10:00
Mike Farah
2bc7dcfcca Handle xml namespaces by default 2022-06-15 17:12:57 -07:00
Mike Farah
6bce23d9c2 Improved handling of trailing document comments 2022-05-25 10:54:03 +10:00
Mike Farah
55c5497fab Can specify a split expression file #1194 2022-04-29 11:08:41 +10:00
Mike Farah
70ad7a35a8 Don't automatically read stdin when the null input flag is used 2022-04-27 09:24:25 +10:00
Mike Farah
3ad5355777 Fixes bug when using inplace with no expression and multiple files #1193 2022-04-27 09:08:50 +10:00
Mike Farah
bbeae229ca Disable strict XML parsing by default #1155 2022-03-28 14:05:10 +11:00
Mike Farah
33a29817d7 Can load expressions from file #1120 2022-03-01 11:50:09 +11:00
Mike Farah
304fc462a4 No longer auto-read from STDIN if there are files given (#1115) 2022-02-20 13:15:21 +11:00
whi-tw
4b2b47af48
Fix zsh completion (#1108)
4ec533b introduced a bug which causes the 'hidden' cli parameter
`__complete` to be ignored.

Add a check for this parameter, so that it can pass to `cobra`

Signed-off-by: Tom Whitwell <tom@whi.tw>
2022-02-14 08:03:24 +11:00
Mike Farah
a9c3617b4f
Decoder Properties (#1099)
* Decoder Properties

* Added properties round trip test

* Fixed property decode for github actions

* Refactored XML test to use common functions

* Switched formatScenario parameter order for more readablity
2022-02-10 12:02:53 +11:00
Mike Farah
26356ff4be Added github action fix for parsing xml, updated linter 2022-02-07 11:55:55 +11:00
Mike Farah
06e944dcb6 Added github action fix for parsing xml 2022-02-07 11:26:48 +11:00
Mike Farah
2891c6948d Added expression argument to forcibly set expression if required 2022-02-07 09:27:52 +11:00
Mike Farah
703418d0c4 Automatically add "-" when piping and its missing 2022-02-07 09:09:11 +11:00
Mike Farah
75960c6484 Allow multiple files with no expression 2022-02-07 08:23:53 +11:00
Mike Farah
5ac3c57510 Fixed bug - ignore path expressions that match a directory 2022-02-07 08:04:26 +11:00
Mike Farah
a6fc7aa881 Updating docs 2022-01-28 10:06:25 +11:00
Mike Farah
dedd1ca892 Fixing github build 2022-01-27 15:54:26 +11:00
Mike Farah
01b4917f26 Debug github build 2022-01-27 14:22:01 +11:00
Mike Farah
25e374f4ee Debug github build 2022-01-27 14:00:55 +11:00
Mike Farah
3ba728d40c Working around github strangeness 2022-01-27 13:54:29 +11:00
Mike Farah
8761920f58 Debug github build 2022-01-27 13:24:05 +11:00
Mike Farah
394be5c65a Debug github build 2022-01-27 12:47:06 +11:00
Mike Farah
4ec533bc1b No longer have to specify eval! 2022-01-27 12:07:41 +11:00
Mike Farah
fc276ff450 Smarter behaviour when piping data in with one argument 2022-01-27 10:18:46 +11:00
Mike Farah
ec8ef312ef
Added XML encoding/decoding (#1067)
* Added XML encoding/decoding

* Minor fixes

* Improve yq doc

* Lint
2022-01-15 11:57:59 +11:00
Mike Farah
6763ae6e7b Added xml acceptance tests 2021-12-21 17:05:33 +11:00
Mike Farah
fb648ceb79 Load file acceptance test 2021-11-16 16:21:08 +11:00
Mike Farah
356eff3b0b wip 2021-11-16 16:21:08 +11:00
Mike Farah
d4b9781ee6 Fixed acceptance tests 2021-10-30 14:00:28 +11:00
Mike Farah
2b3d0552a6 Refactored command logic 2021-10-30 13:04:05 +11:00
Mike Farah
0b2688c0f1 Split printer 2021-10-30 10:04:41 +11:00
Mike Farah
cb95ab1494 Fixed merge comment issue #919 2021-08-26 16:31:26 +10:00
Mike Farah
d18aa3e9e0 Added shorthand output formats 2021-08-20 15:46:33 +10:00
Mike Farah
10d4eb3381 Updated to use -o for output format 2021-08-20 13:35:57 +10:00
Mike Farah
043e9128d7 Pretty Print tests 2021-08-20 12:23:35 +10:00
Mike Farah
9ec20f8ba2 Added more tests 2021-07-20 11:14:54 +10:00
Mike Farah
b2380399a8 Added more tests 2021-07-20 11:12:41 +10:00