@@ -170,7 +170,7 @@ Does nothing. It is used for benchmarking in Catmandu.
170
170
nothing()
171
171
```
172
172
173
- [ Playground- Example] ( https://metafacture.org/playground/?example=nothing )
173
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=nothing )
174
174
175
175
##### ` put_filemap `
176
176
@@ -180,7 +180,7 @@ Defines an external map for [lookup](#lookup) from a file or a URL. Maps with mo
180
180
put_filemap(" <sourceFile>" , " <mapName>" , sep_char: " \t " )
181
181
```
182
182
183
- [ Playground- Example] ( https://metafacture.org/playground/?example=put_filemap )
183
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=put_filemap )
184
184
185
185
The separator (` sep_char ` ) will vary depending on the source file, e.g.:
186
186
@@ -211,7 +211,7 @@ put_map("<mapName>",
211
211
)
212
212
```
213
213
214
- [ Playground- Example] ( https://metafacture.org/playground/?example=put_map )
214
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=put_map )
215
215
216
216
##### ` put_rdfmap `
217
217
@@ -224,7 +224,7 @@ put_rdfmap("<rdfResource>", "<rdfMapName>", target: "<rdfProperty>")
224
224
put_rdfmap(" <rdfResource>" , " <rdfMapName>" , target: " <rdfProperty>" , select_language: " <rdfLanguageTag>" )
225
225
```
226
226
227
- [ Playground- Example] ( https://metafacture.org/playground/?example=put_rdfmap )
227
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=put_rdfmap )
228
228
229
229
##### ` put_var `
230
230
@@ -234,7 +234,7 @@ Defines a single global variable that can be referenced with `$[<variableName>]`
234
234
put_var(" <variableName>" , " <variableValue>" )
235
235
```
236
236
237
- [ Playground- Example] ( https://metafacture.org/playground/?example=put_var )
237
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=put_var )
238
238
239
239
##### ` put_vars `
240
240
@@ -247,7 +247,7 @@ put_vars(
247
247
)
248
248
```
249
249
250
- [ Playground- Example] ( https://metafacture.org/playground/?example=put_vars )
250
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=put_vars )
251
251
252
252
#### Record-level functions
253
253
@@ -259,7 +259,7 @@ Creates a field with a defined value.
259
259
add_field(" <targetFieldName>" , " <fieldValue>" )
260
260
```
261
261
262
- [ Playground- Example] ( https://metafacture.org/playground/?example=add+field )
262
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=add+field )
263
263
264
264
##### ` array `
265
265
295
295
call_macro(" <macroName>" [, <dynamicLocalVariables>...])
296
296
```
297
297
298
- [ Playground- Example] ( https://metafacture.org/playground/?example=call+macro )
298
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=call+macro )
299
299
300
300
##### ` copy_field `
301
301
@@ -305,7 +305,7 @@ Copies a field from an existing field.
305
305
copy_field(" <sourceField>" , " <targetField>" )
306
306
```
307
307
308
- [ Playground- Example] ( https://metafacture.org/playground/?example=copy+field )
308
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=copy+field )
309
309
310
310
311
311
##### ` format `
@@ -340,7 +340,7 @@ Moves a field from an existing field. Can be used to rename a field.
340
340
move_field(" <sourceField>" , " <targetField>" )
341
341
```
342
342
343
- [ Playground- Example] ( https://metafacture.org/playground/?example=move+field )
343
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=move+field )
344
344
345
345
346
346
##### ` parse_text `
@@ -374,7 +374,7 @@ paste("my.string", "~Hi", "a", "~how are you?")
374
374
# "my.string": "Hi eeny how are you?"
375
375
```
376
376
377
- [ Playground- Example] ( https://metafacture.org/playground/?example=paste )
377
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=paste )
378
378
379
379
##### ` print_record `
380
380
@@ -425,7 +425,7 @@ Removes a field.
425
425
remove_field(" <sourceField>" )
426
426
```
427
427
428
- [ Playground- Example] ( https://metafacture.org/playground/?example=remove+field )
428
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=remove+field )
429
429
430
430
##### ` rename `
431
431
@@ -435,7 +435,7 @@ Replaces a regular expression pattern in subfield names of a field. Does not cha
435
435
rename (" <sourceField>" , " <regexp>" , " <replacement>" )
436
436
```
437
437
438
- [ Playground- Example] ( https://metafacture.org/playground/?example=rename )
438
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=rename )
439
439
440
440
##### ` retain `
441
441
@@ -445,7 +445,7 @@ Deletes all fields except the ones listed (incl. subfields).
445
445
retain(" <sourceField_1>" [, ...])
446
446
```
447
447
448
- [ Playground- Example] ( https://metafacture.org/playground/?example=retain )
448
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=retain )
449
449
450
450
##### ` set_array `
451
451
@@ -456,7 +456,7 @@ set_array("<targetFieldName>")
456
456
set_array(" <targetFieldName>" , " <value_1>" [, ...])
457
457
```
458
458
459
- [ Playground- Example] ( https://metafacture.org/playground/?example=set+array )
459
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=set+array )
460
460
461
461
##### ` set_field `
462
462
@@ -497,7 +497,7 @@ Deletes empty fields, arrays and objects.
497
497
vacuum()
498
498
```
499
499
500
- [ Playground- Example] ( https://metafacture.org/playground/?example=vacuum )
500
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=vacuum )
501
501
502
502
#### Field-level functions
503
503
@@ -509,7 +509,7 @@ Adds a string at the end of a field value.
509
509
append(" <sourceField>" , " <appendString>" )
510
510
```
511
511
512
- [ Playground- Example] ( https://metafacture.org/playground/?example=append )
512
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=append )
513
513
514
514
##### ` capitalize `
515
515
@@ -519,7 +519,7 @@ Upcases the first character in a field value.
519
519
capitalize(" <sourceField>" )
520
520
```
521
521
522
- [ Playground- Example] ( https://metafacture.org/playground/?example=capitalize )
522
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=capitalize )
523
523
524
524
##### ` count `
525
525
@@ -537,7 +537,7 @@ Downcases all characters in a field value.
537
537
downcase(" <sourceField>" )
538
538
```
539
539
540
- [ Playground- Example] ( https://metafacture.org/playground/?example=downcase )
540
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=downcase )
541
541
542
542
##### ` filter `
543
543
@@ -555,7 +555,7 @@ Flattens a nested array field.
555
555
flatten(" <sourceField>" )
556
556
```
557
557
558
- [ Playground- Example] ( https://metafacture.org/playground/?example=flatten )
558
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=flatten )
559
559
560
560
##### ` from_json `
561
561
@@ -591,7 +591,7 @@ Options:
591
591
isbn(" <sourceField>" [, to: " <isbnFormat>" ][, verify_check_digit: " <boolean>" ][, error_string: " <errorValue>" ])
592
592
```
593
593
594
- [ Playground- Example] ( https://metafacture.org/playground/?example=isbn )
594
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=isbn )
595
595
596
596
##### ` join_field `
597
597
@@ -601,7 +601,7 @@ Joins an array of strings into a single string.
601
601
join_field(" <sourceField>" , " <separator>" )
602
602
```
603
603
604
- [ Playground- Example] ( https://metafacture.org/playground/?example=join+field )
604
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=join+field )
605
605
606
606
##### ` lookup `
607
607
@@ -670,7 +670,7 @@ Adds a string at the beginning of a field value.
670
670
prepend(" <sourceField>" , " <prependString>" )
671
671
```
672
672
673
- [ Playground- Example] ( https://metafacture.org/playground/?example=prepend )
673
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=prepend )
674
674
675
675
##### ` replace_all `
676
676
@@ -680,7 +680,7 @@ Replaces a regular expression pattern in field values with a replacement string.
680
680
replace_all(" <sourceField>" , " <regexp>" , " <replacement>" )
681
681
```
682
682
683
- [ Playground- Example] ( https://metafacture.org/playground/?example=replace+all )
683
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=replace+all )
684
684
685
685
##### ` reverse `
686
686
@@ -700,7 +700,7 @@ sort_field("<sourceField>", reverse: "true")
700
700
sort_field(" <sourceField>" , numeric: " true" )
701
701
```
702
702
703
- [ Playground- Example] ( https://metafacture.org/playground/?example=sort+field )
703
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=sort+field )
704
704
705
705
##### ` split_field `
706
706
@@ -710,7 +710,7 @@ Splits a string into an array and replaces the field value with this array.
710
710
split_field(" <sourceField>" , " <separator>" )
711
711
```
712
712
713
- [ Playground- Example] ( https://metafacture.org/playground/?example=split+field )
713
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=split+field )
714
714
715
715
##### ` substring `
716
716
@@ -749,7 +749,7 @@ Deletes whitespace at the beginning and the end of a field value.
749
749
trim(" <sourceField>" )
750
750
```
751
751
752
- [ Playground- Example] ( https://metafacture.org/playground/?example=trim )
752
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=trim )
753
753
754
754
##### ` uniq `
755
755
@@ -759,7 +759,7 @@ Deletes duplicate values in an array.
759
759
uniq(" <sourceField>" )
760
760
```
761
761
762
- [ Playground- Example] ( https://metafacture.org/playground/?example=uniq )
762
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=uniq )
763
763
764
764
765
765
##### ` upcase `
@@ -770,7 +770,7 @@ Upcases all characters in a field value.
770
770
upcase(" <sourceField>" )
771
771
```
772
772
773
- [ Playground- Example] ( https://metafacture.org/playground/?example=upcase )
773
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=upcase )
774
774
775
775
##### ` uri_encode `
776
776
@@ -803,7 +803,7 @@ if <condition>
803
803
end
804
804
```
805
805
806
- [ Playground- Example] ( https://metafacture.org/playground/?example=reject )
806
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=reject )
807
807
808
808
### Binds
809
809
@@ -817,7 +817,7 @@ do list(path: "<sourceField>")
817
817
end
818
818
```
819
819
820
- [ Playground- Example] ( https://metafacture.org/playground/?example=do+list )
820
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=do+list )
821
821
822
822
Only the current element is accessible in this case (as the root element).
823
823
@@ -829,7 +829,7 @@ do list(path: "<sourceField>", "var": "<variableName>")
829
829
end
830
830
```
831
831
832
- [ Playground- Example] ( https://metafacture.org/playground/?example=do+list+with+var )
832
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=do+list+with+var )
833
833
834
834
#### ` do list_as `
835
835
@@ -864,7 +864,7 @@ do once()
864
864
end
865
865
```
866
866
867
- [ Playground- Example] ( https://metafacture.org/playground/?example=do+once )
867
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=do+once )
868
868
869
869
In order to execute multiple blocks only once, tag them with unique identifiers:
870
870
902
902
call_macro(" <macroName>" [, <dynamicLocalVariables>...])
903
903
```
904
904
905
- [ Playground- Example] ( https://metafacture.org/playground/?example=do+pu+macro )
905
+ [ Example in Playground ] ( https://metafacture.org/playground/?example=do+pu+macro )
906
906
907
907
### Conditionals
908
908
0 commit comments