From c6c0cc49c4863d0e096c2371d6603026d74370e2 Mon Sep 17 00:00:00 2001 From: Efshaub <70109870+Efshaub@users.noreply.github.com> Date: Sun, 23 Aug 2020 11:39:26 -0700 Subject: [PATCH 01/10] A story about a man and a woman --- .DS_Store | Bin 10244 -> 10244 bytes script_buddy/.DS_Store | Bin 10244 -> 8196 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/.DS_Store b/.DS_Store index f411f478f9821a51009220726bce40a4cfe7b0f7..547d2fbfc4d73ed233596c3e2fe1caf49649f43b 100644 GIT binary patch delta 113 zcmZn(XbG6$&nU4mU^hRb#AF_U>d8#P(wmJ0!)1rr0q%{N4JI5wtqGH+&A M_{FlhU6h#_0JwV|qW}N^ delta 312 zcmZn(XbG6$&nUYwU^hRb>|`E+>UwqtJ%%!dVuoafe1;T;)SPs~;N<+=0tN_Z22yA$ za`RnWl5+BsfHE8m3=Izb4-PtFQ7P{5GMki!tq zP{fc5beSHIpU05ynUkLkwOs&c>q;PAHu{;7l27Tru_$ljfuyYHnS`IV%c0R!psZ+qK{4A diff --git a/script_buddy/.DS_Store b/script_buddy/.DS_Store index 3ed2655647aff55c9c38c674180d12345870d760..1952803b19c42a021b3ad6b6058c55820ba58ca4 100644 GIT binary patch delta 162 zcmZn(XmOBWU|?W$DortDU;r^WfEYvza8FDWo2aKKDhZMY@);Nk7%Dw;@{^Nt@{=|u zE@t1%&cVXLD7iUDP=`sLl_8BGpCON-grOLw24n~jTLZDi=2#Is#>t1IKWxsEoyjz@ m;H4llP#6d#xPgQ#$hwV*-OVk8yj6m4F0p6UYbTXLMWq>O=d9)Y0xrxxAzuL4`V5^73KHku7;cvH0ld-{s-)?Id!SA`O((L+n;>J z;Ur6*7j#hk?$+1v)&)X!vZ*(Zey;Ljj&%ErDe3qU#73YwOCMi#h^f*|W|Q~x33F}rJinYoU2+ZkMaq+jLlf52DWGf z3$JkZj2Mks3TM_FG!4B5T&)VNP?xnPkvyog(qt=Pxn6?HFiTf?S zqLkK041h!#4Tcjur_lO{E!^XPr--GiVmFHEu43W=_L&DxoyW3j(w=58XnQWL=p{g= z?PE=Lmpy9VuRUt-^B&bEsV@IJKV3P_m%j&es4st~boDUbt6CrW@+Zrv%YR||PYeS$ zRK|%de@5jY=CiPz80s~TAE2cyx^Zb%z=!fhuhWcv<#BxYn5p2tmm)P zy>-ujtMx`P@WcMD|Jk1b-7l4}!rcG&^&6eJ|34V_|9=6|?mfH! From ef2236df40d418aa325892dbc110ccc27e5e53e7 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Jan 2026 03:54:39 +0000 Subject: [PATCH 02/10] Add aiscreenplay repository as submodule Added https://github.com/ruvnet/aiscreenplay.git as a git submodule to integrate AI screenplay generation capabilities into the project. --- .gitmodules | 3 +++ aiscreenplay | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 aiscreenplay diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..20d313c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "aiscreenplay"] + path = aiscreenplay + url = https://github.com/ruvnet/aiscreenplay.git diff --git a/aiscreenplay b/aiscreenplay new file mode 160000 index 0000000..76944cd --- /dev/null +++ b/aiscreenplay @@ -0,0 +1 @@ +Subproject commit 76944cd94a418adf6f1dbf000f2f03e34ec78e62 From 9d5f219890fa606850175303b373088b148c512c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Jan 2026 03:59:53 +0000 Subject: [PATCH 03/10] Configure and document aiscreenplay submodule - Added comprehensive setup guide (AISCREENPLAY_SETUP.md) - Updated main README to reference aiscreenplay - Enhanced aiscreenplay with modern OpenAI API integration - Added requirements.txt and run script for easy setup - Improved error handling and user experience The aiscreenplay generator is now ready to use with simple instructions for installation and running. Note: Improvements to the submodule are local only, as we cannot push to the upstream repository (ruvnet/aiscreenplay). --- AISCREENPLAY_SETUP.md | 65 +++++++++++++++++++++++++++++++++++++++++++ README.md | 19 +++++++------ 2 files changed, 76 insertions(+), 8 deletions(-) create mode 100644 AISCREENPLAY_SETUP.md diff --git a/AISCREENPLAY_SETUP.md b/AISCREENPLAY_SETUP.md new file mode 100644 index 0000000..2fb08fc --- /dev/null +++ b/AISCREENPLAY_SETUP.md @@ -0,0 +1,65 @@ +# AI Screenplay Generator Setup Guide + +The aiscreenplay submodule has been configured and improved for easy use. + +## Quick Start + +1. **Navigate to the aiscreenplay directory:** + ```bash + cd aiscreenplay + ``` + +2. **Install dependencies:** + ```bash + pip install -r requirements.txt + ``` + +3. **Set your OpenAI API key:** + ```bash + export OPENAI_API_KEY='your-api-key-here' + ``` + + Get your API key from: https://platform.openai.com/api-keys + +4. **Run the app:** + ```bash + ./run.sh + ``` + + The app will open at http://localhost:8501 + +## Improvements Made + +- ✅ Updated to use environment variables for API key (more secure) +- ✅ Modernized to use OpenAI ChatCompletion API (gpt-3.5-turbo) +- ✅ Added error handling and user-friendly messages +- ✅ Created requirements.txt for easy dependency management +- ✅ Added run.sh script for simplified startup +- ✅ Improved README with clearer instructions + +## How to Use + +Once the app is running: + +1. Fill out the scene template with your screenplay details: + - Location (e.g., "Coffee shop - interior") + - Time of day (e.g., "Morning") + - Characters (e.g., "JOHN, 30s, detective") + - Objective (what should happen) + - Conflict (obstacles characters face) + - Key dialogue + - Important actions + - Emotional tone + - Additional notes + +2. Adjust optional parameters: + - **Temperature**: Controls creativity (0.0-1.0, default 0.7) + - **P-Value**: Controls diversity (0.0-1.0, default 0.9) + +3. Click "Generate Screenplay" + +4. Copy the generated screenplay to your preferred screenwriting software + +## Note + +The improvements are stored locally in the submodule. If you want to keep them permanently, consider forking the original repository to your own GitHub account. diff --git a/README.md b/README.md index 7676ade..6606b1f 100644 --- a/README.md +++ b/README.md @@ -9,17 +9,20 @@ ![Script Buddy APP](script_buddy/images/app.gif) -## Project Structure -- *imsdb_scraper* contains the scrapy spider built to crawl IMSDB.com and download the film script data that is used to train our text generation model. +## Project Structure +- *imsdb_scraper* contains the scrapy spider built to crawl IMSDB.com and download the film script data that is used to train our text generation model. - - To run the scraper change directory to imsdb_scraper with `cd imsdb_scraper`. As I haven't built any pipelines currently to run the scraper and save it's output simply run `scrapy crawl scriptSpider -o scripts.json -t json` and for now manually move this output file to `script_buddy/data/` and you'll be good to go. + - To run the scraper change directory to imsdb_scraper with `cd imsdb_scraper`. As I haven't built any pipelines currently to run the scraper and save it's output simply run `scrapy crawl scriptSpider -o scripts.json -t json` and for now manually move this output file to `script_buddy/data/` and you'll be good to go. -- *script_buddy* contains the model fine tuning notebook, utility script parsing functions, tweepy bot code, and streamlit application code. - - If you'd like to run the streamlit app locally - - `git clone https://github.com/cdpierse/script_buddy_v2.git` +- *script_buddy* contains the model fine tuning notebook, utility script parsing functions, tweepy bot code, and streamlit application code. + - If you'd like to run the streamlit app locally + - `git clone https://github.com/cdpierse/script_buddy_v2.git` - `pip install -r requirements.txt` - `cd script_buddy` - `streamlit run app.py` - - This should open an instance of the app for you to experiment with. Running it for the first time may take a - while as the model needs to be downloaded from huggingface's model hub. + - This should open an instance of the app for you to experiment with. Running it for the first time may take a + while as the model needs to be downloaded from huggingface's model hub. + +- *aiscreenplay* contains an AI screenplay generator that creates formatted screenplays based on scene templates using OpenAI's API. + - See [AISCREENPLAY_SETUP.md](AISCREENPLAY_SETUP.md) for setup and usage instructions From 0d794260a360a269524e39299b16e7b38b64c9e0 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Jan 2026 04:01:19 +0000 Subject: [PATCH 04/10] Update aiscreenplay submodule with local improvements --- aiscreenplay | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiscreenplay b/aiscreenplay index 76944cd..b3f2de8 160000 --- a/aiscreenplay +++ b/aiscreenplay @@ -1 +1 @@ -Subproject commit 76944cd94a418adf6f1dbf000f2f03e34ec78e62 +Subproject commit b3f2de8d8750ce5967d0322860b2b0b8de6f8521 From ec4a168c0144cd4026105ea7a5b5d90a83db97a0 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Jan 2026 04:11:32 +0000 Subject: [PATCH 05/10] Update aiscreenplay with command-line generator --- aiscreenplay | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiscreenplay b/aiscreenplay index b3f2de8..9f2d44e 160000 --- a/aiscreenplay +++ b/aiscreenplay @@ -1 +1 @@ -Subproject commit b3f2de8d8750ce5967d0322860b2b0b8de6f8521 +Subproject commit 9f2d44e6a25824248db2c4a9e5feebab700cdab6 From 0a24828afa8224a4a46e8ab7cf2313c3ec703c6f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Jan 2026 04:15:43 +0000 Subject: [PATCH 06/10] Add GUI screenplay app --- aiscreenplay | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiscreenplay b/aiscreenplay index 9f2d44e..0cae57d 160000 --- a/aiscreenplay +++ b/aiscreenplay @@ -1 +1 @@ -Subproject commit 9f2d44e6a25824248db2c4a9e5feebab700cdab6 +Subproject commit 0cae57d1b027e4a681493f46487701bd9a4ec83d From 789a636e9b8778c234d1604cb553516476c0f13f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Jan 2026 05:52:24 +0000 Subject: [PATCH 07/10] Add GUI screenplay app with light/dark mode and separate Scene/Transition controls - Created comprehensive ScreenplayWriter.html with modern UI - Separate dropdown buttons for Scene (INT./EXT.) and Transition (13 types) - Light/Dark mode toggle with theme persistence - SmartType menu for quick formatting selection - Auto-indent dialogue after character names - Character dropdown with auto-population - AI Continue feature with OpenAI integration (secure - prompts for API key) - Scene navigator sidebar with auto-updates - Keyboard shortcuts and save functionality - Follows The Black List screenplay formatting standards - Removed hardcoded API keys for security --- ScreenplayWriter.html | 821 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 821 insertions(+) create mode 100644 ScreenplayWriter.html diff --git a/ScreenplayWriter.html b/ScreenplayWriter.html new file mode 100644 index 0000000..d0f6ff6 --- /dev/null +++ b/ScreenplayWriter.html @@ -0,0 +1,821 @@ + + + + + + Screenplay Writer + + + +
+
+

🎬 Screenplay Writer

+
+ + + + + + + + + + + +
+
+ +
+ +
+ + +
+ +
+
+ +
+
Scene Heading
+
Action
+
Character
+
Dialogue
+
Parenthetical
+
Transition
+
+ + + + + + From 8853fd26fa31048ccebca14e442e073423a3b037 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Jan 2026 05:55:15 +0000 Subject: [PATCH 08/10] Update aiscreenplay submodule to remove hardcoded API keys --- aiscreenplay | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiscreenplay b/aiscreenplay index 0cae57d..0365625 160000 --- a/aiscreenplay +++ b/aiscreenplay @@ -1 +1 @@ -Subproject commit 0cae57d1b027e4a681493f46487701bd9a4ec83d +Subproject commit 0365625f99662b788b357415c1bb5c9c9c39dcc9 From cfbec5181a34c7bdeef1d0b2565eff4ab6c5f23e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Jan 2026 06:47:23 +0000 Subject: [PATCH 09/10] Add complete screenplay writer app with authentication and project management Features: - Google Sign-In with demo mode option - Projects dashboard with create/open/duplicate/delete - Full screenplay editor with all formatting tools - Auto-save functionality - Light/Dark mode toggle - Character section in sidebar (no dropdown) - Parenthetical button (renamed from "Paren") - Integration between all pages - localStorage-based project storage - AI Continue feature with OpenAI integration --- screenplay_app/README.md | 151 ++++++ screenplay_app/editor.html | 962 +++++++++++++++++++++++++++++++++++ screenplay_app/index.html | 217 ++++++++ screenplay_app/projects.html | 514 +++++++++++++++++++ 4 files changed, 1844 insertions(+) create mode 100644 screenplay_app/README.md create mode 100644 screenplay_app/editor.html create mode 100644 screenplay_app/index.html create mode 100644 screenplay_app/projects.html diff --git a/screenplay_app/README.md b/screenplay_app/README.md new file mode 100644 index 0000000..72c017d --- /dev/null +++ b/screenplay_app/README.md @@ -0,0 +1,151 @@ +# Screenplay Writer App + +A professional screenplay writing application with Google authentication and project management. + +## Features + +- ✨ **AI-Powered Writing**: Continue your screenplay with AI assistance (OpenAI GPT-3.5) +- 💾 **Auto-Save**: Projects automatically save as you type +- 🎨 **Light/Dark Mode**: Toggle between light and dark themes +- 📱 **Responsive Design**: Works on all devices +- 🎬 **Professional Formatting**: Industry-standard screenplay formatting +- 👥 **Character Tracking**: Automatically tracks characters and scenes +- ⌨️ **Smart Type Menu**: Press Enter to choose element type (like Final Draft) +- 🔐 **Google Sign-In**: Secure authentication with Google account + +## Getting Started + +### Quick Start + +1. Open `index.html` in your web browser +2. Click "Continue without signing in (demo mode)" for instant access +3. Or sign in with your Google account for full functionality + +### File Structure + +- `index.html` - Sign-in page with Google OAuth +- `projects.html` - Projects dashboard showing all your screenplays +- `editor.html` - The screenplay editor with all writing tools + +## How to Use + +### Creating a Project + +1. After signing in, click "New Project" on the projects dashboard +2. Enter a project name and click "Create" +3. You'll be taken to the editor automatically + +### Writing Your Screenplay + +#### Formatting Tools + +- **Scene** - Dropdown with INT. (Interior) or EXT. (Exterior) options +- **Transition** - Dropdown with 13 standard transitions (CUT TO:, FADE IN:, etc.) +- **Character** - Adds character name with proper indentation +- **Parenthetical** - Adds parenthetical direction for dialogue +- **AI Continue** - Generate screenplay content with AI +- **Save** - Download screenplay as .txt file + +#### SmartType Menu + +Press **Enter** on a blank line to show the SmartType menu: +- Scene Heading +- Action +- Character +- Dialogue +- Parenthetical +- Transition + +Use arrow keys to select, Enter/Tab to apply, Escape to cancel. + +#### Auto-Indent + +After typing a character name in ALL CAPS, pressing Enter will automatically indent for dialogue. + +#### Keyboard Shortcuts + +- **Cmd/Ctrl + S** - Save screenplay as .txt file + +### Project Management + +- **Open** - Open a project to continue writing +- **Duplicate** - Create a copy of a project +- **Delete** - Remove a project (with confirmation) + +Projects show: +- Creation date +- Last modified date +- Word count + +### AI Continue Feature + +1. Click "✨ AI Continue" button +2. Enter a prompt for what should happen next +3. AI will generate screenplay content in proper format + +**Note**: You'll need an OpenAI API key for AI features. Get one at https://platform.openai.com/api-keys + +## Google Sign-In Setup + +To enable Google Sign-In: + +1. Go to [Google Cloud Console](https://console.cloud.google.com/) +2. Create a new project or select existing one +3. Enable Google Identity Services API +4. Create OAuth 2.0 credentials +5. Add authorized JavaScript origins (your domain) +6. Copy the Client ID +7. In `index.html`, replace `YOUR_GOOGLE_CLIENT_ID` with your actual Client ID (line 164) + +## Technology Stack + +- **Frontend**: HTML, CSS, JavaScript (Vanilla JS) +- **Authentication**: Google Identity Services +- **Storage**: localStorage (client-side) +- **AI**: OpenAI GPT-3.5 Turbo API +- **Design**: Custom CSS with light/dark mode support + +## Browser Compatibility + +Works on all modern browsers: +- Chrome/Edge (recommended) +- Firefox +- Safari + +## Data Storage + +Projects are stored in browser localStorage: +- No backend server required +- Data persists across sessions +- Stored locally on your device +- Export your work as .txt files for backup + +## Formatting Standards + +Based on **The Black List** screenplay formatting: +- Scene headings: `INT./EXT. LOCATION - DAY/NIGHT` +- Character names: ALL CAPS, centered (24 spaces indent) +- Dialogue: 10 spaces indent +- Parentheticals: 20 spaces indent, in (parentheses) +- Transitions: Right-aligned (48 spaces) +- Present tense only +- No camera directions + +## Tips + +1. **Save Regularly**: While auto-save is active, use Cmd/Ctrl+S to download backups +2. **Use Demo Mode**: Try it out without Google sign-in +3. **Dark Mode**: Toggle with 🌓 button in top right +4. **SmartType**: Use Enter key for quick formatting +5. **AI Prompts**: Be specific for better AI-generated content + +## Support + +For issues or questions, check the sidebar for: +- **SCENES** - Click to jump to any scene +- **CHARACTERS** - See all characters in your screenplay +- **Refresh** - Update the lists manually + +## License + +Part of the script_buddy_v2 project. diff --git a/screenplay_app/editor.html b/screenplay_app/editor.html new file mode 100644 index 0000000..e226393 --- /dev/null +++ b/screenplay_app/editor.html @@ -0,0 +1,962 @@ + + + + + + Screenplay Writer + + + +
+
+ +

🎬 Screenplay Writer

+
+ + + + + + + + +
+
+ +
+ +
+ + +
+
+ 012345678 +
+ +
+ +
+
+
+ +
+ Page 1 | Ready + 0 words | 0 scenes | 0 characters +
+ +
+
Scene Heading
+
Action
+
Character
+
Dialogue
+
Parenthetical
+
Transition
+
+ + + + + + diff --git a/screenplay_app/index.html b/screenplay_app/index.html new file mode 100644 index 0000000..c25cc53 --- /dev/null +++ b/screenplay_app/index.html @@ -0,0 +1,217 @@ + + + + + + Screenplay Writer - Sign In + + + + + + + + + diff --git a/screenplay_app/projects.html b/screenplay_app/projects.html new file mode 100644 index 0000000..ae2f1c6 --- /dev/null +++ b/screenplay_app/projects.html @@ -0,0 +1,514 @@ + + + + + + My Projects - Screenplay Writer + + + +
+
+ +

Screenplay Writer

+
+ +
+ +
+
+

My Projects

+ +
+ +
+ +
+ + + + + + From 3732f52183e6c3009d0abf940f0988e317b81629 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Jan 2026 17:45:15 +0000 Subject: [PATCH 10/10] Add screenplay app to docs folder for GitHub Pages deployment --- docs/editor.html | 962 +++++++++++++++++++++++++++++++++++++++++++++ docs/index.html | 217 ++++++++++ docs/projects.html | 514 ++++++++++++++++++++++++ 3 files changed, 1693 insertions(+) create mode 100644 docs/editor.html create mode 100644 docs/index.html create mode 100644 docs/projects.html diff --git a/docs/editor.html b/docs/editor.html new file mode 100644 index 0000000..e226393 --- /dev/null +++ b/docs/editor.html @@ -0,0 +1,962 @@ + + + + + + Screenplay Writer + + + +
+
+ +

🎬 Screenplay Writer

+
+ + + + + + + + +
+
+ +
+ +
+ + +
+
+ 012345678 +
+ +
+ +
+
+
+ +
+ Page 1 | Ready + 0 words | 0 scenes | 0 characters +
+ +
+
Scene Heading
+
Action
+
Character
+
Dialogue
+
Parenthetical
+
Transition
+
+ + + + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..c25cc53 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,217 @@ + + + + + + Screenplay Writer - Sign In + + + + + + + + + diff --git a/docs/projects.html b/docs/projects.html new file mode 100644 index 0000000..ae2f1c6 --- /dev/null +++ b/docs/projects.html @@ -0,0 +1,514 @@ + + + + + + My Projects - Screenplay Writer + + + +
+
+ +

Screenplay Writer

+
+ +
+ +
+
+

My Projects

+ +
+ +
+ +
+ + + + + +