Display a randomly selected quote about Richard M. Stallman.
Project description
rmsfact
A port of the R package rmsfact by Dirk Edelbuettel.
Display a randomly selected quote about Richard M. Stallman based on the collection in the 'GNU Octave' function 'fact()' which was aggregated by Jordi Gutiérrez Hermoso based on the (now defunct) site stallmanfacts.com (which is accessible only via http://archive.org).
Installation
uv pip install rmsfact
Or with pip:
pip install rmsfact
Usage
The package exports a single function rmsfact() which returns a single randomly-chosen "fact" as
a str.
import rmsfact
rmsfact.rmsfact()
You can also run python -m rmsfact from a shell.
Building from source
This project uses uv for dependency management and building.
Clone the repository:
git clone https://github.com/lewinfox/rmsfact.git
cd rmsfact
Install uv if you don't have it:
curl -LsSf https://astral.sh/uv/install.sh | sh
Set up the development environment:
make install_dev
This will create a virtual environment, install dependencies, and set up the package for development.
Making changes
To add a new fact you can edit rmsfact/data/rmsfact.txt.
echo "A new fact" >> rmsfact/data/rmsfact.txt
The Makefile provides several useful targets:
make install_dev: Set up development environment with uvmake test: Run unit tests with pytestmake build: Build the package (creates source and wheel distributions)make clean: Remove build artifactsmake format: Format code with ruffmake check: Run linter checks
You can build the package with:
make build
Releasing to PyPI
This project uses GitHub Actions to automatically publish to PyPI when you create a new GitHub release.
First-time setup
You need to configure PyPI's Trusted Publishers feature (one-time setup):
- Go to PyPI and log in to your account
- Navigate to your project's settings (or create the project first if it doesn't exist)
- Go to the "Publishing" section
- Add a new publisher with these settings:
- PyPI Project Name:
rmsfact - Owner:
lewinfox(your GitHub username) - Repository name:
rmsfact - Workflow name:
publish.yml - Environment name: (leave blank)
- PyPI Project Name:
Creating a release
Once trusted publishing is configured, simply create a new GitHub release:
- Update the version in pyproject.toml
- Commit and push your changes
- Create a new release on GitHub with a tag matching the version (e.g.,
v0.5.0) - The GitHub Action will automatically build and publish to PyPI
You can also manually publish with:
make upload
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 rmsfact-0.5.0.tar.gz.
File metadata
- Download URL: rmsfact-0.5.0.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2c9a56cdd8da60634ebd57539e806d0a745884260c24e9525464a614f379582
|
|
| MD5 |
3bf34f5553bec1fd7b3e6d661e148243
|
|
| BLAKE2b-256 |
76a9076d4e4aa14886c87d8d979cfb772d1c12617c427864dcadff566eeebfc1
|
Provenance
The following attestation bundles were made for rmsfact-0.5.0.tar.gz:
Publisher:
publish.yml on lewinfox/rmsfact
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rmsfact-0.5.0.tar.gz -
Subject digest:
c2c9a56cdd8da60634ebd57539e806d0a745884260c24e9525464a614f379582 - Sigstore transparency entry: 1004663605
- Sigstore integration time:
-
Permalink:
lewinfox/rmsfact@65440ed1794df795e915f834f04690c68b62d82e -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/lewinfox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@65440ed1794df795e915f834f04690c68b62d82e -
Trigger Event:
release
-
Statement type:
File details
Details for the file rmsfact-0.5.0-py3-none-any.whl.
File metadata
- Download URL: rmsfact-0.5.0-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b5732e0b2b68767609187c9c99738fe4e98c067d1ca72349abf130e4c903f56
|
|
| MD5 |
8977f4271530f471184e12b8fd9db97e
|
|
| BLAKE2b-256 |
bea8a34ac52c11cd4ba3e0b12f17ba50cba799349654ac672e6c30715522ac99
|
Provenance
The following attestation bundles were made for rmsfact-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on lewinfox/rmsfact
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rmsfact-0.5.0-py3-none-any.whl -
Subject digest:
8b5732e0b2b68767609187c9c99738fe4e98c067d1ca72349abf130e4c903f56 - Sigstore transparency entry: 1004663607
- Sigstore integration time:
-
Permalink:
lewinfox/rmsfact@65440ed1794df795e915f834f04690c68b62d82e -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/lewinfox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@65440ed1794df795e915f834f04690c68b62d82e -
Trigger Event:
release
-
Statement type: