{"id":23468393,"url":"https://github.com/dikkadev/citeproc-js-go","last_synced_at":"2026-05-15T18:09:09.481Z","repository":{"id":65819129,"uuid":"600353583","full_name":"dikkadev/citeproc-js-go","owner":"dikkadev","description":"citeproc-js-go is a wrapper for selected features of the citeproc-js library, running on Goja, a JavaScript interpreter for Go. The project provides a convenient and efficient way to use citeproc-js in a Go environment.","archived":false,"fork":false,"pushed_at":"2023-04-16T11:17:33.000Z","size":421,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T12:56:25.205Z","etag":null,"topics":["citeproc","citeproc-js","go","golang"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/dikkadev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"citations.json","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-11T08:15:40.000Z","updated_at":"2024-03-06T17:54:08.000Z","dependencies_parsed_at":"2024-06-20T16:19:01.275Z","dependency_job_id":"1f457795-3f71-49e8-9401-0726d4c6039d","html_url":"https://github.com/dikkadev/citeproc-js-go","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"773bfc87e223a3e05d6eef5049b7e9d87833bc97"},"previous_names":["sett17/citeproc-js-go"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dikkadev/citeproc-js-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dikkadev%2Fciteproc-js-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dikkadev%2Fciteproc-js-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dikkadev%2Fciteproc-js-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dikkadev%2Fciteproc-js-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dikkadev","download_url":"https://codeload.github.com/dikkadev/citeproc-js-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dikkadev%2Fciteproc-js-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263233953,"owners_count":23434890,"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":["citeproc","citeproc-js","go","golang"],"created_at":"2024-12-24T13:52:55.952Z","updated_at":"2025-12-15T17:31:57.621Z","avatar_url":"https://github.com/dikkadev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# citeproc-js-go\r\n\r\nciteproc-js-go is a wrapper for selected features of the citeproc-js library, running on Goja, a JavaScript interpreter for Go. The project provides a convenient and efficient way to use citeproc-js in a Go environment.\r\n\r\n## Getting Started\r\n\r\n\r\nYou can use `go get` to download citeproc-js-go and its dependencies:\r\n\r\n```bash\r\ngo get github.com/sett17/citeproc-js-go\r\n```\r\n\r\n## Usage\r\n\r\nTo use citeproc-js-go, you will need to provide it with your own citeproc-js library and style file. You can find a comprehensive list of citation styles and the corresponding style files [here](https://github.com/citation-style-language/styles).\r\n\r\nOnce you have your citeproc-js library and style file, you can use the following code to initialize citeproc-js-go:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\t\"github.com/sett17/citeproc-js-go/csljson\"\r\n\tciteproc \"github.com/sett17/citeproc-js-go\"\r\n\t\"io\"\r\n)\r\n\r\nfunc main() {\r\n\t// Create a new Citeproc session\r\n\tsession := citeproc.NewSession()\r\n\r\n\t// If no files or content is set manually, ieee.csl and locale-en-US.xml will be used by default\r\n\t// Load the CSL file and the locale file\r\n\terr := session.SetCslFile(\"path/to/csl/file.csl\")\r\n\tif err != nil {\r\n\t\tfmt.Println(\"Error loading CSL file:\", err)\r\n\t\treturn\r\n\t}\r\n\terr = session.SetLocaleFile(\"path/to/locale/file.xml\")\r\n\tif err != nil {\r\n\t\tfmt.Println(\"Error loading locale file:\", err)\r\n\t\treturn\r\n\t}\r\n\r\n\t// Initialize the Citeproc session\r\n\terr = session.Init()\r\n\tif err != nil {\r\n\t\tfmt.Println(\"Error initializing Citeproc session:\", err)\r\n\t\treturn\r\n\t}\r\n\r\n\t// Define the citation items\r\n\tvar items []csljson.Item\r\n\r\n\t//TODO: Add items to the session\r\n\r\n\t// Add all items to the session\r\n\terr = session.AddCitation(items...)\r\n\r\n\tcluster := make([]csljson.Item, 0)\r\n\t//TODO add items to the cluster\r\n\t\r\n\t// Process a citation cluster\r\n\tcitationCluster, err := session.ProcessCitationCluster(cluster...)\r\n\tif err != nil {\r\n\t\tfmt.Println(\"Error processing citation cluster:\", err)\r\n\t\treturn\r\n\t}\r\n\r\n\t// Print the resulting citation (this is what goes into the text, e.g. [1], [4])\r\n\tfmt.Println(citationCluster)\r\n\r\n\t// Make bibliography\r\n\tbibliography, err := session.MakeBibliography()\r\n\tif err != nil {\r\n\t\tfmt.Println(\"Error making bibliography:\", err)\r\n\t\treturn\r\n\t}\r\n\r\n\t// Print the resulting bibliography\r\n\tfmt.Println(bibliography)\r\n}\r\n```\r\n\r\nReplace `path/to/citeproc.js` and `path/to/style.csl` with the actual paths to your citeproc-js library and style file, respectively.\r\n\r\n\r\n## Contributions\r\n\r\nIf you would like to contribute to citeproc-js-go, please fork the repository and create a pull request with your changes. Your contributions are always welcome!\r\n\r\n## License\r\n\r\nciteproc-js-go is licensed under the [MIT License](https://github.com/sett17/citeproc-js-go/blob/main/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdikkadev%2Fciteproc-js-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdikkadev%2Fciteproc-js-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdikkadev%2Fciteproc-js-go/lists"}