Download the PHP package kraenzle-ritter/format-policy without Composer

On this page you can find all versions of the php package kraenzle-ritter/format-policy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package format-policy

kraenzle-ritter/format-policy

A format policy registry and preingest for Laravel. Used by Anton (archival description) and agate (SIP preparation), so that both apply the same rules under the same keys.

Before a file is ingested, the preingest identifies it, applies the rules in force for the tenant and the route the file came by, verifies each result and identifies it again. It never fails an ingest: a step that fails, a verification that does not pass, a result that is not smaller — the file as it was before that rule is kept, and the outcome is recorded.

Concepts

Entry What it is
Tool A program, the names it may go by, and how to ask it for its version
Command How a tool is called — identify, characterize, transform or verify — by a template or a handler class
Rule When and what for: phase, format match (MIME, PRONOM, extension), ingest routes, a precheck that may veto it, transforms, a verification, and what becomes of the original

Every entry has a stable key and an English label and description. Keys are never deleted or given a new meaning: events recorded on files name them. Retire a rule and add its successor under a new key with replaces.

The tools, commands and rules live in the package's catalogue (resources/catalogue.php). A program may add entries of its own in config/format-policy.php; one that redefines a catalogue key is reported in problems() and ignored.

Rules in the catalogue

Key Default What it does
tiff_zip off Repacks a TIFF losslessly as Deflate with predictor 2 (tiffcp), copies its metadata back (exiftool) and verifies the pixels page by page (ImageMagick). Skips TIFFs already packed so, JPEG-compressed, bitonal or BigTIFF, and results that are not smaller. Not for SIPs (sip_ech, sip_agate).

Installation

Tools used by the catalogue: sf (Siegfried), tiffcp (libtiff-tools), exiftool, magick (ImageMagick 7). A rule whose tools are missing on the server is not applied, and a warning is logged.

Usage

The route is a string the program defines (Anton: upload, media_add, sip_ech, …); a backed enum is accepted by its value.

Each RuleOutcome is meant to be stored as an event on the ingested file (Anton: a format-normalization medium event). Its details name the rule, the route, the tools with their versions, and MD5, SHA-512, size, PRONOM id and MIME type before and after.

Preingest::plan() names the rules that would act on a file without changing it; PreingestForecast::forFiles() estimates, by extension and MIME type only, how many files of an import a rule may act on.

Switches per tenant

Whether a rule is in force is decided per tenant by a SwitchStore; a rule's enabled_by_default applies where the tenant says nothing. A retired rule is never in force.

Testing

The TIFF fixtures are built by tests/fixtures/make-fixtures.sh.

License

MIT


All versions of format-policy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^12.0|^13.0
illuminate/process Version ^12.0|^13.0
illuminate/filesystem Version ^12.0|^13.0
illuminate/translation Version ^12.0|^13.0
illuminate/view Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kraenzle-ritter/format-policy contains the following files

Loading the files please wait ...