smooth-app
전 세계 식품의 성분·영양·정보를 자유롭게 협업하고 공개하는 데이터베이스
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗A simpler way to browse Canadian drug shortage and discontinuation reports from Health Product Shortages Canada. The data is refreshed twice a day.
Live site: https://zeptotech.github.io/drugshortages/
This is an independent tool for healthcare professionals. It is not affiliated with Health Canada. Always confirm details with the official report, which is linked from each entry. Use at your own discretion.
late_submission flag)./ to jump to search, and a phone
layout.There is no server. A scheduled GitHub Actions job is the backend, and the site is static files served by GitHub Pages.
Midnight + noon Eastern (GitHub Actions) Anytime (browser)
┌───────────────────────────────────────┐ ┌───────────────────────────┐
│ scripts/fetch_and_diff.py │ │ index.html + app.js │
│ 1. log in to the API (repo secrets) │ │ loads data/*.json │
│ 2. pull current + recent reports │ │ search, filters, sorting │
│ 3. compare with the previous data │ │ all run in the browser │
│ 4. write data/*.json │ │ (no API calls) │
│ commit data/ → deploy GitHub Pages ───┼──►│ │
└───────────────────────────────────────┘ └───────────────────────────┘
The API password lives only in GitHub Actions secrets. The browser never talks to the API.
| Statuses | How | Requests |
|---|---|---|
active_confirmed, anticipated_shortage, to_be_discontinued | Full pull, sorted by id ascending, 100 per page (as the API requires for multi-report extraction) | ~25 |
resolved, avoided_shortage, discontinued, reversed | Updated in the last 30 days only, newest first | ~5 |
| Reports that left the current lists since the last run | One detail lookup each, to see what they became | a few |
The API allows 1,000 requests per hour, and a run uses about 30–45.
The job keeps only the English fields the site needs, compares them with the
previous snapshot, and records what changed. It aborts without touching the data
if the login fails, the API errors, or a status count suddenly drops by more than
5% from the previous run's (use --force to override a real drop). When that check
stops a run, the log lists the current status of a sample of the missing reports,
which shows whether the drop is real or the API left them out.
| File | Contents |
|---|---|
data/shortages.json | Current shortages plus those resolved or avoided in the last 30 days |
data/discontinuations.json | Upcoming discontinuations plus those discontinued or reversed in the last 30 days |
data/meta.json | Last check time and counts per status |
data/changes/YYYY-MM-DD.json | New, updated and status-changed reports for that day (last 30 days; older files are deleted) |
data/changes/index.json | Days with changes in the last 30 days, newest first |
Each report is written on its own line, so the daily data commits show exactly which reports changed.
These follow the official site's summary report:
HPS_EMAIL and HPS_PASSWORD.The workflow (.github/workflows/update-data.yml):
data/ if it
changed, and deploys.main: only redeploys the site.The job runs twice a day, 12 hours apart (GitHub cron always uses UTC):
0 5 * * *: 05:00 UTC, which is midnight EST in winter and 1 AM EDT in summer.0 17 * * *: 17:00 UTC, which is noon EST in winter and 1 PM EDT in summer.A second run on the same day adds to that day's change log rather than replacing it, so "What's new" still shows one list per day. GitHub can start scheduled runs late when it is busy, sometimes by hours, so the actual time varies.
Fetch data, using only the Python 3.9+ standard library (nothing to install):
read "HPS_EMAIL?Email: "; read -s "HPS_PASSWORD?Password: "; echo
HPS_EMAIL=$HPS_EMAIL HPS_PASSWORD=$HPS_PASSWORD python3 scripts/fetch_and_diff.py
Preview the site:
python3 -m http.server 8000
# open http://localhost:8000
The bot commits data daily, so run git pull before starting work.
The code is commented for readers new to it. app.js starts with an overview of
how the page works.
index.html, app.js, styles.css the website (no build step)
scripts/fetch_and_diff.py daily fetch, compare and write
.github/workflows/update-data.yml schedule, commit and deploy
data/ generated, committed by the bot
Data comes from the Health Product Shortages Canada public API. Only English fields are used.