{"id":25220388,"url":"https://github.com/adridevelopsthings/latex-template-server","last_synced_at":"2025-04-05T11:21:07.799Z","repository":{"id":182780815,"uuid":"552952209","full_name":"AdriDevelopsThings/latex-template-server","owner":"AdriDevelopsThings","description":"Host LaTeX templates and fill them out by using an api","archived":false,"fork":false,"pushed_at":"2025-03-25T09:34:49.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T10:28:49.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdriDevelopsThings.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}},"created_at":"2022-10-17T13:35:10.000Z","updated_at":"2025-03-25T09:34:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc41ac10-8f47-4617-bebb-a4a0f6aa5326","html_url":"https://github.com/AdriDevelopsThings/latex-template-server","commit_stats":null,"previous_names":["adridevelopsthings/latex-template-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdriDevelopsThings%2Flatex-template-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdriDevelopsThings%2Flatex-template-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdriDevelopsThings%2Flatex-template-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdriDevelopsThings%2Flatex-template-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdriDevelopsThings","download_url":"https://codeload.github.com/AdriDevelopsThings/latex-template-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247326581,"owners_count":20920871,"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":[],"created_at":"2025-02-10T21:53:10.422Z","updated_at":"2025-04-05T11:21:07.789Z","avatar_url":"https://github.com/AdriDevelopsThings.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# latex-template-server\nHost LaTeX templates and fill them out by using an api\n\n## Set up\n### Docker\n**(recommended)**\nJust use the docker image (`ghcr.io/adridevelopsthings/latex-template-server:main`) and set up the volumes `/dist/configuration.yml` and `/dist/templates` or just use the [`docker-compose.yml`](docker-compose.yml) in this repository and modify it to your needs.\n\n### From source\nBuild the server with go: ``go build .``. You also need `pdflatex`.\n\n## Structure of configuration.yml\n\nconfiguration.yml\n```yaml\nserver:\n    listen:\n        host: 0.0.0.0\n        port: 80\ntemplate_path: \"templates\" # directory which hosts all LaTeX templates, \"templates\" = default value\ntmp_directory: \"tmp\" # \"tmp\" = default value\n```\n\n## Create a LaTeX template\n\nJust create a file with the name `YOUR_TEMPLATE_NAME.tex` in the template directory configured in the `config.yml` file. Here is an example for a LaTeX file that needs two parameters: `firstname` and `lastname`:\n\n```\n\\documentclass{report}\n\n\\usepackage[utf8]{inputenc}\n\\usepackage{datatool}\n\n% you don't have to generate this csv file, the csv file is generated for any api request\n\\DTLloaddb{data}{data.csv}\n\n\\begin{document}\n\\DTLforeach{data}{\n    \\Firstname=firstname,\n    \\Lastname=lastname}{\n        Your name is \\Firstname \\Lastname\n    }\n\\end{document}\n```\n\n## Making api requests\nYou can generate a PDF file from a LaTeX template:\n```\nPOST /template/YOUR_TEMPLATE_NAME HTTP/1.1\nContent-Type: application/json\n\n{\n    \"arguments\": [{\n        \"firstname\": \"Robert\",\n        \"lastname\": \"Smith\"\n    }]\n}\n```\n\nA response does look like this:\n```\nHTTP/1.1 200 OK\nContent-Type: application/pdf\n\n...\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadridevelopsthings%2Flatex-template-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadridevelopsthings%2Flatex-template-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadridevelopsthings%2Flatex-template-server/lists"}