An open API service indexing awesome lists of open source software.

https://github.com/visavi/librator

Class text library to read and process text from a file by pages
https://github.com/visavi/librator

Last synced: 12 months ago
JSON representation

Class text library to read and process text from a file by pages

Awesome Lists containing this project

README

          

# Class text library to read and process text from a file by pages

[![Latest Stable Version](https://poser.pugx.org/visavi/librator/v/stable)](https://packagist.org/packages/visavi/librator)
[![Total Downloads](https://poser.pugx.org/visavi/librator/downloads)](https://packagist.org/packages/visavi/librator)
[![Latest Unstable Version](https://poser.pugx.org/visavi/librator/v/unstable)](https://packagist.org/packages/visavi/librator)
[![License](https://poser.pugx.org/visavi/librator/license)](https://packagist.org/packages/visavi/librator)

Basic useful feature list:

* Reading text files
* A breakdown of the text on page
* Splits text based on the number of lines, number of words and characters to choose from
* Beautiful displays pages, with the ability to jump to the last and first page
* Automatic output of the header text from the first row
* The output of the current page

### Example of use

```php
read(20);

// Or split the file by the number of words
$librator->read(300, 'words');

// Or split the file by the number of characters
$librator->read(2000, 'chars');

// Get current page
$librator->currentPage();

// Automatic output of the header text from the first row
$librator->getTitle();
```

### Installing

```
composer require visavi/librator
```

### License

The class is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)