Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/9999years/reverse-osmosis
https://github.com/9999years/reverse-osmosis
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/9999years/reverse-osmosis
- Owner: 9999years
- Created: 2022-06-27T22:43:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-07T17:54:10.000Z (over 2 years ago)
- Last Synced: 2024-10-09T09:44:58.391Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 7.81 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# reverse-osmosis
`reverse-osmosis` (`ro`) filters sections of files in various ways.
man that name is clunky. i'll workshop it.here are some things you can do with the sections:
- sort
- align by delimiter
- filter with executable
- e.g. format with jq
- useful for formatting snippets of other languages embedded in a host
language source file
- "verify" with executable
- e.g. verify snippets compile with no warnings
- e.g. verify passes some linter
- verify lines match regex## syntax
```
// reverse-osmosis:sort{unique: true}
a
b
c
// reverse-osmosis:end{ pkgs ? import {} }:
pkgs.mkShell {
# ...
}```
- Punctuation `reverse-osmosis:` Filter [ FilterArgs ] [ Punctuation ]
- maybe we want a "do the rest of the file" syntax too
- it'd be nice to have a syntax for "arguments" to the filters, too. inline
yaml??? lol
- multiline args would be nice too but would significantly increase complexity