Skip to main content

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 the files/header.html file. 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


Download files

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

Source Distribution

cruxpy-0.2.4.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

cruxpy-0.2.4-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

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

Hashes for cruxpy-0.2.4.tar.gz
Algorithm Hash digest
SHA256 917a3bb0a5666c5e799871285c285ada4a37a05acef1a1a3d10fbadcd957caff
MD5 b20e83a214bdbc6fc8316f08d17a818e
BLAKE2b-256 6604d6daeaa6d0d456e4ef483bd521975afca9a558ee349250aac9b28dc6589f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cruxpy-0.2.4.tar.gz:

Publisher: publish.yaml on wawrzek/cruxpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for cruxpy-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 908cbd374cff3b4391216ec736a5ab1aa21eb81b4019d73f34be4092526c41e8
MD5 1574806f9bedee08c789ea3485ba7ae4
BLAKE2b-256 de904653fab25fd1e19f2fe363d7c0e4359887ec0302974418389b9ce162d0ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for cruxpy-0.2.4-py3-none-any.whl:

Publisher: publish.yaml on wawrzek/cruxpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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