1
1
mirror of https://github.com/mgree/ffs.git synced 2024-08-16 23:00:48 +03:00
the file filesystem: mount semi-structured data (like JSON) as a Unix filesystem
Go to file
2023-07-21 18:41:34 -07:00
.github/workflows new version of r in gh action 2022-12-07 14:46:48 -05:00
bench Lazy loading (#50) 2021-10-01 07:57:58 -07:00
binary Support other formats. (#11) 2021-06-20 18:20:06 -07:00
completions Lazy loading (#50) 2021-10-01 07:57:58 -07:00
docs link video, paper 2021-12-15 19:54:00 -05:00
json Lazy loading (#50) 2021-10-01 07:57:58 -07:00
man Lazy loading (#50) 2021-10-01 07:57:58 -07:00
src munge bugfix (#61) 2023-04-08 15:43:12 -07:00
tests added test for empty log to see if quiet was successful and rm all tmp files (#64) 2023-07-21 18:41:34 -07:00
toml Support other formats. (#11) 2021-06-20 18:20:06 -07:00
utils Timing support (#46) 2021-07-29 17:55:53 -07:00
yaml Better, configurable name munging (#41) 2021-07-08 08:55:44 -07:00
.gitignore Retry R installations (#57) 2021-11-08 16:21:38 -08:00
Cargo.lock upgrade to fuser 0.11 (#59) 2022-03-07 12:56:48 -08:00
Cargo.toml upgrade to fuser 0.11 (#59) 2022-03-07 12:56:48 -08:00
CHANGELOG.md Fuser 0.9.1 (#49), in anticipation of ffs 0.1.2 2021-09-26 05:54:18 -07:00
INSTALL.md Add INSTALL.md to document installation procedures. 2021-07-02 10:08:54 -04:00
LICENSE GPLv3 2021-06-07 08:23:14 -07:00
README.md fixup eg 2021-08-24 09:53:29 -04:00
run_bench.sh Lazy loading (#50) 2021-10-01 07:57:58 -07:00
run_tests.sh Fuser 0.9.1 (#49), in anticipation of ffs 0.1.2 2021-09-26 05:54:18 -07:00

ffs: the file filesystem

Main workflow Crates.io

ffs, the file filesystem, let's you mount semi-structured data as a filesystem---a tree structure you already know how to work with!

Working with semi-structured data using command-line tools is hard. Tools like jq help a lot, but learning a new language for simple manipulations is a big ask. By mapping hard-to-parse trees into a filesystem, you can keep using the tools you know.

Example

Run ffs [file.blah] to mount file.blah at the mountpoint file. The final, updated version of the file will be outputted on stdout.

$ cat object.json 
{ "name": "Michael Greenberg", "eyes": 2, "fingernails": 10, "human": true }
$ ffs -o object_edited.json object.json &
[1] 60182
$ tree object
object
├── eyes
├── fingernails
├── human
└── name

0 directories, 4 files
$ echo Mikey Indiana >object/name
$ echo 1 >object/nose
$ mkdir object/pockets
$ cd object/pockets/
$ echo keys >pants
$ echo pen >shirt
$ cd ..
$ cd ..
$ umount object
$ 
[1]+  Done                    ffs -o object_edited.json object.json
$ cat object_edited.json 
{"eyes":2,"fingernails":10,"human":true,"name":"Mikey Indiana","nose":1,"pockets":{"pants":"keys","shirt":"pen"}}

You can specify an explicit mountpoint by running ffs -m MOUNT file; you can specify an output file with -o OUTPUT. You can edit a file in place by running ffs -i file---when the volume is unmounted, the resulting output will be written back to file.

External dependencies

You need an appropriate FUSE or macFUSE along with pkg-config.

See the GitHub build workflow for examples of external dependency installation.