Fix README

This commit is contained in:
arne 2023-01-03 21:18:04 +01:00
commit b2d3ccd5c3
2 changed files with 3 additions and 1 deletions

View file

@ -3,5 +3,5 @@
This is a small program that posts an image from `./posts` every time you call it. You can call it like so: This is a small program that posts an image from `./posts` every time you call it. You can call it like so:
``` ```
MASTODON_INSTANCE_URL=... MASTODON_ACCESS_TOKEN=... deno run --allow-env --allow-net --allow-write=./posts --allow-read=./posts main.ts MASTODON_INSTANCE_URL=... MASTODON_ACCESS_TOKEN=... deno run --allow-env --allow-net --allow-write --allow-read main.ts
``` ```

View file

@ -97,5 +97,7 @@ const statusRequest = await fetch(`${MASTODON_INSTANCE_URL}/api/v1/statuses`, {
console.log("statusRequest", statusRequest); console.log("statusRequest", statusRequest);
console.log("Linking posted file so we can skip it in the future…"); console.log("Linking posted file so we can skip it in the future…");
// FIXME: This requires unrestricted `--allow-read` and `--allow-write` at the;
// deno should provide a finer-grained permission prompt here
await Deno.symlink(`./posts/${fileToPost}`, `./posts/.posted/${fileToPost}`); await Deno.symlink(`./posts/${fileToPost}`, `./posts/.posted/${fileToPost}`);
console.log("Done!"); console.log("Done!");