Skip to main content

This repository generates HTML pages or Markdown sites for GitHub and GitLab based on your Citation.cff file. This ensures that your CFF is optimized for both machine processing and human readability.

Project description

cff2pages

pypi SWH DOI fair-software.eu

Motivation

The Citation.cff is a fantastic format that combines human-readable and machine-readable metadata about its repository. It provides linking systems with important metadata about the presented project and gives people the ability to reference the project, among other things. However, for a wide range of users, the YAML file format can seem intimidating, whereas a clean website is generally more readable. This project aims to automate the conversion of cff files, so that maintaining the cff file pays off for developers in terms of the project's presentation, thereby ensuring that the website representation is retained.

Project Description

cff2pages is envisioned as a Python package, designed to automate the extraction of metadata from your project's Citation.cff file, and swiftly generate a sleek, static HTML page. This versatile page can serve as a vivid representation of your project on Github/Gitlab Pages.

Usage

usage: cff2pages [-h] [-i [INPUT]] [-o [OUTPUT]]

Converts citation information in Citation File Format into HTML or Markdown

options:
  -h, --help            show this help message and exit
  -i [INPUT], --input [INPUT]
                        path to the input CFF file. Default: ./CITATION.cff
  -o [OUTPUT], --output [OUTPUT]
                        path to the output file. Default: public/citation.html

Example

cd project_folder
pip install cff2pages
cff2pages

By default, output will be written to public/citation.html.

Gitlab CI Runner

stages:
  - Pages

pages:
  stage: Pages
  image: python:3.11
  script:
    - python -m pip install cff2pages
    - cff2pages -o public/index.html
  artifacts:
    paths:
      - public

Github Workflow

  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Set up Python 3.11
        uses: actions/setup-python@v3
        with:
          python-version: 3.11
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install cff2pages
          cff2pages -o public/index.html
      - name: Setup Pages
        uses: actions/configure-pages@v3
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v2
        with:
          path: './public'
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cff2pages-0.2.1.tar.gz (35.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cff2pages-0.2.1-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file cff2pages-0.2.1.tar.gz.

File metadata

  • Download URL: cff2pages-0.2.1.tar.gz
  • Upload date:
  • Size: 35.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for cff2pages-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ef7cbf532e40ee947c36fd169e6c5057c97c2d0294de8bcffb3b09bbb7e6c905
MD5 fb50fdb755e18657e2af84e4032596df
BLAKE2b-256 f91dc7f5445351885d5d892cb557d943e8e43f494685829e919c740c885cb4bb

See more details on using hashes here.

File details

Details for the file cff2pages-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: cff2pages-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for cff2pages-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d03aef9fc26daac6bd74026c842a44b9f2544281228fe2127b3183a75113d64
MD5 82e23d3b711456e14b3327558ec1ff1c
BLAKE2b-256 e934a56ea0cf93921a1e73586d7965f4c212724d50664588b353b66e50990378

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page