{"id":46922447,"url":"https://github.com/gabrielzschmitz/bibinject","last_synced_at":"2026-03-11T03:02:29.814Z","repository":{"id":325350043,"uuid":"984464518","full_name":"gabrielzschmitz/BibInject","owner":"gabrielzschmitz","description":"Inject BibTeX into your HTML pages.","archived":false,"fork":false,"pushed_at":"2025-12-11T06:12:37.000Z","size":1468,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-12T01:54:01.053Z","etag":null,"topics":["bibtex","flask","html","latex","python"],"latest_commit_sha":null,"homepage":"https://bibinject.vercel.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabrielzschmitz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-05-16T01:26:43.000Z","updated_at":"2025-12-11T06:09:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gabrielzschmitz/BibInject","commit_stats":null,"previous_names":["gabrielzschmitz/bibinject"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/gabrielzschmitz/BibInject","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielzschmitz%2FBibInject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielzschmitz%2FBibInject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielzschmitz%2FBibInject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielzschmitz%2FBibInject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabrielzschmitz","download_url":"https://codeload.github.com/gabrielzschmitz/BibInject/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielzschmitz%2FBibInject/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30368562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bibtex","flask","html","latex","python"],"created_at":"2026-03-11T03:02:24.549Z","updated_at":"2026-03-11T03:02:29.805Z","avatar_url":"https://github.com/gabrielzschmitz.png","language":"Python","funding_links":["https://www.buymeacoffee.com/gabrielzschmitz"],"categories":[],"sub_categories":[],"readme":"# BibInject\n\n\u003cimg align=\"right\" width=\"192px\" src=\"./static/icons/logo1.2.svg\"\u003e\n  \n![Version Badge](https://img.shields.io/github/v/release/gabrielzschmitz/BibInject?color=pink)\n\u003ca href=\"./LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-green\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.buymeacoffee.com/gabrielzschmitz\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: 20px !important;width: 87px;\" \u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/gabrielzschmitz/BibInject\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/gabrielzschmitz/BibInject?style=social\" alt=\"Give me a Star\"\u003e\u003c/a\u003e\n\n**BibInject** is a Python tool for parsing `.bib` (BibTeX) files and generating\nvalid, styled HTML references. It supports injecting these references directly\ninto existing HTML files at predefined targets.\n\nBuilt with simplicity in mind, BibInject helps you keep your bibliography\norganized and presentation-ready without the overhead of complex pipelines.\nIt's perfect for blogs, project pages, or academic sites that need lightweight\ncitation integration without relying on JavaScript-based renderers or external\nservices.\n\nIncludes:\n- CLI tool and Github Actions example for automation\n- Optional Flask web interface\n\n---\n\n## 🛠️ Prerequisites\n\n- [Python 3.0+](https://www.python.org/)\n- [pip](https://pip.pypa.io/en/stable/)\n- [virtualenv](https://virtualenv.pypa.io/)\n- [Flask](https://flask.palletsprojects.com/en/stable/)\n\n---\n\n## 🚀 Installation\n\n### 1. Clone the repository\n\n```sh\ngit clone https://github.com/gabrielzschmitz/BibInject.git\ncd BibInject\n````\n\n### 2. Run the setup to install all dependencies\n\n```sh\n./setup.sh\n```\n\n---\n\n## ⚙️ CLI Usage\n\nConvert a `.bib` file and inject the result into an HTML element:\n\n```sh\n./bibinject.sh                  \\\n    --input input.bib           \\\n    --refspec apa               \\\n    --html target.html          \\\n    --target-id references      \\\n    --order desc                \\\n    --group year                \\\n    --doi-icon static/doi.svg   \\\n    output.html\n```\n\n* `--input=\u003cfile\u003e`:\n  Path to the BibTeX (`.bib`) file containing the reference entries to be\nprocessed.\n\n* `--refspec=\u003cname\u003e`:\n  Reference formatting style (e.g., `apa`, `abnt`). Determines how the\ncitations will be rendered.\n\n* `--html=\u003cfile\u003e`:\n  Path to the HTML file into which the generated reference list will be\ninjected.\n\n* `--target-id=\u003cid\u003e`:\n  The `id` attribute of the `\u003cdiv\u003e` in the HTML file where the references\nshould be inserted.\n\n* `--order=\u003casc|desc\u003e`:\n  Sorting order for the references (ascending or descending). Usually based on\nyear.\n\n* `--group=\u003cfield\u003e`:\n  Group the output by a BibTeX field (e.g., `year`, `author`). Groups are\nrendered as section headers.\n\n* `--doi-icon=\u003cpath|none\u003e`:\n  Optional DOI icon to display next to DOI links.\n\n  * Provide a path to an SVG/PNG file (e.g., `static/doi.svg`).\n\n* `\u003coutput\u003e` (positional argument):\n  Output HTML file to write, containing the injected reference list.\n\n---\n\n## 🌐 Web Interface\n\nStart a local web server:\n\n```sh\n./bibinject.sh --web\n```\n\n\u003cp align=\"center\"\u003e\n    \u003cimg align=\"center\" width=\"512px\" src=\"./static/web-ui-demo.png\"\u003e\u003cbr\u003e\n    \u003ci align=\"center\"\u003eDemonstration of the Web Interface\u003c/i\u003e\n\u003c/p\u003e\n\nThis launches a browser-friendly interface where you can upload `.bib` files,\npreview the injected output, and download the updated HTML at:\n\n`http://127.0.0.1:6969`\n\nIf you prefer not to run the app locally or install anything, you can use the\nhosted version of **BibInject** at:\n\n**[https://bibinject.vercel.app](https://bibinject.vercel.app)**\n\n---\n\n## 🔄 GitHub Action Integration\n\nYou can automate BibInject as part of your deployment workflow. An example is\nprovided in `.github/workflow/inject-on-deploy.yaml`, showing how to run\nBibInject before publishing your website. This ensures your citation list is\nalways regenerated and up-to-date on every deploy.\n\n```yaml\nname: Injection Action\n\non:\n  push:\n    branches: [ main ]\n  pull_request:\n    branches: [ main ]\n\njobs:\n  bibinject:\n    name: Injection Test\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n\n      - name: Set up Python\n        uses: actions/setup-python@v4\n        with:\n          python-version: '3.11'\n\n      - name: Clone BibInject\n        run: |\n          git clone https://github.com/gabrielzschmitz/BibInject.git tools/BibInject\n\n      - name: Install BibInject\n        run: |\n          cd tools/BibInject\n          ./setup.sh\n\n      - name: Run BibInject\n        run: |\n          cd tools/BibInject\n\n          # Inject Publications\n          ./bibinject.sh \\\n            --input ../../refs.bib \\\n            --refspec abnt \\\n            --html ../../publications.html \\\n            --target-id publications \\\n            --order desc \\\n            ../../publications.html\n\n      - name: Prepare deployment folder\n        run: |\n          mkdir public\n          shopt -s extglob\n          cp -r !(tools|public) public/\n\n      - name: Upload artifact\n        uses: actions/upload-pages-artifact@v2\n        with:\n          path: public/\n\n# Deploy your page only after BibInject has completed.\n#  deploy:\n#    needs: build\n#    runs-on: ubuntu-latest\n#    environment:\n#      name: github-pages\n#      url: ${{ steps.deployment.outputs.page_url }}\n#\n#    steps:\n#      - name: Deploy to GitHub Pages\n#        id: deployment\n#        uses: actions/deploy-pages@v4\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE)\nfile for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielzschmitz%2Fbibinject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielzschmitz%2Fbibinject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielzschmitz%2Fbibinject/lists"}