Last active
February 8, 2018 21:21
-
-
Save mrjoshuak/c194cafda7032fa960fa6c01bb221133 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
folder1: c43zviuKeMEC8svqgWie9iqjgMZmFLEWJ1S69d8CMPwrNZy62NieogUjTMsYeH5D4Sx9pbWzoDbH2Q5zBv2NeQCP5w | |
.: | |
mod time: 2018-02-08T20:45:34Z | |
size: 3281924 | |
mode: `drw-r-xr-x` | |
folder2: | |
folder3: | |
file1.ext: | |
file2.ext: | |
file3.ext: | |
.: | |
notes: circle take | |
folder4: `tar -xvf` | |
archive.tar: | |
folder5: | |
files.[12984-14238].raw: | |
.: c42vJDkZFvAZYvyPaG37Wuzqdjand7QdJbFB36dY7yHKLVC6isgEmraDLRAmzCDjw4CgJKLSVuWhqzSbL178QvB5yT | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is an example of the original DSL format used at Studio Pyxis. It is a YAML like text file that describes a directory structure, optional inline c4 ids, and arbitrary other YAML like values.
Interesting things to note, are the optional inline c4 ids (lines 1 & 17), or executable command (line 13), and file range expressions (line 16). Also the structure is directly map-able to a file system without name collisions with metadata keys because metadata is under a “.” ‘folder’ name which has no meaningful filesystem mapping. In other-words there is no ambiguity as to weather a key is intended as a metadata key/value or a filepath/content. This also allows one to write literal file content into the c4lang file such as adding the content of xml sidecar files inline, like JSON binary data is encoded to base64.
A key path that has a dot ‘folder’ in it is clearly a metadata value:
/folder1/./mod time/2018-02-08T20:45:34Z
(note: all times are given in UTC timezone and are “RFC3339” format)
While a key path without a dot folder is clearly a file or folder:
/folder1/folder2/folder3/file1.ext
Inline file contents would be written like:
/folder1/folder2/folder3/sidecar.xml: <?xml …?>
Or as an externally referenced c4 id:
/folder1/folder2/folder3/sidecar.xml: c42vJDk…
The c4 id on line 17 shows how you can link metadata for a file to an external c4 id reference, by putting it behind the dot
folder
of a file.The current format under review is basically the same as this but more directly YAML, JSON compatible, ostensibly by putting the c4 id or executable instructions inside the “.” path.