Skip to content
Stream an rclone sync activity as a json object stream.
Branch: master
Clone or download
Latest commit b7dd07d Mar 29, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
parser
rclone
test/source
.gitignore
.travis.yml
.version.sh
CHANGELOG.md
LICENSE
README.e.md
README.md
appveyor.yml tests Mar 11, 2017
change.log
main.go
main_example.go
main_test.go

README.md

rclone-json

travis Statusappveyor Status GoDoc

Package rclone-json streams an rclone sync activity as a json object stream.

Install

Go

go get github.com/mh-cbon/rclone-json

API example

> main_example.go
package main

import (
	"encoding/json"
	"fmt"
	"os"

	"github.com/mh-cbon/rclone-json/rclone"
)

// Example demonstrates usage of Rclone-json api.
func Example() {

	// make a new instance of rclone.Cmd.
	cmd := rclone.New("src", "dst")

	// configure it
	// cmd.Stdout = ...
	// cmd.BinPath = ...
	// cmd.Stats = ...

	// Start the process
	cmd.Start()

	// consume the output, convertTo reads output objects, sends them to the encoder.
	cmd.ConvertTo(json.NewEncoder(os.Stdout))

	// wait for process end.
	cmd.Wait()

	fmt.Println("All done !")
}

Usage

$ rclone-json -help
rclone-json - 0.0.0
Usage of rclone-json:
  -bwlimit string
    	
  -checkers string
    	
  -help
    	Show help
  -rclone string
    	 (default "rclone")
  -stats string
    	
  -transfers string
    	
  -version
    	Show version
You can’t perform that action at this time.