{"id":20092382,"url":"https://github.com/rubixdev/md2pdf","last_synced_at":"2025-03-02T15:53:06.819Z","repository":{"id":112918346,"uuid":"401105935","full_name":"RubixDev/md2pdf","owner":"RubixDev","description":"A small customizable script for converting markdown to pdf using pandoc","archived":false,"fork":false,"pushed_at":"2023-02-06T18:29:19.000Z","size":446,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T03:12:26.790Z","etag":null,"topics":["bash-script","markdown","markdown-to-pdf","pandoc","pdf","xelatex"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubixDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"ko_fi":"rubixdev"}},"created_at":"2021-08-29T17:48:49.000Z","updated_at":"2023-09-14T18:49:37.000Z","dependencies_parsed_at":"2023-09-20T20:25:02.243Z","dependency_job_id":null,"html_url":"https://github.com/RubixDev/md2pdf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Fmd2pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Fmd2pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Fmd2pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Fmd2pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubixDev","download_url":"https://codeload.github.com/RubixDev/md2pdf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241533651,"owners_count":19977826,"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":["bash-script","markdown","markdown-to-pdf","pandoc","pdf","xelatex"],"created_at":"2024-11-13T16:36:55.943Z","updated_at":"2025-03-02T15:53:06.789Z","avatar_url":"https://github.com/RubixDev.png","language":"Shell","readme":"# md2pdf\nA small script to convert markdown to pdf using pandoc with custom settings\n\n## Dependencies\n### Arch based Distributions\n```bash\nsudo pacman -S pandoc ttf-dejavu texlive-core\n```\n\n### Debian based Distributions\n```bash\nsudo apt install pandoc fonts-dejavu texlive-xetex\n```\n\n### Other\nYou can probably figure it out yourself, based on the two commands above\n\n## Manual Installation\n1. Download the [md2pdf](https://raw.githubusercontent.com/RubixDev/md2pdf/main/md2pdf.sh) file:\\\n   `wget https://raw.githubusercontent.com/RubixDev/md2pdf/main/md2pdf.sh`\n2. Replace 'YOUR NAME HERE' at the top with your actual name. This will appear in the header of the exported PDFs:\\\n   `sed -i 's/YOUR NAME HERE/\u003cname\u003e/g' md2pdf.sh`\n3. Rename it to `md2pdf` without `.sh`:\\\n   `mv md2pdf.sh md2pdf`\n4. Make the file executable:\\\n   `chmod +x md2pdf`\n5. Move the file to `/usr/local/bin`\\\n   `sudo mv md2pdf /usr/local/bin/`\n\n## Automatic Installation\nAlternatively, you can also use the automatic install script, which asks for your name (which will appear in the header of the PDFs) and places the file in `/usr/local/bin`, which should be in your PATH.\n\n### For fish users:\n```bash\nwget https://raw.githubusercontent.com/RubixDev/md2pdf/main/install.sh\nbash install.sh\nrm install.sh\n```\n\n### For the rest:\n```bash\nbash -c \"$(curl -fsSL https://raw.githubusercontent.com/RubixDev/md2pdf/main/install.sh)\"\n```\nor\n```bash\nbash -c \"$(wget -O- https://raw.githubusercontent.com/RubixDev/md2pdf/main/install.sh)\"\n```\n\n## Usage\n```bash\nmd2pdf \u003cinput file\u003e \u003coutput file\u003e \\\n    -l|--left-head [header left text] \\\n    -c|--center-head [header center text] \\\n    -r|--right-head [header right text] \\\n    -n|--name-location [left|center|right] \\\n    --preserve-tex\n```\n- `-l`, `-c`, `-r` and their long counterparts control the text to appear in the head of each page\n- `-n` or `--name-location` followed by one of `left`, `center` or `right` controls where to place the name in the head\n  - By default it will be placed left\n  - The name can be overwritten by the previously mentioned flags\n  - If anything else is provided, the name will not be displayed\n- The `--preserve-tex` option keeps the generated `.tex` file\n\n### Examples\n\n```bash\nmd2pdf README.md README.pdf\n```\n![](Images/Example1.png)\n\n\n```bash\nmd2pdf README.md README.pdf -l \" \"\n```\n![](Images/Example2.png)\n\n\n```bash\nmd2pdf README.md README.pdf -l 29.08.2021 -n right\n```\n![](Images/Example3.png)\n\n\n```bash\nmd2pdf README.md README.pdf \\\n    --center-head \"Text with spaces\" \\\n    --right-head 29.08.2021 \\\n    --name-location left\n```\n![](Images/Example4.png)\n","funding_links":["https://ko-fi.com/rubixdev"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubixdev%2Fmd2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubixdev%2Fmd2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubixdev%2Fmd2pdf/lists"}