diff --git a/resources/examples/Fixes/call_macro b/resources/examples/Fixes/call_macro new file mode 100644 index 0000000..3738edc --- /dev/null +++ b/resources/examples/Fixes/call_macro @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=do+put_macro%28%22testMacro%22%29%0A++++add_field%28%22%24%5BnewField%5D%22%2C%22field%22%29%0Aend%0A%0Acall_macro%28%22testMacro%22%2CnewField%3A%22createdByMacro%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A \ No newline at end of file diff --git a/resources/examples/Fixes/capitalize b/resources/examples/Fixes/capitalize new file mode 100644 index 0000000..898c0e7 --- /dev/null +++ b/resources/examples/Fixes/capitalize @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=capitalize%28%22key%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A \ No newline at end of file diff --git a/resources/examples/Fixes/do_put_macro b/resources/examples/Fixes/do_put_macro new file mode 100644 index 0000000..3738edc --- /dev/null +++ b/resources/examples/Fixes/do_put_macro @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=do+put_macro%28%22testMacro%22%29%0A++++add_field%28%22%24%5BnewField%5D%22%2C%22field%22%29%0Aend%0A%0Acall_macro%28%22testMacro%22%2CnewField%3A%22createdByMacro%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A \ No newline at end of file diff --git a/resources/examples/Fixes/downcase b/resources/examples/Fixes/downcase new file mode 100644 index 0000000..fadadd8 --- /dev/null +++ b/resources/examples/Fixes/downcase @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=downcase%28%22key%22%29%0A&data=%7B%0A++%22key%22+%3A+%22WORD%22%0A%7D%0A \ No newline at end of file diff --git a/resources/examples/Fixes/index b/resources/examples/Fixes/index new file mode 100644 index 0000000..8385b20 --- /dev/null +++ b/resources/examples/Fixes/index @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=index%28%22animal%22%2C+%22n%22%29%0A&data=%7B%0A++%22animal%22%3A+%22canary%22%0A%7D%0A \ No newline at end of file diff --git a/resources/examples/Fixes/isbn b/resources/examples/Fixes/isbn new file mode 100644 index 0000000..a7f3357 --- /dev/null +++ b/resources/examples/Fixes/isbn @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=isbn%28%22test_1%22%2Cto%3A%22clean%22%29%0Aisbn%28%22test_2%22%2Cto%3A%22clean%22%2Cverify_check_digit%3A%22true%22%2Cerror_string%3A%22ung%C3%BCltig%22%29%0Aisbn%28%22test_3%22%2Cto%3A%22ISBN13%22%2Cverify_check_digit%3A%22true%22%2Cerror_string%3A%22ung%C3%BCltig%22%29%0Aisbn%28%22test_4%22%2Cto%3A%22ISBN10%22%2Cverify_check_digit%3A%22true%22%2Cerror_string%3A%22ung%C3%BCltig%22%29%0A&data=%7B%0A++%22test_1%22+%3A+%22978-3-89401-810-9%22%2C%0A++%22test_2%22+%3A+%22978-3-89401-810-9%22%2C%0A++%22test_3%22+%3A+%223442151473%22%2C%0A++%22test_4%22+%3A+%22978-3-8218-0818-5%22%0A%7D%0A \ No newline at end of file diff --git a/resources/examples/Fixes/join_field b/resources/examples/Fixes/join_field new file mode 100644 index 0000000..035d371 --- /dev/null +++ b/resources/examples/Fixes/join_field @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=join_field%28%22investigators%5B%5D%22%2C%22%3F%22%29%0Amove_field%28%22investigators%5B%5D%22%2C%22investigators%22%29%0A&data=%7B%0A++%22investigators%22+%3A+%5B+%22Justus%22%2C+%22Peter%22%2C+%22Bob%22+%5D%0A%7D%0A%0A \ No newline at end of file diff --git a/resources/examples/Fixes/reject b/resources/examples/Fixes/reject new file mode 100644 index 0000000..7e7b150 --- /dev/null +++ b/resources/examples/Fixes/reject @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-yaml%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+kick+out+records+that+meet+the+conditional%0A%0Aif+exists%28%22test%22%29%0A++++reject%28%29%0Aend&data=---%0Akey%3A+word%0A%0A---%0Atest%3A+case%0A \ No newline at end of file diff --git a/resources/examples/Fixes/rename b/resources/examples/Fixes/rename new file mode 100644 index 0000000..4c0acb5 --- /dev/null +++ b/resources/examples/Fixes/rename @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+rename+subelements+in+object%0Arename%28%22object%22%2C+%22o%22%2C+%22__%22%29%0Arename%28%22object%22%2C+%22O%22%2C+%22%23%23%22%29%0A%0A&data=%7B%0A++%22object%22+%3A+%7B%0A++++%22okey%22+%3A+%22word%22%2C%0A++++%22key%22+%3A+%22word%22%2C%0A++++%22key_2%22+%3A+%22word_2%22%2C%0A++++%22object%22+%3A+%7B%0A++++++%22key_3%22+%3A+%22word_3%22%2C%0A++++++%22arrayOfStrings%22+%3A+%5B+%22test%22%2C+%22test_2%22%2C+%22test_3%22+%5D%0A++++%7D%2C%0A++++%22arrayOfObjects%22+%3A+%5B+%7B%0A++++++%22key_4%22+%3A+%22word_4%22%2C%0A++++++%22arrayOfStrings_2%22+%3A+%5B+%22test%22%2C+%22test_2%22%2C+%22test_3%22+%5D%0A++++%7D%2C+%7B%0A++++++%22okey_2%22+%3A+%22word_2%22%2C%0A++++++%22arrayOfStrings%22+%3A+%5B+%22test%22%2C+%22test_2%22%2C+%22test_3%22+%5D%0A++++%7D+%5D%0A++%7D%0A%7D%0A \ No newline at end of file diff --git a/resources/examples/Fixes/set_array b/resources/examples/Fixes/set_array new file mode 100644 index 0000000..452bf96 --- /dev/null +++ b/resources/examples/Fixes/set_array @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Add+an+empty+array/list%0Aset_array%28%22emptyArray%5B%5D%22%29%0A%0A%23+Add+an+array/list+with+values%0Aset_array%28%22array%5B%5D%22%2C%22value1%22%2C%22value2%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A \ No newline at end of file diff --git a/resources/examples/Fixes/sort_field b/resources/examples/Fixes/sort_field new file mode 100644 index 0000000..2e60e29 --- /dev/null +++ b/resources/examples/Fixes/sort_field @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=sort_field%28%22animals%5B%5D%22%29%0Asort_field%28%22numbers%5B%5D%22%29%0Asort_field%28%22numbers_2%5B%5D%22%2Cnumeric%3A%22true%22%29%0Asort_field%28%22animals_2%5B%5D%22%2Creverse%3A%22true%22%29%0Asort_field%28%22numbers_3%5B%5D%22%2C+numeric%3A%22true%22%2Creverse%3A%22true%22%29%0Asort_field%28%22animals_3%5B%5D%22%2C+uniq%3A%22true%22%29%0Asort_field%28%22numbers_4%5B%5D%22%2Cnumeric%3A%22true%22%2C+uniq%3A%22true%22%29%0A&data=%7B%0A++%22animals%22+%3A+%5B+%22dog%22%2C+%22cat%22%2C+%22cat%22%2C+%22zebra%22+%5D%2C%0A++%22animals_2%22+%3A+%5B+%22dog%22%2C+%22cat%22%2C+%22cat%22%2C+%22zebra%22+%5D%2C%0A++%22animals_3%22+%3A+%5B+%22dog%22%2C+%22cat%22%2C+%22cat%22%2C+%22zebra%22+%5D%2C%0A++%22numbers%22+%3A+%5B+%227%22%2C+%222%22%2C+%227%22%2C+%221%22%2C+%2210%22+%5D%2C%0A++%22numbers_2%22+%3A+%5B+%227%22%2C+%222%22%2C+%227%22%2C+%221%22%2C+%2210%22+%5D%2C%0A++%22numbers_3%22+%3A+%5B+%227%22%2C+%222%22%2C+%227%22%2C+%221%22%2C+%2210%22+%5D%2C%0A++%22numbers_4%22+%3A+%5B+%227%22%2C+%222%22%2C+%227%22%2C+%221%22%2C+%2210%22+%5D%0A%7D%0A \ No newline at end of file diff --git a/resources/examples/Fixes/split_field b/resources/examples/Fixes/split_field new file mode 100644 index 0000000..2b6612d --- /dev/null +++ b/resources/examples/Fixes/split_field @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=split_field%28%22tools%22%2C+%22--%22%29%0A&data=%7B%0A++%22tools%22+%3A+%22magic--arms--shapeShifting%22%0A%7D%0A%0A \ No newline at end of file diff --git a/resources/examples/Fixes/trim b/resources/examples/Fixes/trim new file mode 100644 index 0000000..f15c39e --- /dev/null +++ b/resources/examples/Fixes/trim @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Delete+trailing+and+leading+whitespaces.%0Atrim%28%22key%22%29%0A&data=%7B%0A++%22key%22+%3A+%22+word+%22%0A%7D%0A \ No newline at end of file diff --git a/resources/examples/Fixes/upcase b/resources/examples/Fixes/upcase new file mode 100644 index 0000000..068387a --- /dev/null +++ b/resources/examples/Fixes/upcase @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=upcase%28%22key%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A \ No newline at end of file diff --git a/resources/examples/Fixes/vacuum b/resources/examples/Fixes/vacuum new file mode 100644 index 0000000..70b82d7 --- /dev/null +++ b/resources/examples/Fixes/vacuum @@ -0,0 +1 @@ +https://test.metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Deletes+empty+elements%0Avacuum%28%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%2C%0A++%22empty%22+%3A+%22%22%0A%7D%0A \ No newline at end of file