8000 GitHub - thegene/file_sync: Syncs files across disparate cloud (and local storage) systems
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

thegene/file_sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileSync

Tool which syncs files across cloud and local storage locations.

  • DropBox
  • Google Cloud
  • AWS S3
  • Local Storage

WIP: so far only supports DropBox > Local syncing.

Running example

You will need to create two Sourcees, the first being the file source and the latter being the target source. In this example, we're copying files from a DropBox folder My Pictures and saving them in a local directory /drop_box_files

NOTE: I haven't set up an actual application yet for this, so it's still hilariously manual.

require IEx

alias FileSync.Interactions.SyncServer

alias FileSync.Boundaries.{
  FileSystem,
  DropBox
}

# DropBox options:
folder = "Harrison Birth" # The name of the folder you want to sync. Doesn't do nested folders yet
limit = 3 # The page size for querying. Re-queries every hour
token_file_path = "tmp/dropbox_token" # path to a file containing your dropbox api token

# FileSystem options:
target_directory = "data" # Directory where you want to save your files


source = DropBox.default_source(folder, limit, token_file_path)

target = FileSystem.default_target(target_directory)

{:ok, server} = SyncServer.start_link(source: source, target: target)

IEx.pry

Installation

If available in Hex, the package can be installed by adding file_sync to your list of dependencies in mix.exs:

def deps do
  [
    {:file_sync, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/file_sync.

About

Syncs files across disparate cloud (and local storage) systems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0