Giter Club home page Giter Club logo

synkr's Introduction

CloudSynkr

Release

Stable Version Latest Release

It's a small piece of software to Sync files between your device and google cloud. I created this as the way google drive sync works doesn't suit my needs.

It uses .net 8 and Google apis

Considerations

  • This app is not an active sync app, and will not keep syncing your files. You need to run it again every time you want to sync the files. Alternatively you can create a batch to run on start/shutdown to sync the files.

  • Before overriding the files in your local/cloud it will compare the last modified date of both files, in order to avoid overriding the newest version.

Setup

1. Allow app to access your gdrive

Follow the steps from this youtube video up to when Ivan downloads the credentials file at 53 seconds.

Move this file to the root folder of the app and rename to credentials.json

Below is a sample on how the file will look like:

{
    "installed": {
	    "client_id": "test-test.apps.googleusercontent.com",
		"project_id": "test-test-324234234",
		"auth_uri": "https://accounts.google.com/o/oauth2/auth",
	    "token_uri": "https://oauth2.googleapis.com/token",
	    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
	    "client_secret": "THERE_WILL_BE_A_CLIENT_SECRET_HERE",
	    "redirect_uris": [
			"http://localhost"
	    ]
	}
}

2. How to config the app

Once you unzip the release folder, you'll find a config file called appsettings.json, which has the section below. You can add as many mappings as you want.

	"SyncBackup": {
    	"Mappings": [
	    	{
		      "CloudFolderParentId": "",
		      "CloudFolderParentName": "",
			  "LocalFolder": "",
			  "CloudFolder": "",
			  "ActionType": 0,
			  "FilesToSync": []
			}
		]
	}

In order to fill CloudFolderParentId & CloudFolderParentName, you will need to go to your gdrive and create a new base folder or use an existing one, and navigate inside.

Property name Description
CloudFolderParentName Base folder name you just created/opened
CloudFolderParentId Copy the Id at the end of the URL when you're inside of a folder
LocalFolder Full local path to the files you want to download/upload
CloudFolder Folder name you want to upload/download files on gdrive
ActionType
  • None = 0 --> "Disable this mapping"
  • Sync = 1 --> "Both Download/Upload"
  • DownloadOnly = 2 --> "Only Download"
  • UploadOnly = 3 --> "Only Upload"
FilesToSync In case you only want to sync specific files from a folder, you need to add their name and extension here, you can select multiple files by separating them using a comma. ex: "save1.txt, save2.txt, save3.txt"
By populating this property, it will only sync the top folder and the selected files but not its nested folders.

synkr's People

Contributors

mauroms avatar chiapams avatar

Stargazers

 avatar  avatar

Watchers

 avatar

synkr's Issues

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.