The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Use watchexec To Run Commands When Files Change

TODO: Pull subtitle into page object
Code
cd /Users/alan/Downloads
watchexec -p --filter "ascii-shop.json" --fs-events create mv -- ascii-shop.json "/Users/alan/workshop/asciibear/html/bears.json"

TODO: Add osascript for display to notification center

Code
watchexec -w /some/path --emit-events-to stdin echo
Code
watchexec -w /some/path --emit-events-to json-stdin jq

Notes

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Use watchexec To Run Commands When Files Change

This example copies a file when it sees it come into
the downloads folder. 

-- code
-- bash

cd /Users/alan/Downloads
watchexec -p --filter "ascii-shop.json" --fs-events create mv -- ascii-shop.json "/Users/alan/workshop/asciibear/html/bears.json"

-- p

TODO: Add osascript for display to notification center



-- code
-- bash

watchexec -w /some/path --emit-events-to stdin echo


-- code
-- bash

watchexec -w /some/path --emit-events-to json-stdin jq


-- notes

- `--debounce`` is an option. Defaults to 
50m

- `--project-origin`` need to use when you're
not in the current dir

- `-w`` what to watch. `.`` will watch the entire
dir. TBD if that's recursive

- `--no-meta`` which prevents events for firing
for metadata changes and only fires them for:
'create', 'remove', 'rename', 'modify', 

- --emit-events-to see docs for now

-- ref
-- title: watchexec home page
-- url: https://watchexec.github.io/


-- categories
-- Command Line 

-- metadata
-- date: 2023-07-28 20:46:54
-- id: 2tdxmxma
-- site: aws
-- type: post
-- status: draft