Metadata-Version: 2.1
Name: cff2pages
Version: 0.1.0
Summary: This repository generates pages for GitHub or GitLab based on your CFF. This means that your CFF is well-suited for both machine processing and human readability.
Project-URL: Homepage, https://github.com/University-of-Potsdam-MM/cff2pages
Project-URL: Bug Tracker, https://github.com/University-of-Potsdam-MM/cff2pages/issues
Author-email: Jan Bernoth <jan.bernoth@uni-potsdam.de>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Requires-Dist: cffconvert>=2.0.0
Requires-Dist: jinja2>=3.1.2
Provides-Extra: test
Requires-Dist: beautifulsoup4~=4.12.2; extra == 'test'
Requires-Dist: flake8~=6.1.0; extra == 'test'
Requires-Dist: pytest~=7.4.0; extra == 'test'
Requires-Dist: toml~=0.10.2; extra == 'test'
Description-Content-Type: text/markdown

# cff2pages

[![pypi](https://img.shields.io/pypi/v/cff2pages.svg)](https://pypi.org/project/cff2pages/)
[![SWH](https://archive.softwareheritage.org/badge/origin/https://github.com/University-of-Potsdam-MM/cff2pages/)](https://archive.softwareheritage.org/browse/origin/?origin_url=https://github.com/University-of-Potsdam-MM/cff2pages)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8213987.svg)](https://doi.org/10.5281/zenodo.8213986)
## 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

````
cd project_folder
pip install cff2pages
python -m cff2pages.cff2pages
````

### Gitlab CI Runner

````yaml
stages:
  - Pages

pages:
  stage: Pages
  image: python:3.11
  script:
    - python -m pip install cff2pages
    - python -m cff2pages.cff2pages
  artifacts:
    paths:
      - public
````

### Github Workflow

````yaml
  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
          python -m cff2pages.cff2pages
      - 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
````

## Roadmap

- [x] 0.0.1 version in pypi
- [ ] convert all cff-attributes
  - [x] abstract
  - [x] authors
  - [ ] cff-version
  - [ ] commit
  - [ ] contact
  - [ ] date
  - [ ] doi
  - [ ] identifiers
    - [x] doi
    - [x] swh
    - [ ] url
  - [x] keywords
  - [x] license
  - [ ] license-url
  - [ ] message
  - [ ] preferred-citation
  - [x] references (new, but not published!)
  - [ ] repository
  - [ ] repository-artifact
  - [x] repository-code
  - [x] title
  - [ ] type
  - [ ] url
  - [ ] version
- [x] simple conversion from cff to html
- [x] working samples for GitHub and gitlab
- [ ] integrate cff2pages into given html
- [ ] change styles