Download the PHP package graviton/import-export without Composer
On this page you can find all versions of the php package graviton/import-export. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download graviton/import-export
More information about graviton/import-export
Files in graviton/import-export
Package import-export
Short Description Tooling to help importing and exporting graviton data through REST.
License MIT
Informations about the package import-export
Simple graviton client to help importing and exporting data.
Installation
Usage
Get help:
This will show you all available commands.
Load data to a Graviton instance through REST (using the HTTP interface)
Load from dir:
Load data into the core database of a Graviton instance
Besides loading data via the HTTP interface, there are core commands available that allow you to load data into the database backend (MongoDB) of a Graviton instance.
You can import a set of existing files via the graviton:core:import
command:
The core commands file format is slightly different from the normal import format as we need to preserve certain class types. Thus, it's best to insert data into MongoDB and export that into the necessary format. This can be done using the export command:
This will dump all the data in the default database. The graviton:core:export
has more options, refer to the --help
print
for more details.
Additionally, we have a purge command that allows you to easily purge (meaning delete!) all collections inside a MongoDB database. You need to pass 'yes' as an only parameter to show that you're sure about that action.
File format
The files to be loaded must contain yaml with additional yaml frontmatt (yo dawg...).
The frontmatter part defines what target path a file is to be loaded to.
Importing Files to /file/
- Files cannot be overwritten, an attempt to update a file-dataset with the tool will throw an error.
Example for a File-Upload, i.e. swisscom.png with additional link to be added to the file dataset:
Validate Files
Files are not native YML or JSON file so using this command you can easily check if they are ok.
You can also check for any subfolder directly. Output (single error sample):
Authentication and Headers on "put" import
Some endpoints may require basic auth or some cookie or header to be sent. -a and -c can be used in combination.
Building Docker Runtime
Docker Runtime
Building phar package
Run phar build:
Deploying phar host
Or use deploy-scripts to deploy in automated blue/green fashion.
TODO
- [x] implement importer
- [ ] implement exporter
- [x] build phar
- [x] deploy phar
- [ ] automate phar deployment
- [ ] document phar usage
All versions of import-export with dependencies
ext-iconv Version *
symfony/console Version ~4.4.0
symfony/finder Version ~4.4.0
symfony/filesystem Version ~4.4.0
symfony/yaml Version ~4.4.0
symfony/var-dumper Version ~4.4.0
guzzlehttp/guzzle Version ^6.0
webuni/front-matter Version ^1.0
zumba/json-serializer Version ^2.0
flow/jsonpath Version ^0.5.0
alcaeus/mongo-php-adapter Version ^1.1
monolog/monolog Version ~1
sentry/sentry Version ^1
symfony/monolog-bridge Version ~4.4.0