Giter VIP home page Giter VIP logo

filesync's Introduction

filesync README

FileSync will keep files synchronized between src and dest locations. It can also clone git repositories before synchronizing, and rename files.

Note: This has never been run/tested on any Mac/UNIX box. My guess is it will not work, as FileSync uses the Node file System extensively, and I'm sure there are major differences in how the calls should be made.

Install/Run

  • Install: npm -g pgmjah-filesync
  • Run: filesync <fsconfig.json>

Note: You can create a default 'fsconfig.json' file in the current directory by running filesync, then type 'mkdef' and enter.

Features

  • Clone git repositories
  • Rename files
  • Keep files synchonized between source/destination directories.
  • Simple to configure.

FileSync Configuration

  • Add file(s) called "fsconfig.json" (see below) to the folders you open, or are part of your workspace.

fsconfig.json

  • You can have multiple fsconfig.json files, the extension will find them in your workspace/folders and load each one.

The FileSync config file is a json object with the following layout:

{
	"configs":
	[
		{
			"name":"sample_sync_config",
			"enabled":true,
			"rename":
			[
				{
					"src":"c:/path/to/file/file.ext",
					"name":"new_name.ext"
				}
			],
			"git":
			[
				{
					"src":"https://github.com/gitrepo/gitrepo.git",
					"dest":"c:/clone/to/this/location"
				}
			],
			"sync":
			[
				{
					"src":"c:/some/source/folder",
					"dest":"c:/some/dest/folder",
					"ignore":
					[
						"folder1/relative/to/src",
						"folder2/relative/to/src"
					],
					"bidir":true
				}
			]
		}
	]
}
  • configs - You can have an array of config blocks, each specifying their own syncing actions.
  • name - just an indentifier, has no intrinsic meaning.
  • enabled - activate/ignore this block when starting.
  • rename - array of objects specifying what files you want renamed before syncing (can be a single object, if just one).
    • src - the file you want to rename.
    • name - what you want the file renamed to. You can specify '*' as the filename to just change the extension...like "*.txt_fsync_".
  • git - array of git repositories to be cloned into a specified location (can be a single object, if just one).
    • src - location of the git repository.
    • dest - where to clone the src repos into.
  • sync - array of objects specifying what directories you want synchronized where (can be a single object, if just one).
    • src - the source directory to syncronize.
    • files - array of file names you want to sync (can be a single object, if just one). If not present will sync all files in src.
    • dest - the destination directory to keep synchronized.
    • ignore - array of relative paths to src to be ignored when syncing (can be a single object, if just one).
    • bidir - bidirectional synchronization...that is, files will be removed from destination if they don't exist in the source.

Release Notes

filesync's People

Contributors

jahpgm avatar tibcojah avatar

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.