Update README.md

This commit is contained in:
2025-01-27 04:49:33 +00:00
parent eeed9f8c89
commit d2a3caffac

View File

@@ -1,22 +1,17 @@
# PicoPackage # PicoPackage
*This project is very Alpha state and will change substantially.* This is a scheme for sharing text content, often source code, that's too small to be a language package ( Gem in Ruby, Package in Python, Create in Rust, Module in Perl or Go) but used frequently enough that copy and pasting between projects is painful. It is used to track a single file of text, allowing you to update it centrally for distribution, hosted as a file or a URL.
This is a scheme for sharing code that's too small to be a language package ( Gem in Ruby, Package in Python, Create in Rust, Module in Perl or Go) but used frequently enough that copy and pasting between projects is painful. It is used to track a single file of code, allowing you to update it centrally for distribution. Taking the concept of `front matter` from static site generaters, we add a commented block of metadata encoded with Yaml, which will be parsed by the `picopackage` tools.
Using the concept of `front matter` we add a commented section, as per the language requirements of the code, of metadata which will be parsed by the `ccp` tools.
# Hosting goals # Hosting goals
Ideally, code should be able to be hosted anywhere, but it'd be great to specifically support Github Gists. Ideally, code can be hosted anywhere, but it'd be great to specifically support Github Gists.
# Code Audience # Audience
It's perfectly acceptable to use CCP for private code, for personal or organisational use. It's perfectly acceptable for code for public consumption. It's perfectly acceptable to use Picopackage for private code, for personal or organisational use. It's perfectly acceptable to package code or configuration or data for public consumption.
# Dependency Management # Dependency Management
None - each file must be self contained. None - currently.
# Self Contained
A file must be self contained, requiring / including any library to allow it to run
# Testing # Testing
Ideally, there'll be a test method or link to a test file. Ideally, there'll be a test method or link to a test file.
@@ -29,19 +24,21 @@ SigStore to validate the author
Using comments, we'll include the following attributes Using comments, we'll include the following attributes
## Required Metadata ## Required Metadata
* source_url: Link to the latest version of this file. Links directly to the source ready for importing. * url: Link to a the human readble version.
* home_url: Link to the human readble version * file_name: name of the file, otherwise guessed from the url
* version: the version of this file. * version: the version of this file.
* test_url: link to a related file for tests
* test_method: name of the test method, if included within this file
* licence: souce code licence
* content_checksum: A sha256 hash of the file contents, excluding the front matter. * content_checksum: A sha256 hash of the file contents, excluding the front matter.
* content_timestamp: Timestamp for the content, formatted as RFC1123.
## Optional Metadata ## Optional Metadata
* file_name: name of the file, otherwise guessed from the url * licence: souce code licence
* parent_revision: in the case of Gist style services, * source_url: Optionally link to the latest version of this file if `url` isn't parsable.
## Future consideration
### Public Key signature, like RubyGems
* signature: A Base 64 Signature * signature: A Base 64 Signature
* public_key: The public key component for signature verification * public_key: The public key component for signature verification
### Sigstore
* sigstore: attributes for sigstore including :signature, :rekor_log_id, rekor_entry - for future * sigstore: attributes for sigstore including :signature, :rekor_log_id, rekor_entry - for future