Help building a webpage for Crux ports repository
Project description
CruxPy
The package contain classes helpful in dealing with Crux ports. At the moment the main usage is for creation of the ports collection website.
Classes
page
The class to prepare a website for a Crux ports repository.
The constructor takes 4 parameters:
- the path to a directory with a collection (defaults to './')
- name of the header file to use. (defaults to the 'header.html' from module 'files' folder) Header is content of the page over the table.
- style name, where the style is the name of one the style from the 'files' folder of the module. (The default is 'original').
- if the page should use git information to define the update date (default is true)
Methods
-
read_repo(): read ports information for the repo
-
generate_page(): creates HTML page
-
write(): saves the page to a file (default is 'index.html')
-
write_style(): saves css style file. It's going to be called 'style.css' and save to a given path (default is './')
-
content of a page 'header', which is a html code over the table containing port informations. By default it looks for a collection in current folder
., and html from thefiles/header.htmlfile. It can also copy the style file from the project repo to the selected location. This method requires a style name as an argument, but save the css file into the current location by default.
port
The class to get information from a Crux port. The constructor requires the path to the port as the input. Additionally, boolean to control if git information should be use to populate update files is optional.
Methods:
- last_update(): get git information about the latest update to the port
- expose_pkgfile(): expose metadata from the Pkgfile
Examples
There a few examples of usages in the examples folder.
Development
It is fine to commit changes directly to the repo trunk branch. The python package changes will be only visible if the version is changed in the pyproject.toml configuration file.
Tests
Basic pytest are located in the tests folder
GitHub action
There are a few GitHub Action workflows.
- commit: On every commit, GHA checks if there is a new version in pyproject.toml file. If there is one the new tag is created.
- release: Every new tag triggers a release workflow, which generate a GitHub release
- publish: The release workflow triggers another one which builds and publishes python package to the pypi
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cruxpy-0.2.4.tar.gz.
File metadata
- Download URL: cruxpy-0.2.4.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
917a3bb0a5666c5e799871285c285ada4a37a05acef1a1a3d10fbadcd957caff
|
|
| MD5 |
b20e83a214bdbc6fc8316f08d17a818e
|
|
| BLAKE2b-256 |
6604d6daeaa6d0d456e4ef483bd521975afca9a558ee349250aac9b28dc6589f
|
Provenance
The following attestation bundles were made for cruxpy-0.2.4.tar.gz:
Publisher:
publish.yaml on wawrzek/cruxpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cruxpy-0.2.4.tar.gz -
Subject digest:
917a3bb0a5666c5e799871285c285ada4a37a05acef1a1a3d10fbadcd957caff - Sigstore transparency entry: 1397640582
- Sigstore integration time:
-
Permalink:
wawrzek/cruxpy@42fa848e21a55b9991e107e2f01339fc864e8f04 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/wawrzek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@42fa848e21a55b9991e107e2f01339fc864e8f04 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file cruxpy-0.2.4-py3-none-any.whl.
File metadata
- Download URL: cruxpy-0.2.4-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
908cbd374cff3b4391216ec736a5ab1aa21eb81b4019d73f34be4092526c41e8
|
|
| MD5 |
1574806f9bedee08c789ea3485ba7ae4
|
|
| BLAKE2b-256 |
de904653fab25fd1e19f2fe363d7c0e4359887ec0302974418389b9ce162d0ca
|
Provenance
The following attestation bundles were made for cruxpy-0.2.4-py3-none-any.whl:
Publisher:
publish.yaml on wawrzek/cruxpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cruxpy-0.2.4-py3-none-any.whl -
Subject digest:
908cbd374cff3b4391216ec736a5ab1aa21eb81b4019d73f34be4092526c41e8 - Sigstore transparency entry: 1397640603
- Sigstore integration time:
-
Permalink:
wawrzek/cruxpy@42fa848e21a55b9991e107e2f01339fc864e8f04 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/wawrzek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@42fa848e21a55b9991e107e2f01339fc864e8f04 -
Trigger Event:
workflow_run
-
Statement type: