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.

Move bears.json Into Place

TODO: Pull subtitle into page object

This doesn't work well. It doesn't picks up all the changes and sometimes takes several seconds to make the move. So, I'm not using it.

Looking at setting up a script with `watchexec``

This launchd script watches my Downloads folder. When a file named "ascii-shop.json" shows up it gets copied to my "asciibear" projected and with the name "bears.json"

code_start_default_section code_end_default_section

Debugging Stuff

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

        -- title

Move bears.json Into Place

-- warning

This doesn't work well. It doesn't picks up all 
the changes and sometimes takes several seconds
to make the move. So, I'm not using it. 

Looking at setting up a script with `watchexec``

-- p

This launchd script watches my Downloads folder. 
When a file named "ascii-shop.json" shows up it
gets copied to my "asciibear" projected and 
with the name "bears.json"

-- code/
-- name: ~/Library/LaunchAgents/com.alanwsmith.move_ascii_bears.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC 
"-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.alanwsmith.move_ascii_bears.plist</string>
  <key>EnvironmentVariables</key>
  <dict>
    <key>INPUT_FILE</key>
    <string>/Users/alan/Downloads/ascii-shop.json</string>
    <key>OUTPUT_FILE</key>
    <string>/Users/alan/workshop/asciibear/bears.json</string>
  </dict>
  <key>ProgramArguments</key>
  <array>
    <string>/bin/bash</string>
    <string>-c</string>
    <string>
if [ -f "$INPUT_FILE" ]; then
  if [ -f "$OUTPUT_FILE" ]; then
    rm "$OUTPUT_FILE"
  fi
  mv "$INPUT_FILE" "$OUTPUT_FILE"
  # osascript -e 'display notification "bears.json moved" with title "ASCIISHOP" subtitle "Notice" sound name "Pop"'
fi
date 
    </string>
  </array>
  <key>WatchPaths</key>
  <array>
    <string>/Users/alan/Downloads</string>
  </array>
  <key>StandardErrorPath</key>
    <string>/tmp/launchd_move_bears_json.log</string>
  <key>StandardOutPath</key>
    <string>/tmp/launchd_move_bears_json.log</string>
</dict>
</plist>

-- /code

-- categories
-- launchd
-- dotfiles
-- Automation

-- metadata
-- date: 2023-08-25 13:20:01
-- id: 2uuatln0
-- site: aws
-- type: post
-- status: published