Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RewindMCP is a Python library that interfaces with the Rewind.ai SQLite database
pip install -e .

# Install dependencies
pip install pysqlcipher3 pydantic requests python-dotenv "mcp>=0.1.0"
pip install sqlcipher3 pydantic requests python-dotenv "mcp>=0.1.0" tabulate
```

### Testing
Expand Down
2 changes: 1 addition & 1 deletion README-MCP-STDIO.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The server implements the MCP specification with proper JSON-RPC 2.0 protocol ov

1. Install the required dependencies:
```bash
pip install "mcp>=0.1.0" pysqlcipher3 python-dotenv
pip install "mcp>=0.1.0" sqlcipher3 python-dotenv tabulate
```

2. Set up your RewindDB configuration in a `.env` file:
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The main purpose of this project, for me, was to connect Rewind to my Raycast:

```bash
# clone the repository
git clone https://github.com/yourusername/RewindMCP.git
git clone https://github.com/pedramamini/RewindMCP.git
cd RewindMCP

# install the package and dependencies
Expand Down Expand Up @@ -149,7 +149,8 @@ python transcript_cli.py --export-own-voice "2025-01-01 to 2025-07-04" --export-
# export actual audio files organized by day
python transcript_cli.py --export-own-voice "2025-01-01 to 2025-07-04" --export-format audio --audio-export-dir ./my_voice_audio

# generate word cloud from your voice data (requires wordcloud command)
# generate word cloud from your voice data (requires wordcloud library)
pip install wordcloud matplotlib # install dependencies
./my-words.sh # automatically uses last 6 months of your voice data
```

Expand Down Expand Up @@ -530,7 +531,7 @@ Key relationships:

```bash
# clone the repository
git clone https://github.com/yourusername/RewindMCP.git
git clone https://github.com/pedramamini/RewindMCP.git
cd RewindMCP

# install in development mode
Expand Down
86 changes: 86 additions & 0 deletions my-words.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#!/bin/bash
#
# my-words.sh - Generate word cloud from your voice data
#
# This script uses the transcript_cli.py to export your voice transcripts
# from the last 6 months and generates a word cloud visualization.
#
# Requirements:
# - wordcloud Python library: pip install wordcloud
# - transcript_cli.py in the same directory
#
# Usage:
# ./my-words.sh
#

set -e

# Configuration
MONTHS_BACK=6
OUTPUT_FILE="my_words.png"
TEMP_FILE="/tmp/my_voice_data.txt"

# Calculate date range (6 months ago to today)
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
START_DATE=$(date -v-${MONTHS_BACK}m +"%Y-%m-%d")
else
# Linux
START_DATE=$(date -d "${MONTHS_BACK} months ago" +"%Y-%m-%d")
fi
END_DATE=$(date +"%Y-%m-%d")

echo "Generating word cloud from your voice data..."
echo "Date range: $START_DATE to $END_DATE"

# Export voice data using transcript_cli.py
echo "Exporting your voice transcripts..."
python transcript_cli.py --export-own-voice "$START_DATE to $END_DATE" --export-format text > "$TEMP_FILE"

# Check if we got any data
if [ ! -s "$TEMP_FILE" ]; then
echo "No voice data found for the specified time period."
echo "Make sure Rewind.ai has been recording audio and you have spoken during this time."
rm -f "$TEMP_FILE"
exit 1
fi

# Generate word cloud
echo "Generating word cloud..."
python3 -c "
import sys
from wordcloud import WordCloud
import matplotlib.pyplot as plt

# Read the text data
with open('$TEMP_FILE', 'r') as f:
text = f.read()

if not text.strip():
print('No text data found.')
sys.exit(1)

# Generate word cloud
wordcloud = WordCloud(
width=800,
height=400,
background_color='white',
max_words=100,
colormap='viridis'
).generate(text)

# Save as image
plt.figure(figsize=(10, 5))
plt.imshow(wordcloud, interpolation='bilinear')
plt.axis('off')
plt.title('My Words - Last $MONTHS_BACK Months of Voice Data')
plt.tight_layout()
plt.savefig('$OUTPUT_FILE', dpi=300, bbox_inches='tight')
print(f'Word cloud saved as $OUTPUT_FILE')
"

# Clean up
rm -f "$TEMP_FILE"

echo "Done! Word cloud saved as $OUTPUT_FILE"
echo "To view: open $OUTPUT_FILE (macOS) or xdg-open $OUTPUT_FILE (Linux)"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Core dependencies for RewindMCP
# Database and encryption
pysqlcipher3
sqlcipher3

# Data validation and serialization
pydantic
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
description="a python library for interfacing with the rewind.ai sqlite database",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/pedram/rewinddb",
url="https://github.com/pedramamini/RewindMCP",
packages=setuptools.find_packages(),
classifiers=[
"programming language :: python :: 3",
Expand All @@ -29,6 +29,6 @@
"requests",
"python-dotenv",
"mcp>=0.1.0",
"tabulate",
"tabulate",
],
)