{"id":18853128,"url":"https://github.com/luxedo/prettycode","last_synced_at":"2026-05-04T13:31:01.851Z","repository":{"id":57330192,"uuid":"61823668","full_name":"luxedo/prettycode","owner":"luxedo","description":"Preetycode is a simple software to covert code into pdf","archived":false,"fork":false,"pushed_at":"2019-01-07T14:59:45.000Z","size":665,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-03T16:56:46.079Z","etag":null,"topics":["code","highlight","pdf","print","print-code","shell"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/prettycode","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luxedo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-23T17:23:39.000Z","updated_at":"2022-03-06T21:03:41.000Z","dependencies_parsed_at":"2022-09-21T02:20:46.799Z","dependency_job_id":null,"html_url":"https://github.com/luxedo/prettycode","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/luxedo/prettycode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxedo%2Fprettycode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxedo%2Fprettycode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxedo%2Fprettycode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxedo%2Fprettycode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luxedo","download_url":"https://codeload.github.com/luxedo/prettycode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxedo%2Fprettycode/sbom","scorecard":{"id":606083,"data":{"date":"2025-08-11","repo":{"name":"github.com/luxedo/prettycode","commit":"dce6f6652810687dd86b39483a5da05455ffdf75"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T01:37:22.714Z","repository_id":57330192,"created_at":"2025-08-21T01:37:22.714Z","updated_at":"2025-08-21T01:37:22.714Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32609307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["code","highlight","pdf","print","print-code","shell"],"created_at":"2024-11-08T03:43:02.631Z","updated_at":"2026-05-04T13:31:01.767Z","avatar_url":"https://github.com/luxedo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prettycode\n`prettycode` is a software to pretty print code into a `pdf` file. It has a library\nand an executable:\n\n## Installation\nClone the repo, install the node dependencies and you are good to go\n```bash\ngit clone git@github.com:luxedo/prettycode.git\ncd prettycode\nnpm install\n./prettycode FILES\n```\nOr you can install via `npm`\n```bash\nnpm install prettycode\n```\n\n## Usage\n### `prettycode(fileName, [options])`\n#### Options:\n-   `style`: Choses the stylesheet to use (list below). Default: github.\n-   `encoding`: Selects the encoding. Default: UTF-8.\n-   `language`: Selects the language to apply highlight. Default: Autodetect.\n-   `addHeader`: Adds a message to the header of the file. Eg: version number.\n-   `addFooter`:  Adds a message to the footer of the file. Eg: version number.\n-   `output`: Chooses the output folder. Default: `.`\n\nExample:\n```javascript\nconst pc = require(\"prettycode\")\n\nconst opts = {\n  style: \"github\",\n  addHeader: \"\u003ch1\u003eMy Nice File\u003c/h1\u003e\"\n}\npc(\"myFile.py\", \"myFile.py.pdf\", opts)\n.then(err =\u003e {\n  if (err) throw err\n  console.log(\"Done!\");\n})\n```\n\nThe executable has the following options:\n```\nUsage: prettycode [-h | -v | -s style | -e encoding | -l language | -a message | -o output_folder] FILES\nConverts code into a pretty formated pdf with syntax highlight\n\nArguments:\n  -h, --help        Show this help.\n  -v, --version     Shows the software version.\n  -s, --style       Choses the stylesheet to use (list below). Default: github.\n  -e, --encoding    Selects the encoding. Default: UTF-8.\n  -l, --language    Selects the language to apply highlight. Default: Autodetect.\n  -a, --add-header  Adds a message to the header of the file. Eg: version number. You can use HTML.\n  -f, --add-footer  Adds a message to the footer of the file. Eg: version number. You can use HTML.\n  -o, --output      Chooses the output folder. Default: .\n```\n\nRunning the program passing itself as argument prints the source code:\n```sh\n$ prettycode -a \"\u003cb\u003ePreetycode Source\u003c/b\u003e\" prettycode\n```\nor:\n```javascript\nconst pc = require(\"prettycode\");\n\nconst opts = {\n  addHeader: \"\u003cb\u003ePreetycode Source\u003c/b\u003e\"\n};\npc(\"prettycode\", opts)\n.then(err =\u003e {\n  if (err) throw err;\n  console.log(\"Done!\");\n});\n```\nGenerated `prettycode.pdf`:\n\n![example](docs/prettycode_example.png)\n\n## Avaliable Stylesheets\nThe styles used for rendering were taken from [highlight.js](https://highlightjs.org/).\nCheck their [demo](https://highlightjs.org/static/demo/) for examples.\n\n-   a11y-dark\n-   a11y-light\n-   agate\n-   an-old-hope\n-   androidstudio\n-   arduino-light\n-   arta\n-   ascetic\n-   atelier-cave-dark\n-   atelier-cave-light\n-   atelier-dune-dark\n-   atelier-dune-light\n-   atelier-estuary-dark\n-   atelier-estuary-light\n-   atelier-forest-dark\n-   atelier-forest-light\n-   atelier-heath-dark\n-   atelier-heath-light\n-   atelier-lakeside-dark\n-   atelier-lakeside-light\n-   atelier-plateau-dark\n-   atelier-plateau-light\n-   atelier-savanna-dark\n-   atelier-savanna-light\n-   atelier-seaside-dark\n-   atelier-seaside-light\n-   atelier-sulphurpool-dark\n-   atelier-sulphurpool-light\n-   atom-one-dark-reasonable\n-   atom-one-dark\n-   atom-one-light\n-   brown-paper\n-   codepen-embed\n-   color-brewer\n-   darcula\n-   dark\n-   darkula\n-   default\n-   docco\n-   dracula\n-   far\n-   foundation\n-   github-gist\n-   github\n-   gml\n-   googlecode\n-   grayscale\n-   gruvbox-dark\n-   gruvbox-light\n-   hopscotch\n-   hybrid\n-   idea\n-   ir-black\n-   isbl-editor-dark\n-   isbl-editor-light\n-   kimbie.dark\n-   kimbie.light\n-   lightfair\n-   magula\n-   mono-blue\n-   monokai-sublime\n-   monokai\n-   nord\n-   obsidian\n-   ocean\n-   paraiso-dark\n-   paraiso-light\n-   pojoaque\n-   purebasic\n-   qtcreator_dark\n-   qtcreator_light\n-   railscasts\n-   rainbow\n-   routeros\n-   school-book\n-   shades-of-purple\n-   solarized-dark\n-   solarized-light\n-   sunburst\n-   tomorrow-night-blue\n-   tomorrow-night-bright\n-   tomorrow-night-eighties\n-   tomorrow-night\n-   tomorrow\n-   vs\n-   vs2015\n-   xcode\n-   xt256\n-   zenburn\n\n## License\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxedo%2Fprettycode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluxedo%2Fprettycode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxedo%2Fprettycode/lists"}