Skip to content

Commit ec86662

Browse files
mb-westoverclaude
andcommitted
Fix quotes sync process and enhance project documentation
- Fix quotes sync GitHub Action to use hardcoded spreadsheet ID - Simplify workflow by removing placeholder replacement logic - Add comprehensive README documentation covering data sources, image categories, and automation - Resolve quotes not updating on website issue 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 942f9cc commit ec86662

3 files changed

Lines changed: 158 additions & 15 deletions

File tree

.github/workflows/sync-team-data.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,9 @@ jobs:
4949
- name: Sync Quotes from Google Sheets
5050
env:
5151
SERVICE_ACCOUNT_KEY: ${{ secrets.SERVICE_ACCOUNT_KEY }}
52-
QUOTES_SPREADSHEET_ID: ${{ secrets.QUOTES_SPREADSHEET_ID }}
5352
run: |
54-
# Update the quotes sync script with the spreadsheet ID
55-
if [ -n "$QUOTES_SPREADSHEET_ID" ]; then
56-
sed -i "s/YOUR_QUOTES_SPREADSHEET_ID_HERE/$QUOTES_SPREADSHEET_ID/g" sync_quotes_from_sheets.py
57-
58-
# Run the quotes sync script
59-
python sync_quotes_from_sheets.py
60-
else
61-
echo "QUOTES_SPREADSHEET_ID not set, skipping quotes sync"
62-
fi
53+
# Run the quotes sync script (uses hardcoded spreadsheet ID)
54+
python sync_quotes_from_sheets.py
6355
6456
- name: Sync News from Google Sheets
6557
env:
@@ -68,10 +60,14 @@ jobs:
6860
run: |
6961
# Update the news sync script with the spreadsheet ID
7062
if [ -n "$NEWS_SPREADSHEET_ID" ]; then
71-
sed -i "s/YOUR_NEWS_SPREADSHEET_ID_HERE/$NEWS_SPREADSHEET_ID/g" sync_news_from_sheets.py
63+
# Create a temporary copy with the spreadsheet ID
64+
sed "s/YOUR_NEWS_SPREADSHEET_ID_HERE/$NEWS_SPREADSHEET_ID/g" sync_news_from_sheets.py > sync_news_temp.py
7265
7366
# Run the news sync script
74-
python sync_news_from_sheets.py
67+
python sync_news_temp.py
68+
69+
# Clean up temporary file
70+
rm sync_news_temp.py
7571
else
7672
echo "NEWS_SPREADSHEET_ID not set, skipping news sync"
7773
fi

README.md

Lines changed: 149 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,155 @@
22

33
This is the website of our research group at Harvard Medical School / Beth Israel Deaconess Medical Center / Massachusetts General Hospital / Broad Institute.
44

5-
This design of this website is modified from http://www.allanlab.org/. Plese feel free to copy and modify for your own purposes.
5+
## Overview
66

