From: Dan Brown Date: Thu, 9 Mar 2023 15:58:44 +0000 (+0000) Subject: Added readme and some other meta files X-Git-Url: http://source.bookstackapp.com/system-cli/commitdiff_plain/61ef2396a09efe3d15039705cc45a788ca1c40a7 Added readme and some other meta files --- diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..f3f51c7 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +github: [ssddanbrown] +ko_fi: ssddanbrown \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7727542 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2023, Dan Brown and the BookStack Project contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/compile.php b/compile.php index 16f4f00..725fc91 100644 --- a/compile.php +++ b/compile.php @@ -30,7 +30,7 @@ try { // Add the rest of the apps files $phar->addFile(__DIR__ . '/run.php', 'run.php'); $phar->buildFromDirectory(__DIR__, '/src(.*)/'); - $phar->buildFromDirectory(__DIR__, '/vendor(.*)/'); + $phar->buildFromDirectory(__DIR__, '/vendor(.*)\.php$/'); // Customize the stub to add the shebang $stub = "#!/usr/bin/env php \n" . $defaultStub; diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..650a47f --- /dev/null +++ b/readme.md @@ -0,0 +1,31 @@ +# BookStack System CLI + +A simple command line interface for managing instances of BookStack. Provides the following commands: + +- **Init** - Setup a fresh BookStack installation within a folder. +- **Backup** - Creates a backup of an existing BookStack installation to a single ZIP file. +- **Restore** - Restore a backup ZIP into an instance of BookStack. +- **Update** - Update an existing BookStack installation to the latest version. + +This CLI is intended to be platform abstract, intended for plain installs that follow our scripts/manual instructions. +This is intended to work independently from BookStack itself, so it can be used even if a BookStack instance is not available or broken, although it could be distributed with and called upon by the core BookStack codebase. + +### Development + +This project uses composer to manage PHP dependencies. They can be installed as follows: + +```bash +composer install +``` + +This project is intended to be bundled up into a single [phar file](https://www.php.net/manual/en/intro.phar.php) for portability and separation with BookStack itself. +This can be done by running the compile file: + +```bash +php compile.php +``` + +### Contributing + +I welcome issues and PRs but keep in mind that I'd like to keep the feature-set narrow to limit support/maintenance burden. +Therefore I likely won't leave issues open long, or merge PRs, for requests to add new features or for changes that increase the scope of what this script already supports. \ No newline at end of file