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 description
cff2pages
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
Built Distribution
File details
Details for the file cff2pages-0.2.0.tar.gz
.
File metadata
- Download URL: cff2pages-0.2.0.tar.gz
- Upload date:
- Size: 30.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fdbe7355cbb612440ec8b716869b5f15dda62c59513a9c3990ae4b82b8dfa4b |
|
MD5 | ec57fc6b543ad880830bbcbb6499dd0e |
|
BLAKE2b-256 | a576f750e04858cf11cb96d85ba1aa97d830ebcb7f7d0edd0ac6e21f47c53842 |
File details
Details for the file cff2pages-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: cff2pages-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38eb8218860ed298887093ab0d66c9ebf1d7b0eabdb923adf2249afa5d587838 |
|
MD5 | 51f2b9a30f8b1465ddbd3b1efdf282e8 |
|
BLAKE2b-256 | 2f179c824e98db6d161e5d67e290334f0c070b848e564070b4919737322b13c1 |