Skip to content

Commit 437f73d

Browse files
authored
Merge pull request #62 from metafacture/metafactureCore675-unixPath
2 parents 28a3a03 + 8c205b0 commit 437f73d

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

docs/fix/Fix-User-Guide.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ vars.put("rights", "CC-0");
230230
final Metafix metafix = new metafix("fixdef.fix", vars);
231231
```
232232

233+
If you want to reuse the variables of the FLUX workflow: This is done with the * character added to the `fix` command: fix("tranformation.fix", *). In this case Fix gains access to all variable assignments made in Flux.
234+
233235
## Splitting Fixes for Reuse
234236

235237
In a complex project setting there may be several Fixes in use,
@@ -292,3 +294,7 @@ You can use path wildcards to select fields matching a pattern. They only match
292294
| `?` | Placeholder for exactly one character. |
293295
| `\|` | Alternation of multiple patterns. |
294296
| `[...]` | Enumeration of characters. |
297+
298+
#### File paths
299+
300+
Some Fix functions can refer to files on your system. Paths are by default relative to the current working directory. Paths can always be stated in UNIX style - even when running Metafacture under Windows. If using Windows style you have to escape the backslashes (`C:\my\path` > `C:\\my\\path`). If you want to address files relative to the Fix file add `.` as directory (`./myFile`). To address files relative to the location of the executed Flux file, use the predefined `FLUX_DIR` variable, but you need to add the `*` to the `fix` command in the Flux (see above). You can also use `..` for the parent directory.

docs/flux/Flux-User-Guide.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ Variables are always Strings and can be concatenated with the `+` operator. Esca
109109
The `default` keyword tells Flux to assign the respective value _only_ if the variable has
110110
not yet been set on the command line. Without `default`, previous assignments, e.g. from command line variables, will be overridden by the explicitly assigned value.
111111

112-
Paths are always relative to the directory within which the flux command is executed. To address files relative to the location of the executed flux file, use the predefined `FLUX_DIR` variable.
112+
### File paths
113+
114+
Paths are always relative to the current working directory. Paths can always be stated in UNIX style - even when running Metafacture under Windows. If using Windows style you have to escape the backslashes (`C:\my\path` > `C:\\my\\path`). To address files relative to the location of the executed Flux file, use the predefined `FLUX_DIR` variable. You can also use `..` for the parent directory. The use of a single dot to refer to the current directory `.` is optional (`./myFile` = `myFile`).
113115

114116
### Comments
115117
Flux supports single line C/Java-style comments: `//comment`.

0 commit comments

Comments
 (0)