{"id":25126716,"url":"https://github.com/sstark/paperd","last_synced_at":"2025-04-23T13:09:09.411Z","repository":{"id":211508256,"uuid":"149910392","full_name":"sstark/paperd","owner":"sstark","description":"epaper display server","archived":false,"fork":false,"pushed_at":"2024-04-25T05:13:38.000Z","size":369,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T13:08:54.474Z","etag":null,"topics":["cloudless","display","epaper","iot","music-player","raspberrypi"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sstark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","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":"2018-09-22T19:31:49.000Z","updated_at":"2024-05-01T02:56:57.000Z","dependencies_parsed_at":"2025-02-08T10:34:23.407Z","dependency_job_id":"fbfac318-e7b3-416c-9835-ba732325fd8d","html_url":"https://github.com/sstark/paperd","commit_stats":null,"previous_names":["sstark/paperd"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sstark%2Fpaperd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sstark%2Fpaperd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sstark%2Fpaperd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sstark%2Fpaperd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sstark","download_url":"https://codeload.github.com/sstark/paperd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250439288,"owners_count":21430823,"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":["cloudless","display","epaper","iot","music-player","raspberrypi"],"created_at":"2025-02-08T10:34:05.854Z","updated_at":"2025-04-23T13:09:09.348Z","avatar_url":"https://github.com/sstark.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# paperd\n\nAn epaper display server.\n\nSo you have your epaper display sucessfully connected to your Raspberry Pi. Now\nwhat do do with it?\n\npaperd will make it easy to push content to your epaper display by letting you\ndefine areas on the display and individually update those areas using a restful\nweb api.\n\nIn the configuration file those areas are defined with their position on the\ndisplay and their size. Furthermore it lets you set parameters like how to\nhandle box overflow or font sizes.\n\nAn area can currently be of type \"image\" or \"text\". If you push an image\n(anything supported by PIL) to an area it will replace the contents of that\narea. Likewise, text will be written to a text area in the defined font, size\nand alignment.\n\npaperd makes use of the partial update feature of some of the epaper displays\navailable and can currently only work with those.\n\nSince epaper displays are notoriously slow, you can use a tk based realtime\npreview window on your development system.\n\nAll testing is currently done on a Raspberry Pi Zero W and a Waveshare 2.9\"\nepaper, using Raspbian stretch.\n\n![paperd screenshot](https://raw.githubusercontent.com/sstark/paperd/master/paperd.jpg)\n\n## Installation\n\nRecommended (work in progress!):\n\n     pipx install paperd\n\nRun the development version without installation:\n\n     poetry run paperd\n\nFor programming the epaper display, the driver for the Waveshare 2.9\" (1-color\nversion) is included. This display has a resolution of 128x296 pixels. More\ndrivers will follow.\n\n\n## Configuration\n\nThe configuration file is written in yaml and looks like this:\n\n    paperd:\n      v1:\n        resolution: {x: 296, y: 128}\n        orientation: 1\n        output: epd2in9\n        colordepth: 1\n        maxfps: 4\n        areas:\n          - name: background\n            type:\n              format: image\n              overflow: resize\n            origin: {x: 0, y: 0}\n            size: {x: 296, y: 128}\n          - name: title\n            type:\n              format: text\n              overflow: scrolling\n              font:\n                face: examples/musicplayer/fonts/pf_tempesta_seven_condensed.ttf\n                size: 24\n                align: left\n            origin: {x: 70, y: 0}\n            size: {x: 226, y: 64}\n\nSee the examples directory for another example. Some of the options in those\nexamples are not implemented yet: `orientation`, `colordepth`, `scrolling`.\n\n`maxfps` is only partially implemented.\n\nIf text does not fit into a text area, paperd will try to scale down the font\nsize to make it fit, but only if the resulting font size is not smaller than\nhalf the original font size, and not smaller than 4. If the text still does not\nfit, it will be split into two lines at half the font size.\n\n## Running\n\nIn order to run the included example using the tk preview run this command:\n\n    ./paperd.py -c examples/musicplayer/paperd.yml -o tk\n\nIf you have a hidpi display you might want to add the `--scale 2` option to the\ncommand line.\n\nFor running the example on your Raspberry Pi with the epd output module, simply\nremove the `-o tk` parameter and it will use whichever driver is defined in the\nconfiguration.\n\n## Using the API\n\nCurrently there are only two useful api URLs:\n\n### Change contents of an area\n\n    PUT http://localhost:2354/v1/areas/\u003carea\u003e\n\nThis PUTs content to the area named `\u003carea\u003e`. The area must be defined in the\nconfiguration file of paperd. Say you have an area \"logo\", you can test it\nwith curl like this:\n\n    curl -T logo.png http://localhost:2354/v1/areas/logo\n\nBy default, paperd will resize the image to fit in the dimensions of the area.\nHowever it is strongly recommended to provide the image in the correct\nresolution already, since rescaling will likely look bad at such a small scale.\n\nIf the area you want to PUT something is of type text, you can use curl like\nthis:\n\n    curl -X PUT -d \"the text\" http://localhost:2354/v1/areas/title\n\n### Update the display\n\nAfter you have uploaded some text or images to areas, you have to update the\ndisplay. For this use this API call:\n\n    curl -sS http://localhost:2354/v1/update\n\nThis will swap the two frame buffers of the display, showing what you have\ndrawn since the last update.\n\n## Development\n\nThis is an early, but working development version of paperd. Please be kind if\nit does weird things and file an issue.\n\nSince the original waveshare epd2in9 driver is used, and there is no low level\ntweaking going on in paperd, it is unlikely this will cause any damage to your\ndisplay or Raspberry Pi.\n\nTo get debug information from paperd, set the environment variable\n`PAPERD_LOGLEVEL` to \"debug\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsstark%2Fpaperd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsstark%2Fpaperd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsstark%2Fpaperd/lists"}