7-
Go to *aboutwebsite.md* to learn how to copy and modify this page for your purpose.
7+
This Jekyll-based website serves as the digital presence for the Clinical Data Animation Center (CDAC) and Brain Data Science Platform (BDSP). The site includes information about our research, team members, publications, news, and resources.
8+
9+
## Features
10+
11+
- **Responsive Design**: Built with Bootstrap for mobile-friendly viewing
12+
- **Dynamic Content**: Automatically synced data from Google Sheets and PubMed
13+
- **Research Showcase**: Organized publications by research themes
14+
- **Team Management**: Comprehensive team member profiles and roles
15+
- **News & Updates**: Regular updates on lab activities and achievements
16+
17+
## Automated Data Synchronization
18+
19+
The website includes several automated processes that keep content up-to-date:
20+
21+
### Scheduled Jobs (Daily at 2 AM Eastern)
22+
23+
1. **Team Data Sync**: Updates team member information from Google Sheets
24+
- Syncs faculty, postdocs, students, staff, alumni, and collaborators
25+
- Updates photos, bios, roles, and contact information
26+
27+
2. **Quotes Sync**: Updates Brandon's quotes page from the CDAC_QUOTES Google Sheet
28+
- Organizes quotes by category with automatic table of contents
29+
- Maintains proper markdown formatting
30+
31+
3. **News Sync**: Updates lab news from Google Sheets
32+
- Chronological news feed with automatic date formatting
33+
34+
4. **Publications Sync**: Fetches latest publications from PubMed
35+
- Automatically categorizes by research themes
36+
- Updates publication counts and recent papers
37+
38+
### Manual Triggers
39+
40+
All automated jobs can also be triggered manually via GitHub Actions for immediate updates.
41+
42+
## File Structure
43+
44+
```
45+
├── _data/ # YAML data files (team, publications, news)
46+
├── _includes/ # Reusable HTML components
47+
├── _layouts/ # Page templates
48+
├── _pages/ # Main content pages
49+
├── _sass/ # Styling (Bootstrap customization)
50+
├── images/ # Static images and photos
51+
├── .github/workflows/ # GitHub Actions for automation
52+
├── sync_*.py # Data synchronization scripts
53+
└── scrapeNCBI/ # PubMed scraping utilities
54+
```
55+
56+
## Local Development
57+
58+
1. Install Jekyll and dependencies:
59+
```bash
60+
gem install bundler jekyll
61+
bundle install
62+
```
63+
64+
2. Run locally:
65+
```bash
66+
bundle exec jekyll serve
67+
```
68+
69+
3. View at `http://localhost:4000`
70+
71+
## Data Sources & Content Management
72+
73+
### External Data Sources (Automatically Synced)
74+
75+
1. **Google Sheets**
76+
- **Team Data**: Faculty, postdocs, students, staff, alumni, and collaborator information
77+
- **CDAC_QUOTES**: Brandon's quote collection organized by category
78+
- **News**: Lab announcements, achievements, and updates
79+
80+
2. **PubMed/NCBI**: Research publications automatically categorized by research themes
81+
82+
### Local Content Storage
83+
84+
#### Images (`/images/`)
85+
86+
- **`logopic/`**: Institutional logos (HMS, MGH, BIDMC, Broad Institute, etc.)
87+
- **`teampic/`**: Team member photos and headshots
88+
- Individual photos for faculty, students, staff
89+
- Original backup copies in `original_backup/` subdirectory
90+
- **`picpic/`**: Lab photos and social events
91+
- **`Gallery/`**: Photo gallery for lab activities, conferences, social events
92+
- **`pubpic/`**: Publication-related images and figures
93+
- **`respic/`**: Research-related graphics and animations
94+
- **`slider7001400/`**: Homepage carousel images (research highlights)
95+
- Includes resized versions and `originals/` subdirectory
96+
- **`newspic/`**: News and announcement related images
97+
98+
#### Downloadable Content (`/downloads/`)
99+
100+
- **Research Papers**: PDFs of key publications (numbered 1-11+)
101+
- **CV**: Brandon's academic CV
102+
- **Guidelines & Protocols**:
103+
- ICU-EEG monitoring protocols
104+
- CONSORT diagrams
105+
- TRIPOD checklists
106+
- **Presentations**: Conference presentations (IFCN, etc.)
107+
- **Documentation**: User guides, methodology papers
108+
- **Manuscripts**: Working drafts and submissions
109+
110+
#### Structured Data (`/_data/`)
111+
112+
**Team Information:**
113+
- `faculty.yml`: Faculty member profiles
114+
- `postdocsStudentsStaff.yml`: Current lab members
115+
- `alumni.yml`: Former lab members
116+
- `collaborators.yml`: External collaborators
117+
- `engineering.yml`: Technical staff and engineers
118+
119+
**Publications (Research Theme Categories):**
120+
- `publist.yml`: Main publication list
121+
- Theme-specific YAML files:
122+
- `yamlML_AI.yml`: Machine learning and AI
123+
- `yamleeg.yml`: EEG-related research
124+
- `yamlseizures.yml`: Seizure detection/prediction
125+
- `yamlsleepStaging.yml`: Sleep research
126+
- `yamlcEEG.yml`: Continuous EEG monitoring
127+
- `yamlbrainAge.yml`: Brain age modeling
128+
- `yamlcovid.yml`: COVID-19 related studies
129+
- `yamlcardiacArrest.yml`: Cardiac arrest outcomes
130+
- `yamlSAH.yml`: Subarachnoid hemorrhage
131+
- `yamldelirium.yml`: Delirium assessment
132+
- And 20+ other specialized research themes
133+
134+
**Other Data:**
135+
- `news.yml`: Lab news and announcements
136+
- `pictures_CCNL.yml`: Photo gallery metadata
137+
- `wordCloudAbstracts.txt`: Text for generating word clouds
138+
139+
### Content Update Methods
140+
141+
- **Automated (Daily)**: Team data, quotes, news from Google Sheets; publications from PubMed
142+
- **Manual**: Static pages, images, downloadable content, theme categorizations
143+
- **Semi-automated**: Publication theme tagging (manual tagging, automatic organization)
144+
145+
## GitHub Pages Deployment
146+
147+
The site is automatically deployed to GitHub Pages on every push to the `gh-pages` branch. The automated sync jobs also commit changes directly to this branch.
148+
149+
## Credits
150+
151+
Website design originally based on the Allan Lab template (http://www.allanlab.org/).
152+
Heavily modified and enhanced for the CDAC/BDSP research group needs.
153+
154+
## License
8155

9156
Copyright CDAC. Code released under the MIT License.

sync_quotes_from_sheets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Scopes for read-only access
1313
SCOPES = ['https://www.googleapis.com/auth/spreadsheets.readonly']
1414

15-
# Your Google Sheets ID (update this with your quotes sheet ID)
15+
# Your Google Sheets ID - CDAC_QUOTES spreadsheet
1616
SPREADSHEET_ID = '1HeU0368kUL7J4dIY8Lv-Pknd9UyrmI_rZ6J50aivNKM'
1717

1818
# Sheet name and range

0 commit comments

Comments
 (0)