Coder Social home page Coder Social logo

hi-folks / ibis-next Goto Github PK

View Code? Open in Web Editor NEW

This project forked from themsaid/ibis

33.0 33.0 1.0 1.66 MB

A PHP tool that helps you write eBooks in markdown and convert to PDF and EPUB

Home Page: https://packagist.org/packages/hi-folks/ibis-next

License: Other

PHP 74.77% HTML 18.87% CSS 6.36%
ebook epub pdf php

ibis-next's People

Contributors

aarondfrancis avatar aaronsaray avatar alexellis avatar amitmerchant1990 avatar dcblogdev avatar eberkund avatar edwinheij avatar elminson avatar jer3m01 avatar liorchamla avatar owenvoke avatar phikhi avatar roberto-butti avatar s-moon avatar shalvah avatar tarekdj avatar themsaid avatar thinkverse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

peterfox

ibis-next's Issues

epub generation fails with the sample project

Following along with the installation instructions we find we can easily generate a PDF file but epub generation errors out:

./vendor/bin/ibis-next epub
PHP Warning:  Module "curl" is already loaded in Unknown on line 0
PHP Warning:  Module "gd" is already loaded in Unknown on line 0
✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨
✨ EPUB generation is a Working in Progress!! ✨
✨                Stay tuned!!                ✨
✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨
Loading config/assets from: ./
Loading config file from: .//ibis.php
Loading content from: .//content
==> Preparing Export Directory ...
==> Parsing Markdown ...
==> Adding Book Cover .//assets/cover-ibis.webp ...
PHP Fatal error:  Uncaught Error: Class "DOMDocument" not found in /home/johnb/Desktop/my-first-ebook/vendor/hi-folks/phpepub/src/PHPePub/Core/EPub.php:397
Stack trace:
#0 /home/johnb/Desktop/my-first-ebook/vendor/hi-folks/phpepub/src/PHPePub/Core/EPub.php(420): PHPePub\Core\EPub->findIdAttributes()
#1 /home/johnb/Desktop/my-first-ebook/vendor/hi-folks/phpepub/src/PHPePub/Core/EPub.php(1424): PHPePub\Core\EPub->extractIdAttributes()
#2 /home/johnb/Desktop/my-first-ebook/vendor/hi-folks/phpepub/src/PHPePub/Core/EPub.php(1380): PHPePub\Core\EPub->addReferencePage()
#3 /home/johnb/Desktop/my-first-ebook/vendor/hi-folks/ibis-next/src/Commands/BuildEpubCommand.php(140): PHPePub\Core\EPub->setCoverImage()
#4 /home/johnb/Desktop/my-first-ebook/vendor/hi-folks/ibis-next/src/Commands/BuildEpubCommand.php(70): Ibis\Commands\BuildEpubCommand->buildEpub()
#5 /home/johnb/Desktop/my-first-ebook/vendor/symfony/console/Command/Command.php(326): Ibis\Commands\BuildEpubCommand->execute()
#6 /home/johnb/Desktop/my-first-ebook/vendor/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run()
#7 /home/johnb/Desktop/my-first-ebook/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#8 /home/johnb/Desktop/my-first-ebook/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#9 /home/johnb/Desktop/my-first-ebook/vendor/hi-folks/ibis-next/ibis-next(31): Symfony\Component\Console\Application->run()
#10 /home/johnb/Desktop/my-first-ebook/vendor/bin/ibis-next(117): include('...')
#11 {main}
  thrown in /home/johnb/Desktop/my-first-ebook/vendor/hi-folks/phpepub/src/PHPePub/Core/EPub.php on line 397

The message does say that epub generation is a work in progress so perhaps I'm being impatient ??

[Feature Request] Supporting aside (or admonitions or callouts) in the Markdown

Supporting Aside (or admonitions or callouts) in the markdown.
Asides (also known as “admonitions” or “callouts”) are useful for displaying secondary information alongside a page’s main content.
Provide a custom Markdown syntax for rendering asides. Aside blocks are indicated using a pair of triple colons ::: to wrap your content, and can be of type note, tip, caution or danger.

Example:

:::note
This is a note
:::

Setting the content directory

Adding an option for build and epub command for allowing the user to define a content directory. By default, the content/ directory in the current directory is used as content directory where to load the markdown files.

Initialize the ebook in a different directory

Add the -d option to the init command in order to set a different directory.
This is helpful for example if you want to install Ibis Next once and you want to create and manage multiple books.

Create a sample book for Ibis Next

The init command initialize the book folder with assets and content, with an example of a small book. Creating the stub content with the instructions for using Ibis Next could be useful.
So, the content creators who want to start using the tool to create the book can have an example book as a boilerplate.
The sample book about Ibis Next can have:

  • a cover png image
  • a chapter about what Ibis Next is
  • a chapter about installation (with requirements)
  • a chapter about configuration (explaining all the ibis.php parameters)
  • a chapter about how to write the content
  • a chapter about how to build PDF and EPUB

pcre.backtrack_limit is set too small.

So I was building a very large PDF file with over 5,000 pages. Before ibis-next finished building it an error occurred:

✨✨ 5870 PDF pages ✨✨

In Mpdf.php line 27072:

The HTML code size is larger than pcre.backtrack_limit 1000000. You should use WriteHTML() with smaller string lengths. Pass your HTML in smaller chunks.

pdf [-c|--content [CONTENT]] [-d|--workingdir [WORKINGDIR]] [--] [<theme>]

The fix is to edit /etc/php/8.1/cli/php.ini and find the line where pcre.backtrack_limit is defined. It's commented out. Remove the leading semicolon and change the value to 5000000.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.