{"id":15047927,"url":"https://github.com/cutelyst/pastelyst","last_synced_at":"2025-04-10T01:10:57.721Z","repository":{"id":96428708,"uuid":"100747583","full_name":"cutelyst/pastelyst","owner":"cutelyst","description":"A Web Paste Tool built with Cutelyst and KDE Frameworks","archived":false,"fork":false,"pushed_at":"2024-12-31T20:59:07.000Z","size":67,"stargazers_count":19,"open_issues_count":2,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T01:10:39.246Z","etag":null,"topics":["cplusplus","cplusplus-11","cutelyst","pastebin","qt5","webapp"],"latest_commit_sha":null,"homepage":"https://paste.cutelyst.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cutelyst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2017-08-18T20:23:48.000Z","updated_at":"2024-12-31T20:59:10.000Z","dependencies_parsed_at":"2023-11-24T15:25:25.326Z","dependency_job_id":"a4a1dbb1-fcd9-4e7a-bc63-0694c91dab56","html_url":"https://github.com/cutelyst/pastelyst","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutelyst%2Fpastelyst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutelyst%2Fpastelyst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutelyst%2Fpastelyst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutelyst%2Fpastelyst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cutelyst","download_url":"https://codeload.github.com/cutelyst/pastelyst/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137886,"owners_count":21053775,"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":["cplusplus","cplusplus-11","cutelyst","pastebin","qt5","webapp"],"created_at":"2024-09-24T21:06:06.451Z","updated_at":"2025-04-10T01:10:57.703Z","avatar_url":"https://github.com/cutelyst.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pastelyst\n\nPastelyst is an easy to use and expandable web paste tool built with [Cutelyst](https://github.com/cutelyst/cutelyst) and [KDE Frameworks 5 Syntax Highlighting](https://github.com/KDE/syntax-highlighting). It uses less than 3 MB of RAM and renders quickly using a SQLite DB for the storage.\n\nPastelyst is almost feature complete and on production at [paste.cutelyst.org](https://paste.cutelyst.org/). You can grab the code and deploy your own paste tool now. And please don't forget to contribute to adding these extra features if you have time:\n\n * Extra database support\n * URL shortener\n * User authentication\n * [And some more](https://github.com/cutelyst/pastelyst/issues/8)\n\nThe list is short and the code is clean, go test, break, hack, and have fun!\n\n## Dependencies\n * Grantlee\n * KDE Frameworks 5 Syntax Highlighting\n * Cutelyst 2.0.0 or newer with enabled Grantlee plugin\n\n## Configuration\nCreate an INI file like pastelyst.conf with:\n\n    [Cutelyst]\n    DatabasePath = /var/tmp/my_site_data/pastelyst.sqlite\n    production = true\n\n    social = true\n    download = true\n    clipboard = true\n\nWhere:\n\n * DatabasePath is the place where sqlite database will be placed\n * production when true will preload the theme templates, which is a lot faster but if you are customizing the theme you will need to reload the process\n * social adds social media share buttons for pastes if enabled\n * download adds download button for pastes if enabled\n * clipboard adds copy to clipboard button for pastes if enabled\n\n## Running\nYou can run it with cutelyst-wsgi or uWSGI, both have similar command line options, and you should look at their documentation to know their options, the simplest one:\n\n    cutelyst-wsgi2 --application path/to/libPastelyst.so --http-socket :3000 --ini pastelyst.conf --chdir parent_of_root_dir --static-map /static=root/static\n\nThe chdir needs to point to the parent of the root directory that came from this project. The option `--static-map` is used to serve the static files.\n\nNow point your browser to [http://localhost:3000](http://localhost:3000)\n\n## API Usage Guidelines\nPastelyst also provides an API. Using the API, you can create your own applications based on Pastelyst or use Pastelyst from terminal. For details see [Creating RESTful applications with Qt and Cutelyst](https://dantti.wordpress.com/2018/05/17/creating-restful-applications-with-qt-and-cutelyst/), [Understanding And Using REST APIs](https://www.smashingmagazine.com/2018/01/understanding-using-rest-api/), and [POST Form Data with cURL](https://davidwalsh.name/curl-post-file).\n\n### List pastes\n\n```bash\ncurl -H \"Content-Type: application/json\" -X POST  https://paste.cutelyst.org/api/json/list/1\n```\n\n```json\n{\"result\":{\"count\":15,\"pages\":0,\"pastes\":[\"hW7BwGCNS\",\"7B6G5HJNT\",\"l_Zo9VaRT\",\"f_9z4b-_T\",\"YnsDOFIRR\",\"pu0h5ftsT\"\n```\n\n```bash\ncurl -H \"Content-Type: application/json\" -X POST  https://paste.cutelyst.org/api/json/list/2\n```\n\n```json\n{\"result\":{\"count\":15,\"pages\":0,\"pastes\":[]}}\n```\n\n### Show pastes\n\n```bash\ncurl -H \"Content-Type: application/json\" -X POST  https://paste.cutelyst.org/api/json/show/pu0h5ftsT\n```\n\n```json\n{\"result\":{\"data\":\"#include \u003ciostream\u003e\\r\\n\\r\\nint main() {\\r\\n  std::cout \u003c\u003c \\\"hello\\\\n\\\";\\r\\n  return 0;\\r\\n}\",\"id\":\"pu0h5ftsT\",\"language\":\"C++\",\"timestamp\":1503821618,\"title\":\"Test\"}}\n```\n\n```bash\ncurl -H \"Content-Type: application/json\" -X POST  https://paste.cutelyst.org/api/json/show/STIdv05VREeht/1234567890\n```\n\n```json\n{\"result\":{\"data\":\"my hidden text is here.\",\"id\":\"STIdv05VREeht\",\"language\":\"text\",\"timestamp\":1547050001,\"title\":\"API test 1\"}}\n```\n\n### Create pastes\n\n```bash\ncurl -X POST http://localhost:3000/api/json/create -F 'data=echo \"Hello World!\"' -F 'language=Bash' -F 'title=API Test'\n```\n\n```json\n{\"result\":{\"id\":\"m2TvYu2sQ\"}}\n```\n\n```bash\ncurl -X POST http://localhost:3000/api/json/create -F 'data=echo \"Hello World!\"' -F 'language=Bash' -F 'title=API Test' -F 'password=1234567890'\n```\n\n```json\n{\"result\":{\"id\":\"tMQD52pdRCe3K\"}}\n```\n\n## History\nPastelyst was initially developed by Daniel Nicoletti and announced on August 25, 2017 on [cutelyst.org](https://cutelyst.org/2017/08/25/announcing-sticklyst-leveraging-kde-frameworks-on-the-web). Sticklyst, which was chosen as the project name, was later replaced by Pastelyst.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutelyst%2Fpastelyst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcutelyst%2Fpastelyst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutelyst%2Fpastelyst/lists"}