{"id":22986568,"url":"https://github.com/lolei/authorfix","last_synced_at":"2026-04-16T03:32:14.580Z","repository":{"id":92315106,"uuid":"251001430","full_name":"LoLei/authorfix","owner":"LoLei","description":"Fix common exported BibTeX author formatting in Python (and Vim) :scroll:","archived":false,"fork":false,"pushed_at":"2020-09-19T11:37:48.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-23T22:59:26.792Z","etag":null,"topics":["author","bibtex","latex","python","vim"],"latest_commit_sha":null,"homepage":"","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/LoLei.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}},"created_at":"2020-03-29T10:02:11.000Z","updated_at":"2020-09-19T11:37:50.000Z","dependencies_parsed_at":"2023-05-16T20:30:56.654Z","dependency_job_id":null,"html_url":"https://github.com/LoLei/authorfix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LoLei/authorfix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoLei%2Fauthorfix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoLei%2Fauthorfix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoLei%2Fauthorfix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoLei%2Fauthorfix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LoLei","download_url":"https://codeload.github.com/LoLei/authorfix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoLei%2Fauthorfix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31870506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":["author","bibtex","latex","python","vim"],"created_at":"2024-12-15T03:50:40.451Z","updated_at":"2026-04-16T03:32:14.546Z","avatar_url":"https://github.com/LoLei.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# authorfix\nFix common exported BibTeX author formatting in Python (and Vim) :scroll:\n\n## Info\nThis script changes `Lastname, Firstname` to `Firstname Lastname` (in LaTeX BibTeX bibliography entries).\n\nA common exporting format of BibTeX on e.g. scholar.google.com is this (sample article):\n```\n@article{fournier2017survey,\n  title={A survey of sequential pattern mining},\n  author={Fournier-Viger, Philippe and Lin, Jerry Chun-Wei and Kiran, Rage Uday and Koh, Yun Sing and Thomas, Rincy},\n  journal={Data Science and Pattern Recognition},\n  volume={1},\n  number={1},\n  pages={54--77},\n  year={2017}\n}\n```\n\nNotice the formatting of the authors:\n`Fournier-Viger, Philippe and Lin, Jerry Chun-Wei and Kiran, Rage Uday and Koh, Yun Sing and Thomas, Rincy`\n\nRunning this script on this string changes it to:\n`Philippe Fournier-Viger and Jerry Chun-Wei Lin and Rage Uday Kiran and Yun Sing Koh and Rincy Thomas`\n\n## Vim Macro\nAdd this to your `.vimrc`:\n```vimscript\nvnoremap \u003cleader\u003eaf c\u003cC-R\u003e=system('authorfix', getreg('\"'))[:-2]\u003cCR\u003e\u003cESC\u003ex\n```\n\n`authorfix` needs to be in your `PATH` for this.\n\n## Installation\n```bash\ncurl \\\n  -L https://raw.githubusercontent.com/lolei/authorfix/master/authorfix.py \\\n  -o $HOME/.local/bin/authorfix \u0026\u0026 chmod +x $HOME/.local/bin/authorfix\n```\n\n## Additional Resources\nI use additional automatic fixes in Vim for imported BibTeX entries:\n* [Title Case Capitalization](https://github.com/nickjj/title-case-converter)\n* [Converting `{}` to `\"\"`](https://github.com/LoLei/dotfiles/blob/d2d3fb97f654710c64cbac828db3937ebc30904b/.vimrc#L150)\n\n## Background\n* Inspired by [nickjj/title-case-converter](https://github.com/nickjj/title-case-converter)\n* I had a working regex to to the same in sed, but for some reason in wouldn't work in vim: `s/\\v(?!and\\b)\\b([[:alpha:]-]+ ?[[:alpha:]-]*)(,) ([[:alpha:]-]+ ?[[:alpha:]-]*)\\b(?\u003c!\\b and)/\\3 \\1/g`\n  * Also this Python version handles if a person has multiple last names, and will enclose them in `{}`, which makes LaTeX use them correctyl in citations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flolei%2Fauthorfix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flolei%2Fauthorfix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flolei%2Fauthorfix/lists"}