@lyra/export
Export Lyra documents and assets
Last updated a year ago by bjoerge .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @lyra/export 
SYNC missed versions from official npm registry.

@lyra/export

Exports documents and assets from a Lyra dataset

Installing

npm install --save @lyra/export

Usage

const exportDataset = require('@lyra/export')

exportDataset({
  // Instance of @lyra/client configured to correct project ID and dataset
  client: someInstantiatedLyraClientInstance,

  // Name of dataset to export
  dataset: 'myDataset',

  // Path to write zip-file to, or `-` for stdout
  outputPath: '/home/your-user/myDataset.zip',

  // Whether or not to export assets. Note that this operation is currently slightly lossy;
  // metadata stored on the asset document itself (original filename, for instance) might be lost
  // Default: `true`
  assets: false,

  // Exports documents only, without downloading or rewriting asset references
  // Default: `false`
  raw: true,

  // Whether or not to export drafts
  // Default: `true`
  drafts: true,

  // Export only given document types (`_type`)
  // Optional, default: all types
  types: ['products', 'shops']
})

Future improvements

  • Restore original filenames, keep track of duplicates, increase counter (filename (<num>).ext)
  • Skip archiving on raw/no-asset mode?

CLI-tool

This functionality is built in to the @lyra/cli package as lyra dataset export

License

MIT-licensed. See LICENSE.

Current Tags

  • 0.3.0                                ...           latest (a year ago)

8 Versions

  • 0.3.0                                ...           a year ago
  • 0.2.8                                ...           a year ago
  • 0.2.7                                ...           a year ago
  • 0.2.6                                ...           a year ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (8)
Dev Dependencies (5)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |