putiosync

package module
v2.0.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2020 License: MIT Imports: 27 Imported by: 0

README

putio-sync

Command-line program to sync a folder between put.io and your computer.

WARNING: The project is still in development and features are subject to change!

Build Status GitHub Release

Installing

If you are on MacOS you can install from brew:

brew install putdotio/putio-sync/putio-sync

Otherwise, get the latest binary from releases page.

Usage

Run the program with your account credentials:

putio-sync -username <username> -password <password>

Then program is going to sync the contents of these folders:

  • $HOME/putio-sync in your computer
  • /putio-sync in your Put.io account

The folders are created if they don't exist. The program exists after sync. You can run it again whenever you want to sync.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidCredentials = errors.New("invalid credentials")

Functions

func Sync

func Sync(ctx context.Context, config Config) error

Types

type Config

type Config struct {
	// Username of put.io account.
	Username string
	// Password of put.io account.
	// An OAuth token can be used instead of password.
	// Token must be prefixed with "token/" (without quotes).
	// In that case, Username is not required.
	Password string
	// Do not make changes on filesystems. Only calculate what needs to be done.
	DryRun bool
	// Sync repeatedly. Pause given duration between syncs.
	// If value is greater than zero, Sync function does not return on synchronization errors.
	// However, it retruns on authentication error since there is no point in retrying in this case.
	Repeat time.Duration
	// Listen address for HTTP server.
	// The server has an endpoint for getting the status of the sync operation.
	Server string
	// Set log level to debug.
	Debug bool
}

type ConfigError added in v2.0.24

type ConfigError struct {
	Reason string
}

func (*ConfigError) Error added in v2.0.24

func (e *ConfigError) Error() string

Directories

Path Synopsis
cmd
putio-sync command
internal
tus

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL