Download the PHP package nochso/writeme without Composer

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

nochso/writeme

GitHub tag write me to read me

nochso/writeme is a PHP CLI utility for maintaining README and related files.

For example the following table of contents was generated from the @toc@ placeholder in WRITEME.md.

Introduction

writeme can be considered a template engine with a focus on typical Markdown documents like readme, change logs, project documentation etc. Even though it's geared towards Markdown, other Markup languages and plain text will work.

A writeme document can contain YAML frontmatter and text content:

The frontmatter placeholder @answer@ will be converted to 42 by running writeme <file>. This is pretty basic, however there are other types of placeholders you can use.

You could even write your own by implementing the Placeholder interface. For example the documentation of each placeholder is automatically generated from the PHPDocs of the placeholder classes. That way this README is easily updated.

Installation

For end-users the PHAR version is preferred. To install it globally:

  1. Download the PHAR file from the latest release.
  2. Make it executable: chmod +x writeme.phar
  3. Move it somewhere within your PATH: sudo cp writeme.phar /usr/local/bin/writeme

As local Composer development dependency per project:

As global Composer dependency:

Requirements

This project is written for and tested with PHP 5.6, 7.0 and HHVM.

Usage

Running writeme

If you've required nochso/writeme in your project using Composer, you can run the writeme executable PHP file located in vendor/bin:

vendor/bin/writeme

Run it without any arguments to get an overview of available arguments.

Initializing a new template

writeme comes with a template for a typical Composer based project available on Packagist. You can initialize your own WRITEME.md based on this template:

writeme --init

Simply answer the questions. Some are optional and pressing enter will either skip them or use defaults.

Some placeholders have default settings: you will be asked if you want to override these. Your custom settings will then be added to the YAML frontmatter.

Once you're done, you should have two new files. The template and the resulting output, usually WRITEME.md and README.md.

Escaping placeholders

To avoid replacing a placeholder, escape the @ characters with backslashes: \@example.escape\@.

Specifying a target file name

By default files named WRITEME* will be saved to README*. Names that are all upper/lower-case are preserved. This default behaviour can be overriden using the CLI option --target <filename> or frontmatter key target:

Available placeholders

Frontmatter @*@

Frontmatter placeholders return values defined in the frontmatter.

You can define any kind of structure as long as it doesn't collide with the name of any other available placeholder:

Frontmatter values are accessed using dot-notation, resulting in this output:

Using dots in the keys themselves is possible by escaping them with backslashes. See the Dot class provided by nochso/omni.

@*@

TOC @toc@

TOC placeholder creates a table of contents from Markdown headers.

@toc@

Collects all Markdown headers contained in the document with a configurable maximum depth.

@toc.sub($maxDepth)@

@toc.sub@ collects Markdown headers that are below the placeholder and on the same or deeper level.

If there's a header above the placeholder, its depth will be used as a minimum depth. If there's no header above the placeholder, the first header after the placeholder will be used for the minimum depth. There is currently no maximum depth for @toc.sub@.

e.g.

is converted into

Default options

API @api@

API creates documentation from your PHP code.

By default it will search for all *.php files in your project excluding the Composer vendor and test* folders.

Available template names:

@api($templateName)@

Default options

Changelog @changelog@

Changelog fetches the most recent release notes from a CHANGELOG written in Markdown.

This placeholder is intended for changelogs following the keep-a-changelog conventions. However it should work for any Markdown formatted list of releases: each release is identified by a Markdown header. What kind of header marks a release can be specified by the changelog.release-level option.

@changelog@

Default options

Badge @badge@

@image($imageUrl, $altText, $url)@

@badge($subject, $status, $color, $altText, $url)@

Badge creation via shields.io.

@badge.writeme@

Bonus badge for mentioning writeme.

@badge.travis($userRepository, $branch)@

Travis CI build status.

@badge.license($userRepository)@

@badge.scrutinizer($userRepository, $branch)@

scrutinizer.

@badge.coveralls($userRepository, $branch)@

@badge.tag($userRepository)@

License

nochso/writeme is released under the MIT license. See the LICENSE for the full license text.


All versions of writeme with dependencies

PHP Build Version
Package Version
Requires symfony/yaml Version ^3.0
aura/cli Version ^2.1
nette/finder Version ^2.3
roave/better-reflection Version ^1.0
nochso/omni Version ^0.3.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 nochso/writeme contains the following files

Loading the files please wait ....