{"id":17874265,"url":"https://github.com/jomy10/refs","last_synced_at":"2025-04-03T00:13:02.248Z","repository":{"id":44308614,"uuid":"452282346","full_name":"Jomy10/refs","owner":"Jomy10","description":"A simple cli for generating APA-style references from a JSON file.","archived":false,"fork":false,"pushed_at":"2023-01-21T16:32:07.000Z","size":11722,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T15:18:00.434Z","etag":null,"topics":["apa-format","apa-style","citations","reference-manager","references","template-engine","templates"],"latest_commit_sha":null,"homepage":"https://jomy10.github.io/refs","language":"Ruby","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/Jomy10.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}},"created_at":"2022-01-26T13:17:09.000Z","updated_at":"2022-02-10T17:40:42.000Z","dependencies_parsed_at":"2023-02-12T11:30:54.923Z","dependency_job_id":null,"html_url":"https://github.com/Jomy10/refs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jomy10%2Frefs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jomy10%2Frefs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jomy10%2Frefs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jomy10%2Frefs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jomy10","download_url":"https://codeload.github.com/Jomy10/refs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246911467,"owners_count":20853657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["apa-format","apa-style","citations","reference-manager","references","template-engine","templates"],"created_at":"2024-10-28T11:08:15.006Z","updated_at":"2025-04-03T00:13:02.223Z","avatar_url":"https://github.com/Jomy10.png","language":"Ruby","readme":"# Refs\nThis cli takes in a json file and spits out references in the APA format.\nIt was created as a helper tool for my master thesis.\n\n## Showcase\n\n![showcase](assets/showcase.gif)\n\n\nThe following commands and flags are available:\n\n## Overview\n\n### Read\n\n```bash\nrefs read references.json\n```\n\nReads the references from `references.json` and spits out the references formatted in APA style.\n\n### Save\n\n```bash\nrefs save references.json\n```\n\nSaves the file path in the config directory for easy acces:\n\nWhen you now call\n\n```bash\nrefs\n```\n\nThis will have the same behaviour as `refs read references.json`.\n\n### Add\nIf you don't want to edit the JSON file to add a new reference, you can use the\n`add` command. If you have a JSON file saved (using `save`):\n\n```bash\nrefs add\n```\nor\n```bash\nrefs add article\n```\n\nYou can also pass in a file to add it to:\n\n```bash\nrefs add article file.json\n```\n\nThis will take you to some prompts for input. Fields like `volume`, `issue`, `page` and\n`wos_link` are optional.\n\n### Flags\n\n#### -u\nThe `-u` flag will print out the references unstyled (see showcase gif).\n\n#### -i\nThe `-i` flag will print out the reference with the specified index.\n\n```bash\n# One reference\n$ refs -i 4\n[4] Churchill, N. C. \u0026 Lewis, V. L. (1983). The five stages of small business growth. Harverd Business Review, 61(3), 30-50.\n\n# Multiple references\n$ refs -i 4 -i 5\n[4] Churchill, N. C. \u0026 Lewis, V. L. (1983). The five stages of small business growth. Harverd Business Review, 61(3), 30-50.\n[5] Ward, C. \u0026 Ramachandran, V. (2010, December). Crowdfunding the next hit: Microfunding online experience goods. In Workshop on computational social science and the wisdom of crowds at NIPS2010, 1-5.\n\n$ refs -i 4,5\n# Equivalent to the previous command\n```\n\n#### -s, --short (unimplemented)\nPrints out the short version for referencing inside of text.\n\ne.g.\n```bash\n# Long version\nChurchill, N. C. \u0026 Lewis, V. L. (1983). The five stages of small business growth. Harverd Business Review, 61(3), 30-50.\n\n# Short versions\nChurchill, N. C. \u0026 Lewis, V. L. (1983)\n(Churchill, N. C. \u0026 Lewis, V. L., 1983)\n```\n\n#### -c\nCounts the amount of references (can be combined with -o to only count used references)\n\n#### -o\nOnly shows used references.\n\n#### -s, --search\nSearches through the references. Accepts regex as an argument\n\n#### -n \nOutputs the references without numbers\n\n#### -h, --help (unimplemented)\nPrints the help message\n\nThat is currently it for this cli, more things coming like adding a new reference to the file via the command line, printing out the short reference for referencing inside of your text, adding an new reference using bibtex, maybe an installer, etc.\n\n```\n\n## Replacing citations in text using templates\n\nYou can find more information on the refs template cli [here](template-engine)\n\n## Json file\n\nThe json file contains your referenes and has following structure:\n\n```json\n[\n  {\n    /*Reference 1*/\n  }, {\n    /*Reference 2*/\n  }\n]\n```\n\nThere are currently 2 types of references:\n\n### Article\n\n```json\n{\n  \"title\": \"Crowdfunding: tapping the right crowd\",\n  \"authors\": [\"Belleflamme, P.\", \"Lambert, T.\", \"Schwienbacher, A.\"],\n  \"year\": \"2014\",\n  \"journal\": \"Journal of busines venturing\",\n  \"volume\": 29,\n  \"issue\": 5,\n  \"page\": \"585-609\",\n  \"wos_link\": \"https://www.webofscience.com/wos/woscc/full-record/WOS:000340337400001\",\n  \"used\": true,\n  \"uid\": 1,\n  \"type\": \"article\"\n}\n```\n\n`wos_link` is an optional field that will be ignored. `used` is used to determine the color of the reference. The `type` field is used to identify the type of the reference. `volume`, `issue` and `page` are optional and are respectively and integer, an integer and a string.\n\n`[1] Belleflamme, P., Lambert, T. \u0026 Schwienbacher, A. (2014). Crowdfunding: tapping the right crowd. Journal of busines venturing, 29(5), 585-609.`\n\n### Web\n\n```json\n{\n  \"title\": \"Crowdfunding: An Industrial Organization Perspective\",\n  \"authors\": [\"Belleflame, P.\", \"Lambert, T.\", \"Schwienbacher, A.\"],\n  \"year\": \"2010\",\n  \"web_link\": \"https://www.economix.fr/uploads/source/doc/workshops/2010_dbm/Belleflamme_al.pdf\",\n  \"used\": false,\n  \"uid\": 3,\n  \"type\": \"web\"\n}\n```\n\nFor a **web** reference, a `web_link` is required.\n\n`[3] Belleflame, P., Lambert, T. \u0026 Schwienbacher, A. (2010). Crowdfunding: An Industrial Organization Perspective. Retrieved from https://www.economix.fr/uploads/source/doc/workshops/2010_dbm/Belleflamme_al.pdf.`\n\n## Download\nCopy this repository using `git clone https://github.com/Jomy10/refs` and go into\nyour `/usr/local/bin`, then run\n\n```bash\nln -s refs /path/to/copied/repo/src/cli.rb\n```\n\nYou can also install the cli manually by running ./install.rb inside of the cloned repo\n\nYou will need to have [Ruby](https://www.ruby-lang.org/en/downloads/) installed.\n\n## Questions\nIf you have any questions, feel free to open an issue.\n\n## Contributing\nThis is more of a personal project I wanted to share. For my use case it is now mostly done. If you have something to add, or want to implement something that has not been added yet, feel free to open a pull request!\n\n## License\nThis code is licensed under the [MIT license](LICENSE).\n\n\n**If this was helpful for you, consider leaving a star!**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjomy10%2Frefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjomy10%2Frefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjomy10%2Frefs/lists"}