{"id":16576505,"url":"https://github.com/paul019/pappe","last_synced_at":"2025-03-05T19:47:26.016Z","repository":{"id":191895453,"uuid":"685048321","full_name":"paul019/pappe","owner":"paul019","description":"A CLI to draw your data on top of millimeter paper","archived":false,"fork":false,"pushed_at":"2023-09-21T18:42:17.000Z","size":6237,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T07:13:14.861Z","etag":null,"topics":["automation","data-visualization","diagram","diagram-generator","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paul019.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":"2023-08-30T12:05:27.000Z","updated_at":"2023-08-31T21:20:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f530dd6-81a2-442e-b656-90092f4a68bb","html_url":"https://github.com/paul019/pappe","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":0.3870967741935484,"last_synced_commit":"6b3e8d215f959b95655ca189313240b184025d1b"},"previous_names":["paul019/pappe"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paul019%2Fpappe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paul019%2Fpappe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paul019%2Fpappe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paul019%2Fpappe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paul019","download_url":"https://codeload.github.com/paul019/pappe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242097388,"owners_count":20071251,"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":["automation","data-visualization","diagram","diagram-generator","python"],"created_at":"2024-10-11T22:08:22.719Z","updated_at":"2025-03-05T19:47:25.981Z","avatar_url":"https://github.com/paul019.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/paul019/pappe/assets/37160523/e65b47d8-b36b-48ae-9c98-dde2a80a72e2\" width=\"300px\" /\u003e\n  \u003cp align=\"center\"\u003eA CLI to draw your data on top of millimeter paper\u003c/p\u003e\n\u003c/p\u003e\n\n*pappe* enables you to plot data (including error bars) on top of a given sheet of millimeter paper. It manages everything for you — including the axis scaling. This way, you can use the tool's output as a template for your own diagram on millimeter paper.\n\nCurrently, pappe includes one type of millimeter paper in two orientations (portrait and landscape). However, you can also add your own millimeter paper (see advanced documentation).\n\n\n## Run\n\nYou need to have [Python 3.11](https://www.python.org/downloads/) installed, so that the TOML parser is available.\n\nInstall the necessary python package used to annotate the PDF: `pip3 install pdf_annotate`\n\n**Sample usage**\n\n```\npython3 pappe.py ./data/data.csv ./data/out.pdf\n```\n\nSee the CLI help for more information. Alter the `config.toml` file to change the appearance.\n\n\n## Basic documentation\n\nTo use pappe, specify the path to a CSV file holding the data as well as the desired output path for the PDF file.\n\n```\npython3 pappe.py \u003cpath to CSV\u003e \u003cPDF output path\u003e\n```\n\nFile paths are *relative* (see also `Sample usage` above).\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eCSV file\u003c/b\u003e\u003c/summary\u003e\n\nThe supplied CSV file should have 2 to 4 columns and it must *not* have a header row. Each row represents one data point. This is what the columns are for:\n\n| **Column 1** | **Column 2** | **Column 3**           | **Column 4** |\n| ---          | ---          | ---                    | ---          |\n| x-value      | y-value      | lower error of y-value* | upper error of y-value* |\n\n\\*Note: If only three columns are supplied, the third column's content is interpreted as a *symmetrical* error of the y-value.\n\nSee the [`data/data.csv`](./data/data.csv) file as an example.\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eChanging settings\u003c/b\u003e\u003c/summary\u003e\n\nTo change basic settings, change the `config.toml` file. The following parameters can be set:\n\n| Parameter | Type | Default | Meaning |\n| --------- | ---- | ------- | ------- |\n| `grid_variant` | `1` or `2` | `1` | `1` for portrait paper and `2` for landscape paper (you can also add your own paper; see advanced documentation). |\n| `factors/x`, `factors/y` | `List\u003cint\u003e` | `[1, 1.5, 2, 3, 4, 5, 6, 8, 9]` | The tool first tries to scale the data by the largest possible power of ten (so that your data still fits on the grid). It then chooses one of the supplied factors to further scale up the data; here again, it uses the largest possible factor. Change this array in order to obtain the desired scaling of the data in `x`- and `y`-direction. |\n| `origins/x`, `origins/y` | `bool` | `false` | If you want the `x`- or `y`-axis to include the value `0`, set this to `true`. |\n\nSee the [`config.toml`](./config.toml) file.\n\u003c/details\u003e\n\n\n## Advanced documentation\n\nAs stated above, you can easily add your own millimeter paper by following these steps:\n\n1. Add the pdf file of your millimeter paper to the `grids` folder.\n2. Add a new config file called `grid{n}.toml` to the `grids` folder. Populate it with the parameters mentioned below.\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eGrid config file\u003c/b\u003e\u003c/summary\u003e\n\nAdding your own millimeter paper requires you to \"measure\" it. Read the following table chronologically for instructions:\n\n| Parameter | Meaning / Instructions |\n| --- | --- |\n| `paper/file` | Relative path of your grid pdf file (relative from the project's entry point). |\n| `paper/width`, `paper/height` | Export your millimeter paper pdf file as a `jpg` image (e. g. with `300 ppi`). Input this image's pixel dimensions here. |\n| `grid/width`, `grid/height` | Use a suitable image viewing application to determine the pixel dimensions of the actual grid on your millimeter paper. |\n| `grid/x`, `grid/y` | Use a suitable image viewing application to determine the pixel position of the lower left corner of the actual grid on your millimeter paper. (This position should be measured from the lower left corner of your image.) |\n| `grid/num_x_blocks`, `grid/num_y_blocks` | The number of *big* blocks on your millimeter paper. For example `18 x 27`. |\n| `grid/num_x_tiny_blocks_per_block`, `grid/num_y_tiny_blocks_per_block` | Number of *tiny* blocks per big block. Usually, this number should be `10`. |\n| `drawing/cross_size` | Pixel size of the displayed data points. |\n| `drawing/axis_tick_size` | Pixel size of the axis ticks. |\n\nSee the [`grids/grid1.toml`](./grids/grid1.toml) file as an example.\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaul019%2Fpappe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaul019%2Fpappe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaul019%2Fpappe/lists"}