https://github.com/databio/pigmy

https://github.com/databio/pigmy

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.0%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: databio
  • Language: Python
  • Default Branch: master
  • Size: 92.8 KB
Statistics
  • Stars: 1
  • Watchers: 15
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 8 years ago · Last pushed over 4 years ago
Metadata Files
Readme

README.md

pigmy

NOTE 2021-10-08: This repository is no longer maintained. I recommend you look into the markmeld package, which can do everything pigmy did and more. I will leave this code here for reference purposes.

Are 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&T committees, and your own personal list to keep track of deadlines and applications... and the list goes on.

What 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.

Just 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.

Getting started

Examples

The grant metadata file example_grants.yaml can create the output file exampleresearchsupport.pdf. This example is based on the nihothersupport.txt format and the researchsupporttemplate.md document template.

Further example grants.yaml files are in grant_metadata, and example output is in output.

Run on the command line:

``` python pigmy.py -g grants.yaml -f output_format.txt

python pigmy.py --help ```

How it works

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.

There are two user-customizable files that determine how pigmy will format the output: the format files and document templates.

Format files, found in /formats, provide a way for you specify how text from a single grant will be organized. An example is:

{namePlusPI}       {dates}       {effort} {funder} Title: {title} Role: {role}

The bracketed values (like {title}) will be populated with information from the grant. These formats specify how each individual grant will be formatted.

Document files, found in /document_templates, show how the grants will be organized in a file. An example is the NIH research support template, which looks like this:

```

D. Research support

Active

{active}

```

Here, 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.

Recipes

Generate an NIH-style 'research support' that can be appended to the end of a NIH-format Biosketch:

python pigmy.py -e -g grant_metadata/example_grants.yaml \ -d document_templates/research_support_template.md \ -f formats/nih_other_support.txt \ | pandoc --reference-doc pandoc_templates/template.docx \ -o output/example_research_support.docx

Use LibreOffice to generate a PDF of said output

``` python pigmy.py -e -g grantmetadata/examplegrants.yaml \ -d documenttemplates/researchsupporttemplate.md \ -f formats/nihothersupport.txt \ | pandoc --reference-doc pandoctemplates/template.docx \ -o output/exampleresearchsupport.docx

soffice --convert-to pdf output/exampleresearchsupport.docx --outdir output

```

Run a web-server

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.

Run like:

FLASK_APP=flask_pigmy.py flask run

Then point browser to: http://127.0.0.1:5000

Owner

  • Name: Databio
  • Login: databio
  • Kind: organization
  • Location: University of Virginia

Solving problems in computational biology

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels