Remove watch_linux.sh and watch_macos.sh scripts as they are no longer needed

This commit is contained in:
Gigi
2025-04-01 10:48:33 +01:00
parent 257ea19c90
commit 2b967cd891
2 changed files with 0 additions and 121 deletions

View File

@@ -1,54 +0,0 @@
#!/bin/bash
# Directory paths
VOICE_MEMO_DIR="VoiceMemos"
TRANSCRIPT_DIR="$VOICE_MEMO_DIR/transcripts"
# Check if directories exist
if [ ! -d "$VOICE_MEMO_DIR" ]; then
echo "Error: $VOICE_MEMO_DIR directory does not exist"
exit 1
fi
if [ ! -d "$TRANSCRIPT_DIR" ]; then
echo "Error: $TRANSCRIPT_DIR directory does not exist"
exit 1
fi
# Function to process voice memos
process_voice_memo() {
echo "New voice memo detected!"
./process_voice_memos.sh
}
# Function to process transcripts
process_transcript() {
echo "New transcript detected!"
./summarize_transcripts.py
}
echo "Starting file watcher..."
echo "Watching for changes in:"
echo "- Voice memos: $VOICE_MEMO_DIR"
echo "- Transcripts: $TRANSCRIPT_DIR"
echo "Press Ctrl+C to stop..."
# Monitor both directories in parallel
(
inotifywait -m -e create -e moved_to "$VOICE_MEMO_DIR" | while read -r directory events filename; do
if [[ "$filename" =~ \.m4a$ ]]; then
process_voice_memo
fi
done
) &
(
inotifywait -m -e create -e moved_to "$TRANSCRIPT_DIR" | while read -r directory events filename; do
if [[ "$filename" =~ \.txt$ ]]; then
process_transcript
fi
done
) &
# Wait for Ctrl+C
wait

View File

@@ -1,67 +0,0 @@
#!/bin/bash
# Directory paths
VOICE_MEMO_DIR="VoiceMemos"
TRANSCRIPT_DIR="$VOICE_MEMO_DIR/transcripts"
# Get resolved paths
RESOLVED_VOICE_MEMO_DIR=$(readlink -f "$VOICE_MEMO_DIR")
RESOLVED_TRANSCRIPT_DIR=$(readlink -f "$TRANSCRIPT_DIR")
# Print debug info about symlinks
echo "Directory information:"
echo "Voice memo dir: $(pwd)/$VOICE_MEMO_DIR"
echo "Is symlink: $([ -L "$VOICE_MEMO_DIR" ] && echo "yes" || echo "no")"
if [ -L "$VOICE_MEMO_DIR" ]; then
echo "Resolves to: $RESOLVED_VOICE_MEMO_DIR"
fi
# Check if directories exist
if [ ! -d "$RESOLVED_VOICE_MEMO_DIR" ]; then
echo "Error: $RESOLVED_VOICE_MEMO_DIR directory does not exist"
exit 1
fi
if [ ! -d "$RESOLVED_TRANSCRIPT_DIR" ]; then
echo "Error: $RESOLVED_TRANSCRIPT_DIR directory does not exist"
exit 1
fi
# Function to process voice memos
process_voice_memo() {
echo "New voice memo detected!"
./process_voice_memos.sh
}
# Function to process transcripts
process_transcript() {
echo "New transcript detected!"
./summarize_transcripts.py
}
echo "Starting file watcher..."
echo "Watching for changes in:"
echo "- Voice memos: $RESOLVED_VOICE_MEMO_DIR"
echo "- Transcripts: $RESOLVED_TRANSCRIPT_DIR"
echo "Press Ctrl+C to stop..."
# Monitor both directories in parallel
# -L flag enables following symlinks
(
fswatch -L -o "$RESOLVED_VOICE_MEMO_DIR" | while read -r f; do
if [[ "$f" =~ \.m4a$ ]]; then
process_voice_memo
fi
done
) &
(
fswatch -L -o "$RESOLVED_TRANSCRIPT_DIR" | while read -r f; do
if [[ "$f" =~ \.txt$ ]]; then
process_transcript
fi
done
) &
# Wait for Ctrl+C
wait