Giter Club home page Giter Club logo

dl-assetsync's Introduction

Travis Build Status Latest Stable Version Total Downloads License My wishlist on amazon

Neos Asset Synchronization

This package makes it possible to sync files from various sources into the Neos asset management. Sources can be a folder on the local file system as well as cloud services like NextCloud or Dropbox. New sync sources can be added easily. You can specify tags that are assigned to the importet assets in order to find them easily in the media browser.

Available Sources

These are currently available sources, new sources can be implemented easily - take a look at the SourceInterface to see how its done.

These are the available sources. Have a look at the detailed configuration examples bewlow.

  • Local Filesystem Source: Import files from a local folder.
  • WebDav Source: Import files from a webdav server. Also suitable to sync files from your Owncloud or Nextcloud account.
  • Dropbox Source: Import files from a Dropbox folder.

Installation and integration

The installation is done with composer:

composer require dl/assetsync

An additional database table is required which is created using:

./flow doctrine:migrate

Usage

Run the synchronization via the command controller:

./flow assetsync:sync <sourceIdentifier>

Or run all available sourceConfiguration:

./flow assetsync:syncall

Source Configuration

Generic Source configuration

sourceClass

Full qualified class name of the source class.

fileIdentifierPattern

This pattern can be used to filter the to be imported files by a given pattern. Currently the file identifier is the filename and path for all implemented sources. This can change for new sources.

Example:

fileIdentifierPattern: '.+\.(gif|jpg|jpeg|tiff|png)'

Default: .*

removeAssetsNotInSource

Configures, if files which are synced in previously, but doesn't exist in the source anymore should be removed from the assets.

Default: false

Local Filesystem Source

Syncs files from a local file system directory.

Implementation DL\AssetSync\Source\LocalFilesystemSource
Required Package none

Configuration Example:

DL:
  AssetSync:
    sourceConfiguration:
      <sourceIdentifier>:
        sourceClass: DL\AssetSync\Source\LocalFilesystemSource
        assetTags:
          - myLocalFileSource
        assetCollections:
          - assetCollectionWithSyncedItems
        sourceOptions:
          sourcePath: '<pathToLocalDirectory>'

WebDav Source

Syncs files from a WebDav Server. This can also be used to sync files from OwnCloud or NextCloud. It uses the packages League\Flysystem for an easier file system abstraction.

Implementation DL\AssetSync\Source\LeagueFlysystem\WebDavSource
Required Package league/flysystem-webdav

Configuration Example for a OwnCloud share:

DL:
  AssetSync:
    sourceConfiguration:
      <sourceIdentifier>:
        sourceClass: DL\AssetSync\Source\LeagueFlysystem\WebDavSource
        sourceOptions:
          baseUri: '<YourOwncloudURI>/remote.php/webdav/'
          pathPrefix: '/remote.php/webdav'
          userName: '<userName>'
          password: '<password>'
          authType: 1
          sourcePath: '<pathToTheFolder>'

Dropbox Source

Syncs files from Dropbox. You need to create an application to retreive the app key on https://www.dropbox.com/developers/apps.

Implementation DL\AssetSync\Source\LeagueFlysystem\DropboxSource
Required Package league/flysystem-dropbox

Configuration Example for Dropbox:

dropboxSource:
  sourceClass: DL\AssetSync\Source\LeagueFlysystem\DropboxSource
  sourceOptions:
    sourcePath: '<pathToTheFolder>'
    accessToken: <accessToken>
    appSecret: <appSecret>

dl-assetsync's People

Contributors

andrehoffmann30 avatar daniellienert avatar fnkr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dl-assetsync's Issues

Dropbox SDK

Great plugin!
flysystem-dropbox requires dropbox/dropbox-sdk but but they no longer exist ... Do you have a solution?

`[RuntimeException]
Failed to execute git clone --no-checkout 'https://:@github.com/dropbox/dropbox-sdk-php.git.git' '/data/neos/Packages/Libraries/dropbox/dropbox-sdk' && cd '/data/neos/Packages/Libraries/dropbox/dropb
ox-sdk' && git remote add composer 'https://:@github.com/dropbox/dropbox-sdk-php.git.git' && git fetch composer && git remote set-url origin 'https://github.com/dropbox/dropbox-sdk-php.git.git' && gi
t remote set-url composer 'https://github.com/dropbox/dropbox-sdk-php.git.git'

Cloning into '/data/neos/Packages/Libraries/dropbox/dropbox-sdk'...
remote: Repository not found.
fatal: repository 'https://github.com/dropbox/dropbox-sdk-php.git.git/' not found`

Migrations cant be executed due to collation

DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci doesn't work if you are on Neos 4:

Field type or character set for column 'resource' does not mach referenced column 'persistence_object_identifier'

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.