Skip to content

Commit 1614031

Browse files
committed
move python scripts and corresponding jsons to scripts/ directory
1 parent 3d0582f commit 1614031

7 files changed

Lines changed: 19 additions & 6130 deletions

File tree

docs/keynoter-scheduling.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ live site before the script can use it.
5656
5757
## Step 2 — Prepare the post copy (`keynoters.json`)
5858

59-
All post text lives in `keynoters.json`
59+
All post text lives in `scripts/keynoters.json`
6060

6161
```json
6262
{
@@ -89,11 +89,11 @@ script in Step 3.
8989

9090
## Step 3 — Schedule posts via Buffer
9191

92-
The scheduling script is `buffer-keynoters.py`. Run it once per keynoter.
92+
The scheduling script is `scripts/buffer-keynoters.py`. Run it once per keynoter.
9393

9494
### Configure the script
9595

96-
Open `buffer-keynoters.py` and edit the two lines at the top:
96+
Open `scripts/buffer-keynoters.py` and edit the two lines at the top:
9797

9898
```python
9999
KEYNOTER = "Leah Wasser" # must match the key in keynoters.json exactly
@@ -108,7 +108,7 @@ needed.
108108
### Preview before posting
109109

110110
```bash
111-
python buffer-keynoters.py --dry-run
111+
python scripts/buffer-keynoters.py --dry-run
112112
```
113113

114114
This prints the first 200 characters of the post for each platform without
@@ -118,7 +118,7 @@ right keynoter is selected.
118118
### Run
119119

120120
```bash
121-
python buffer-keynoters.py
121+
python scripts/buffer-keynoters.py
122122
```
123123

124124
The script will:

docs/social-media-scheduling.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,23 @@ speaker → speaker → sponsor → speaker → partner → (repeat)
109109
Regenerate it by hitting the API endpoint while the dev server is running:
110110

111111
```bash
112-
curl -s http://localhost:4321/api/media/combined_socials_queue > src/pages/api/media/combined_socials_queue.json
112+
curl -s http://localhost:4321/api/media/combined_socials_queue > scripts/combined_socials_queue.json
113113
```
114114

115-
This overwrites `src/pages/api/media/combined_socials_queue.json` with all items
115+
This overwrites `scripts/combined_socials_queue.json` with all items
116116
sorted and interleaved.
117117

118118
> **Note:** There are two queue files:
119119
>
120-
> - `combined_socials_queue.json` — the freshly generated queue, used as the
120+
> - `scripts/combined_socials_queue.json` — the freshly generated queue, used as the
121121
> source of truth and read by `buffer-scheduling.py`
122-
> - `combined_socials_queue_2026.json` — the manually curated queue that
122+
> - `scripts/combined_socials_queue_2026.json` — the manually curated queue that
123123
> preserves already-scheduled posts at the top; new entries are appended after
124124
> the last scheduled position
125125
126126
When new speakers or sponsors are added, regenerate
127-
`combined_socials_queue.json` and then merge the new entries into
128-
`combined_socials_queue_2026.json` manually — keeping already-posted entries
127+
`scripts/combined_socials_queue.json` and then merge the new entries into
128+
`scripts/combined_socials_queue_2026.json` manually — keeping already-posted entries
129129
intact and appending only new/unposted ones.
130130

131131
### Session types and labels
@@ -150,7 +150,7 @@ Sponsors are split into two buckets:
150150
Financial Aid
151151

152152
If a new sponsor tier is added, update `commercialTiers` in
153-
`src/pages/api/media/combined_socials_queue.ts`.
153+
`src/pages/api/media/combined_socials_queue.ts` (this file stays in the API layer).
154154

155155
### Manual queue adjustments
156156

@@ -160,7 +160,7 @@ reorder entries. For example, to swap two sponsors:
160160
```python
161161
python3 -c "
162162
import json
163-
path = 'src/pages/api/media/combined_socials_queue.json'
163+
path = 'scripts/combined_socials_queue.json'
164164
with open(path) as f:
165165
q = json.load(f)
166166
q[2], q[17] = q[17], q[2] # swap positions 3 and 18 (0-indexed)
@@ -169,7 +169,7 @@ with open(path, 'w') as f:
169169
"
170170
```
171171

172-
`src/pages/api/media/combined_socials_queue.json` is committed to the repo. Any
172+
`scripts/combined_socials_queue.json` is committed to the repo. Any
173173
manual reordering should be committed so the intentional order is preserved and
174174
not lost when the queue is regenerated.
175175

@@ -233,7 +233,7 @@ Buffer operates as a FIFO queue against pre-configured time slots:
233233
> remove them one by one. Before each run, open Buffer and verify the number and
234234
> cadence of slots for each channel matches your intended rollout pace.
235235
236-
The scheduling script is at `src/pages/api/media/buffer-scheduling.py`.
236+
The scheduling script is at `scripts/buffer-scheduling.py`.
237237

238238
### Configuration
239239

@@ -251,13 +251,13 @@ the results, increment the range for subsequent runs.
251251
### Running the script
252252

253253
```bash
254-
uv run python src/pages/api/media/buffer-scheduling.py
254+
uv run python scripts/buffer-scheduling.py
255255
```
256256

257257
Or with your venv activated:
258258

259259
```bash
260-
python src/pages/api/media/buffer-scheduling.py
260+
python scripts/buffer-scheduling.py
261261
```
262262

263263
### What it does
@@ -292,8 +292,8 @@ python src/pages/api/media/buffer-scheduling.py
292292
After each successful run, note the last `QUEUE_END` value. The next run should
293293
set `QUEUE_START = previous QUEUE_END + 1`.
294294

295-
The script reads from `combined_socials_queue.json` by default. When switching
296-
to the curated `combined_socials_queue_2026.json`, update `queue_path` in the
295+
The script reads from `scripts/combined_socials_queue.json` by default. When switching
296+
to the curated `scripts/combined_socials_queue_2026.json`, update `queue_path` in the
297297
script accordingly.
298298

299299
Already scheduled as of June 2026:

src/pages/api/media/buffer-scheduling.py

Lines changed: 0 additions & 158 deletions
This file was deleted.

0 commit comments

Comments
 (0)