Skip to content

Commit

Permalink
clean(docs): Various minor docs updates
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Dec 30, 2024
1 parent 38e47f5 commit de277fc
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 6 deletions.
2 changes: 2 additions & 0 deletions ToDo.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

## High Priority (Next Features)

1. Focus on implementing _Applications_ outlined in [`mkdocs.yaml`](mkdocs.yaml)

1. Merge this with [`ToDo.yaml`](ToDo.yaml)

1. Support top-level `namespace: "demo"` in `docs/use/library/model.textproto` and rm others
Expand Down
1 change: 1 addition & 0 deletions ToDo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ items:

- Exec Connector!:
tags: [exec]
description: "Consider adopting Camel?!"
links:
- https://camel.apache.org/components/4.4.x/exec-component.html

Expand Down
45 changes: 40 additions & 5 deletions docs/use/fetch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ This is different from [`get`](../get/index.md), which shows _Things_ given an _
Enola supports the [URI schemes](https://en.wikipedia.org/wiki/List_of_URI_schemes) which are documented below.
These are supported everywhere; including in `fetch`, `--load`, and elsewhere.

## HTTP
## Schemes

### HTTP

This will fetch <https://www.vorburger.ch/hello.md>: _(Note how for security reasons we have to explicitly permit it.)_

Expand All @@ -37,7 +39,7 @@ $ ./enola fetch --http-scheme https://www.vorburger.ch/hello.md

Enola locally caches HTTP responses on the filesystem.

## Files
### Files

We can do `cat`-like equivalent of local files using [the `file:` scheme](https://en.wikipedia.org/wiki/File_URI_scheme):

Expand All @@ -55,14 +57,14 @@ $ ./enola fetch /tmp/hi.txt
...
```

## Classpath
### Classpath

```bash cd ../.././..
$ ./enola fetch classpath:/VERSION
...
```

## Data
### Data

Enola [supports (RFC 2397) `data:` URLs](https://en.m.wikipedia.org/wiki/Data_URI_scheme):

Expand All @@ -71,7 +73,7 @@ $ ./enola fetch "data:application/json;charset=UTF-8,%7B%22key%22%3A+%22value%22
...
```

## Empty
### Empty

`empty:` is a (non-standard) URL scheme in Enola for "no content" (as an alternative to `data:,`):

Expand All @@ -80,6 +82,39 @@ $ ./enola fetch empty:/
...
```

### Exec (TODO)

We plan to support an `exec:` scheme, whose content will be the resulting of running the given command,
similar to e.g. [🐪 Camel's](https://camel.apache.org/components/4.8.x/exec-component.html) or (vaguely) Web Browsers'
`javascript:`.

<!-- TODO ### Git `git:` ? -->

## Parameters

Enola considers certain generic query parameters in URLs it fetches.

These work with most but not all schemes (e.g. `data:` does not permit query parameters).

### Media Type

Adding e.g. `?mediaType=application/json` [overrides the Media Type](../info/index.md#detect)
which e.g. a server provided in e.g. a HTTP header,
or that was determined from a file extension.

### Charset

Adding e.g. `?charset=iso-8859-1` overrides (and takes precedence over)
the Charset from the Media Type (if any) or any HTTP header like mechanisms.

### Integrity (TODO)

We plan
to support `?integrity=...`
to verify resource integrity via a [cryptographic digest ("hash")])(https://docs.ipfs.tech/concepts/hashing/)
using a [Multiformats's Multibase encoded Multihash](https://www.multiformats.io).
This is similar e.g. to [HTML's Subresource Integrity (SRI)](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).

<!--
## Screencast
Expand Down
6 changes: 5 additions & 1 deletion mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ copyright: Copyright &copy; 2023-2024 The Enola <https://enola.dev> Authors

nav:
# - Applications:
# - Bookmarks: (delicious.json, bookmarks.html, awesome.yaml; Graph, HTML, Timeline)
# - Bookmark: (delicious.json, bookmarks.html, awesome.yaml; Graph, HTML, Timeline)
# - Awesome List: # https://awesomes.directory/
# - Genealogy:
# - GitHub:
# - ToDo:
# - Tech Infra
# - Networking:
# - Linux:
Expand Down

0 comments on commit de277fc

Please sign in to comment.