{"id":48054982,"url":"https://github.com/poseidon-framework/paper-directory","last_synced_at":"2026-04-04T14:25:35.586Z","repository":{"id":272992886,"uuid":"884500965","full_name":"poseidon-framework/paper-directory","owner":"poseidon-framework","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-02T06:16:42.000Z","size":355,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-04-02T19:57:16.150Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.poseidon-adna.org/paper-directory","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poseidon-framework.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-06T21:37:22.000Z","updated_at":"2026-04-02T06:16:47.000Z","dependencies_parsed_at":"2025-02-10T21:23:50.274Z","dependency_job_id":"514f87de-3f6c-4ffa-81c0-47a2f67617d2","html_url":"https://github.com/poseidon-framework/paper-directory","commit_stats":null,"previous_names":["poseidon-framework/paper-check","poseidon-framework/paper-directory"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/poseidon-framework/paper-directory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poseidon-framework%2Fpaper-directory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poseidon-framework%2Fpaper-directory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poseidon-framework%2Fpaper-directory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poseidon-framework%2Fpaper-directory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poseidon-framework","download_url":"https://codeload.github.com/poseidon-framework/paper-directory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poseidon-framework%2Fpaper-directory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31402409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T14:25:30.470Z","updated_at":"2026-04-04T14:25:35.573Z","avatar_url":"https://github.com/poseidon-framework.png","language":"Python","readme":"\n\n## 💡 What does this script do?\nThis script reads a list of DOIs from `list.txt`, fetches metadata from **CrossRef API**, and checks if those papers exist in **Poseidon Archives** (`community-archive`, `aadr-archive`, `minotaur-archive`). It then generates an **HTML table (`index.html`)** displaying:\n\n✔ Paper title  \n✔ Publication year \u0026 exact date  \n✔ First author’s name  \n✔ Journal name  \n✔ Availability in Poseidon archives (✔ or ✘)  \n✔ A **search bar** for filtering by title  \n✔ **Dropdown filters** for the archives  \n\nEvery time `list.txt` is updated and a commit is pushed, this script runs and updates `index.html` on GitHub Pages.\n\n---\n\n## ⚙️ Technical Requirements\n- **Python Version:** Python 3.x  \n- **Required Libraries:**  \n  ```bash\n  pip install requests Jinja2\n  ```\n- **Files:**  \n  - `list.txt` → List of DOIs (one per line)  \n  - `base_script.py` → The main script  \n  - `index.html` → The generated output file  \n\n---\n\n## 🔍 How the Functions Work\n\n### 1️⃣ `get_crossref_metadata(doi, index, total)`\nFetches metadata from CrossRef API.  \nExtracts **title, year, journal, date, first author’s name**.  \nFormats publication date into **YYYY-MM-DD**.  \nPrints **progress updates** like:  \n   ```\n   (1 / 100) Querying metadata for 10.1002/ajpa.23312\n   ```\n   \n### 2️⃣ `fetch_poseidon_bibliography(archive_name)`\nCalls Poseidon API to check available DOIs for a given archive.  \nExtracts **DOI list** from `community-archive`, `aadr-archive`, and `minotaur-archive`.  \nPrints **status messages** while fetching:  \n   ```\n   Fetching DOI data from community-archive...\n   ```\n\n### 3️⃣ `load_poseidon_doi_map()`\nCollects all available DOIs from **all Poseidon archives**.  \nStores data in a dictionary mapping **DOIs → available archives**.\n\n### 4️⃣ `preprocess_doi(doi)`\nCleans up DOI format by removing extra spaces \u0026 \"https://doi.org/\".\n\n### 5️⃣ `check_for_duplicates(dois)`\nChecks `list.txt` for duplicate DOIs.  \nIf duplicates are found, it **prints a warning**:  \n   ```\n   WARNING: Duplicate DOIs found:\n   - 10.1002/ajpa.23312\n   ```\n\n### 6️⃣ `generate_html(papers, output_file)`\nCreates **index.html** using a **Jinja2 template**.  \nAdds search bar to filter by **title**.  \nAdds dropdown filters to show/hide papers based on Poseidon archive availability.  \nFormats clickable DOI links like this:  \n   ```\n   \u003ca href=\"https://doi.org/10.1002/ajpa.23312\"\u003e10.1002/ajpa.23312\u003c/a\u003e\n   ```\nPrints progress while updating:  \n   ```\n   Updating index.html...\n   index.html successfully updated!\n   ```\n\n---\n\n## 🚀 How to Run the Script\n1. Add **DOIs** to `list.txt` (one per line).  \n2. Run the script:  \n   ```bash\n   python base_script.py\n   ```\n3. Open `index.html` to see the results!  \n\n---\n\nThis is a **fully automated workflow** that updates the table and deploys it to **GitHub Pages** whenever `input.txt` changes.\n\n**GitHub Actions Workflow** runs everything behind the scenes. No manual updates needed!\n\n\n## Testing locally\n\nTo run the script locally, you can try `python3 base_script.py`. Likely you will be required to first install libraries `requests` and `jinja2`. You can do that by creating a virtual environment, for example:\n\n```{bash}\npython3 -m venv ~/venv/paper-directory\nsource ~/venvs/paper-directory/bin/activate\npython3 -m pip install requests\npython3 -m pip install jinja2\n```\n\nThen `python3 base_script.py` should generate the page.\n\nYou can then run a test server:\n\n`python3 -m http.server --directory docs 8000`\n\nand open `http://localhost:8000` in your browser.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposeidon-framework%2Fpaper-directory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposeidon-framework%2Fpaper-directory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposeidon-framework%2Fpaper-directory/lists"}