Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/x0k/web-maid
Automation in the browser.
https://github.com/x0k/web-maid
automation browser chrome-extension
Last synced: about 1 month ago
JSON representation
Automation in the browser.
- Host: GitHub
- URL: https://github.com/x0k/web-maid
- Owner: x0k
- License: mit
- Created: 2023-11-07T01:47:04.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-26T17:45:25.000Z (2 months ago)
- Last Synced: 2024-10-26T19:37:28.911Z (2 months ago)
- Topics: automation, browser, chrome-extension
- Language: TypeScript
- Homepage: https://chromewebstore.google.com/detail/webmaid/jmnhnbhoobjcgngjpdhdkcgbpcicaoic
- Size: 1.36 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebMaid
Automation in the browser.
## Config
Example:
```yaml
$op: pipe
do:
- title:
$op: doc.get
key: title
url:
$op: doc.get
key:
- location
- href
text:
$op: html.markdown
html:
$op: html.simplify
html:
$op: doc.get
key:
- documentElement
- outerHTML
- $op: fs.saveFile
filename:
$op: str.join
values:
- $op: get
key: title
- ".md"
content:
$op: template.render
template: |
---
title: {{title}}
url: {{url}}
---{{text}}
```The `config` is a program that is computed using the following rules:
- If an object contains the key `$op`, it is interpreted as an `operator`, the other keys of this object are parameters of the `operator`
- Operators transform the `context` according to their logic and specified parameters
- Rest values interprets as is
- Calculation is a depth-first search
- Initial `context` is a `secrets` data## Secrets
The data which contains sensitive information and stored locally.
Example of `secrets` data:
```yaml
token: Bearer token
```## Operators
Full documentation of operators is available in the [operators](docs/operators.md) section and on the `options` page of the extension.
## Refs
If you need to include code from other files, you can use the `$ref` key.
Example:
```yaml
$ref: "./#"
```- `` is a name of the file
- `` is [JSONPath](https://github.com/dchester/jsonpath) selector
- One of the parameters can be omitted (e.g. `./`, `#`)## Examples
- [Save web content to Obsidian](examples/obsidian/)
- [Render json as a table](examples/json-to-table/)## See also
- If you need a simple tool to save web content to Obsidian, try [obsidian-web](https://github.com/coddingtonbear/obsidian-web).
- Simple build automation tool [mk](https://github.com/x0k/mk)