Download the PHP package buonzz/scalp without Composer

On this page you can find all versions of the php package buonzz/scalp. 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 scalp

Scalp

Command line tool to Analyze and store your Media file's metadata.

Do you or your organization have a bunch of images/videos lumped into some hard drive? If those are stored in a non-structured way, like there is no real scheme on how it is organized (by date, by album etc). Performing analysis and retrieving a certain set of files will be really tough to do.

Scalp allows you analyze and extract a lot of information from those bunch of media files and build "something" out of that data. It is purely a backend tool that is designed to support any kind of application you might be developing on that top of the extracted info.

Few situations it could be useful:

Below is the overview of how Scalp works

scalp architecture diagram

Advantages

Requirements

Install

It is very easy to install Scalp as a CLI utility:
via wget

via curl

After this, scalp command is available anywhere in your computer. To check if the scalp is installed properly, just execute

This should output

via Composer - Globally

You can install scalp globally in your machine:

Simply add this directory to your PATH in your ~/.bash_profile (or ~/.bashrc) like this:

via Composer - per-project

just require the buonzz/scalp in your composer project

Usage

Scalp can extract the metadata information from your media files and export it to following:

First, you need to create a configuration file called .env This will be used by scalp to retrieve certain information:

Setting Description Default
INPUT_FOLDER the folder on which to read the files to analyze current folder
OUTPUT_FOLDER where to dump the JSON files / thumbnails dist
THUMB_PERCENT_RESIZE Used when creating thumbnails, this should be between 10-100, the images will be resized with this percent value 10

Metadata Extraction

To generate static JSON files

Sample extracted metadata

Thumbnail Creation

Running in the background

If you got a relatively large collection of media files. It might take hours for the process to complete. You can place the process in the background, so that it will continue to execute even after you had logged out in the terminal.

Backend Storage

The processed data can be stored in multitude of ways. Allowing you to freely use its data in whatever purpose it may serve for your use-case.

File

The simpliest backend is the file storage. It simply dumps everything to whatever you had defined in the OUTPUT_FOLDER configuration in your .env file. You can either use the generated files and host it to your web server/CDN or pass it to your application for further processing.

ElasticSearch

When using ElasticSearch as a backend. Make sure to provide the following entries in your .env file

Setting Description Default
DB_HOSTNAME database hostname for the ElasticSearch Server localhost
DB_NAME index name of the documents in ElasticSearch metadata
DOC_TYPE the document type in ES (table name for RDBMS) files
DB_PORT port number for ES 9200
DB_USER username for the database null
DB_PASSWORD database password null
LOG_FOLDER where to write the log file, this is the log file generated by ElasticSearch client. Useful in debugging logs

Load it to ElasticSearch

Save thumbnails to ElasticSearch

Viewing the thumbnails

You can get a preview of those thumbnails by using the PHP's built in web server

then in your localhost, just append the url given by search command.

BackBlaze's B2 Cloud Storage

B2 is a great way to store both your metadata and thumbnails if you plan to serve those data in a web site with high traffic. It is way cheaper than the other alternative, plus it offers you a free 10GB initial storage so you don't really need to pay anything unless you decide to upload more contents.

Provide the following entries in your .env file prior to using the BackBlaze

Setting Value
B2_ACCOUNT_ID your BackBlaze account ID
B2_APPLICATION_KEY Application key for your account

Then execute the following to extract, create thumbnail and upload the data to B2:

the first parameter (scalp-test) is the bucket name you created in your backblaze account, and the second parameter is the folder where the files to be uploaded is located.

AWS S3

TODO


All versions of scalp with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
vlucas/phpdotenv Version ^2.2
symfony/console Version ^3.0
james-heinrich/getid3 Version 1.9.*
monolog/monolog Version ^1.19
masterexploder/phpthumb Version ^2.1
symfony/stopwatch Version ^3.0
guzzlehttp/guzzle Version ^6.2
cwhite92/b2-sdk-php Version ^1.2
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 buonzz/scalp contains the following files

Loading the files please wait ....