{"id":20425058,"url":"https://github.com/databio/pigmy","last_synced_at":"2025-09-03T22:34:11.709Z","repository":{"id":86287802,"uuid":"131903395","full_name":"databio/pigmy","owner":"databio","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-06T21:45:24.000Z","size":95,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-05T04:44:38.466Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/databio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2018-05-02T20:37:53.000Z","updated_at":"2022-01-06T21:45:27.000Z","dependencies_parsed_at":"2023-03-13T09:28:31.701Z","dependency_job_id":null,"html_url":"https://github.com/databio/pigmy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/databio/pigmy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2Fpigmy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2Fpigmy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2Fpigmy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2Fpigmy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/databio","download_url":"https://codeload.github.com/databio/pigmy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databio%2Fpigmy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273523083,"owners_count":25120859,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-15T07:12:08.816Z","updated_at":"2025-09-03T22:34:11.676Z","avatar_url":"https://github.com/databio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pigmy\n\n**NOTE 2021-10-08: This repository is no longer maintained. I recommend you look into the [markmeld](https://github.com/databio/markmeld) package, which can do everything pigmy did and more. I will leave this code here for reference purposes.**\n\n\nAre you annoyed by having to maintain your list of active and pending grants in 5 different formats? You have the NIH *Research Support* format, which excludes amounts, the NIH *Other Support* format, which includes amounts, NSF formats, internal formats for P\u0026T committees, and your own personal list to keep track of deadlines and applications... and the list goes on.\n\nWhat a pain to keep all these things updated, requiring hours of time. Now, `pigmy` can help! `pigmy` (pronounced 'pygmy') is a python application that makes formatting grant metadata easy. It's the PI grant metadata yeoman, here to take care of your grant metadata management needs.\n\nJust maintain your list of grants once, in a human- and computer-readable `yaml` format, and `pigmy` will use `pandoc` to output whatever you want in a template-based, customizable output. We have built-in templates for common output formats (like those specified above), but you can also make whatever output format you want.\n\n# Getting started\n\n## Examples\n\nThe grant metadata file [example_grants.yaml](grant_metadata/example_grants.yaml) can create the output file [example_research_support.pdf](output/example_research_support.pdf). This example is based on the [nih_other_support.txt format](formats/nih_other_support.txt) and the [research_support_template.md document template](document_templates/research_support_template.md). \n\nFurther example `grants.yaml` files are in [grant_metadata](/grant_metadata), and example output is in [output](/output).\n\n\n## Run on the command line:\n\n```\npython pigmy.py -g grants.yaml -f output_format.txt\n\npython pigmy.py --help\n```\n\n## How it works\n\n`pigmy` is quite simple. It will read your `grants.yaml` file, which is just a list of grants in `yaml` format, and then uses a user-provided template to output those grants in the format you want. The built-in templates are in `markdown` format, so `pigmy` will output `markdown` text, which you can then pipe through `pandoc` to get a PDF or docx.\n\nThere are two user-customizable files that determine how `pigmy` will format the output: the format files and document templates.\n\n**Format files**, found in [/formats](formats), provide a way for you specify how text from a single grant will be organized. An example is:\n\n```\n{namePlusPI} \u0026nbsp; \u0026nbsp; \u0026nbsp; {dates} \u0026nbsp; \u0026nbsp; \u0026nbsp; {effort}  \n{funder}  \nTitle: {title}  \nRole: {role}\n```\n\nThe bracketed values (like `{title}`) will be populated with information from the grant. These formats specify how each individual grant will be formatted.\n\n**Document files**, found in [/document_templates](/document_templates), show how the grants will be organized in a file. An example is the NIH research support template, which looks like this:\n\n```\n# D. Research support\n\n## Active\n\n{active}\n\t\n```\n\nHere, you use bracketed *status* codes. In this example, all the active grants, formatted according to the *format file* and appended in a list, will replace the `{active}` tag. You can use this to insert your grants list into any document format you like.\n\n\n# Recipes\n\nGenerate an NIH-style 'research support' that can be appended to the end of a NIH-format Biosketch:\n\n```\npython pigmy.py -e -g grant_metadata/example_grants.yaml \\\n\t-d document_templates/research_support_template.md \\\n\t-f formats/nih_other_support.txt \\\n\t| pandoc --reference-doc pandoc_templates/template.docx \\\n\t-o output/example_research_support.docx\n```\n\nUse LibreOffice to generate a PDF of said output\n\n```\npython pigmy.py -e -g grant_metadata/example_grants.yaml \\\n\t-d document_templates/research_support_template.md \\\n\t-f formats/nih_other_support.txt \\\n\t| pandoc --reference-doc pandoc_templates/template.docx \\\n\t-o output/example_research_support.docx\n\nsoffice --convert-to pdf output/example_research_support.docx --outdir output\n\n```\n\n\n# Run a web-server\n\n`pigmy` uses the lightweight `flask` microframework to give you a web interface, making it even easier to get the format you need, if you like pointy-clicky.\n\nRun like:\n\n```\nFLASK_APP=flask_pigmy.py flask run\n```\n\nThen point browser to: http://127.0.0.1:5000\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabio%2Fpigmy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatabio%2Fpigmy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabio%2Fpigmy/lists"}