Download the PHP package enlight/scratch without Composer

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


THIS IS WELL MAINTAINED FORK OF THEMSAID/IBIS PROJECT.


This PHP tool helps you write eBooks in markdown. Run scratch build and an eBook will be generated with:

  1. A cover photo.
  2. Clickable auto-generated table of contents.
  3. Code syntax highlighting.
  4. Available in 2 themes. Light and dark.

Installation

Make sure you have PHP7.3 or above installed on your system and that your gd extension is enabled in your php.ini file.

First, install the composer package globally:

Then, run this command inside an empty directory:

This will create the following files and directories:

You may configure your book by editing the /scratch.php configuration file.

Writing Your eBook

The init command will create sample .md files inside the content folder. You can explore those files to see how you can write your book. This sample content is taken from Laravel Queues in Action.

Inside the content directory, you can write multiple .md files. Scratch uses the headings to divide the book into parts and chapters:

Using images

Images can be stored in the content folder and then brought in like this:

Adding a cover image

To use a cover image, add a cover.jpg in the assets/ directory (or a cover.html file if you'd prefer a HTML-based cover page). If you don't want a cover image, delete these files.

Using Fonts

Edit your /scratch.php configuration files to define the font files to be loaded from the /assets/fonts directory. After that you may use the defined fonts in your themes (/assets/theme-light.html & /assets/theme-dark.html).

Generating PDF eBook

Scratch will parse the files in alphabetical order and store the PDF file in /export.

The default is to generate the PDF using the light theme, to generate a PDF using the dark theme:

Generating A Sample

This command will use the generated files from the scratch build command to generate samples from your PDF eBook. You can configure which pages to include in the sample by updating the /scratch.php file.

Development

This project uses PHP CS Fixer with a code standard defined in .php-cs-fixer.php.

To review code out of style, you can run the fix command as a dry run. Run the composer script like this:

composer run csfix-review

To fix the source code, run the following composer script:

composer run csfix

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of scratch with dependencies

PHP Build Version
Package Version
Requires illuminate/filesystem Version ^7.0|^8.0
illuminate/support Version ^7.0|^8.0
symfony/console Version ^4.2|^5.0
mpdf/mpdf Version ^8.0
spatie/commonmark-highlighter Version ^2.1
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 enlight/scratch contains the following files

Loading the files please wait ....