themsaid / ibis

A PHP tool that helps you write eBooks in markdown and convert to PDF.
MIT License
1.97k stars 150 forks source link

[Feature Request]: Allow user to specify the markdown directory #42

Closed roberto-butti closed 3 years ago

roberto-butti commented 3 years ago

Now the markdown files are loaded from : $currentPath.'/content' Where $currentPath is retrieved from getcwd().

My proposal is to allow the user to define the directory (absolute or relative) where to load markdown files. The input argument could be --markdowndir=

If you want i could open a PR.

roberto-butti commented 3 years ago

My goal was to separate all files for ibis (executable, vendors, stubs etc) from the files specific for the book (markdown, cover, configuration ibis.php). I achieved the same goal structuring my folders in this way:

ibis/ : directory with ibis executables , vendors , stubs etc
book-1/ : directory with the first book with markdown files, configuration file , themes specific for that book, fonts etc
book-2/ : directory with the first book with markdown files, configuration file , themes specific for that book, fonts etc

This work because ibis logic retrieve content/, assets/ and ibis.php (configuration) via getcwd()

However, i did the implementation of "allow the user to use input option --markdown-dir=../book-1" on my forked repo. If you think that could be useful or make sense i could open a PR