|
1 | 1 | # PROCEDURE FOR ADDING PUBLICATIONS |
2 | 2 |
|
| 3 | +**Lab website publications** come from the central repo. Do not edit `src/data/publications_by_year.json` by hand—it is generated by the sync script. |
| 4 | + |
| 5 | +**Full pipeline:** See the central repo doc |
| 6 | +`/Users/tserre/Projects/prj_cv/CENTRAL_TO_LAB_AND_CV_WORKFLOW.md` |
| 7 | + |
3 | 8 | ## CENTRAL SOURCE OF TRUTH |
4 | 9 | **Location:** `/Users/tserre/Projects/prj_cv/data/publications_structured.json` |
5 | 10 |
|
6 | | -This is the SINGLE file that controls all publications for both CV and lab website. |
| 11 | +Single source for both CV and lab website. Edit that file, then run the pipeline scripts. |
7 | 12 |
|
8 | | -## STEP-BY-STEP PROCEDURE |
| 13 | +## PIPELINE (run after editing central file) |
9 | 14 |
|
10 | | -### 1. Edit the Central File |
11 | | -Edit `/Users/tserre/Projects/prj_cv/data/publications_structured.json` |
| 15 | +### 1. Edit Central File |
| 16 | +Edit `/Users/tserre/Projects/prj_cv/data/publications_structured.json`. |
| 17 | +Use the **official published URL** (Cell, OpenReview, etc.) once a paper is published; arXiv only for preprints. |
12 | 18 |
|
13 | | -**Structure:** |
14 | | -```json |
15 | | -{ |
16 | | - "under_review": [ |
17 | | - { |
18 | | - "title": "Paper Title", |
19 | | - "authors": "Author1, Author2 & T. Serre", |
20 | | - "journal": "Journal Name", |
21 | | - "url": "https://arxiv.org/abs/XXXX", |
22 | | - "year": "2025" |
23 | | - } |
24 | | - ], |
25 | | - "peer_reviewed": [...], |
26 | | - "unpublished_preprints": [...] |
27 | | -} |
| 19 | +### 2. Sync to This Repo (Lab Website) |
| 20 | +From this repo: |
| 21 | +```bash |
| 22 | +cd /Users/tserre/Projects/Lab-Website |
| 23 | +python3 scripts/sync_from_central_publications.py |
28 | 24 | ``` |
| 25 | +This overwrites `src/data/publications_by_year.json` from the central file (and keeps existing `pdfPath` values). |
29 | 26 |
|
30 | | -**Conventions:** |
31 | | -- Use † for first equal authors, ‡ for last equal authors |
32 | | -- Use sentence case capitalization (first word + after colons) |
33 | | -- Include arXiv URLs when available |
34 | | -- Place new papers at bottom of appropriate year section |
35 | | - |
36 | | -### 2. Regenerate CV |
| 27 | +### 3. Regenerate CV (in central repo) |
37 | 28 | ```bash |
38 | 29 | cd /Users/tserre/Projects/prj_cv/scripts |
39 | | -python generate_cv.py |
| 30 | +python3 generate_cv.py |
40 | 31 | ``` |
41 | 32 |
|
42 | | -### 3. Update Lab Website |
43 | | -**Option A:** Edit HTML source in `/Users/tserre/Projects/Lab-Website/public/misc/publications` |
44 | | -**Option B:** Run lab website update scripts (if available) |
45 | | - |
46 | | -### 4. Commit Changes |
| 33 | +### 4. Rebuild and Deploy |
47 | 34 | ```bash |
48 | | -cd /Users/tserre/Projects/prj_cv |
49 | | -git add -A |
50 | | -git commit -m "Add new publication: [Title]" |
51 | | -git push origin main |
| 35 | +cd /Users/tserre/Projects/Lab-Website |
| 36 | +npm run build |
| 37 | +# then your normal deploy (e.g. push to trigger GitHub Actions) |
52 | 38 | ``` |
53 | 39 |
|
54 | 40 | ## CRITICAL RULES |
55 | | -- ✅ ALWAYS edit the central JSON file first |
56 | | -- ✅ NEVER edit generated LaTeX files directly |
57 | | -- ✅ Use consistent formatting conventions |
58 | | -- ❌ Never edit `/Users/tserre/Projects/prj_cv/latex/serre_cv.tex` directly |
59 | | -- ❌ Never edit `/Users/tserre/Projects/prj_cv/latex/serre_cv.pdf` directly |
| 41 | +- ✅ Update the central file first, then run `sync_from_central_publications.py` |
| 42 | +- ❌ Do not edit `src/data/publications_by_year.json` directly—it is produced by the sync script |
| 43 | +- The file `src/data/officialPublicationUrls.js` is a display override map; keep it in sync with central when you add official links so it mirrors the single source of truth |
60 | 44 |
|
61 | 45 | ## VERIFICATION |
62 | | -1. Check generated CV PDF looks correct |
63 | | -2. Check lab website displays correctly |
64 | | -3. Ensure both sources are identical |
| 46 | +1. Central file has the correct URL for published papers |
| 47 | +2. After sync, lab website publications page shows the correct link |
| 48 | +3. CV PDF matches central data |
0 commit comments