package
0.0.0-20240324200706-eaa17bf4a307
Repository: https://github.com/koltyakov/gosip-sandbox.git
Documentation: pkg.go.dev

# README

Folders & Files sync

The sample shows how to arrange local directory changes tracking with the corresponding synchronization with SharePoint document library.

The use-cases are:

  • assets deployment pipelines
  • file-based integrations

Build

go build -o bin/spsync.exe ./samples/spsync/

Start process

Create ./config/private.json with SAML auth credentials (or any other, but should be aligned with sources).

Run:

bin/spsync.exe -localFolder ./folder/to/watch -spFolder "Style Library"

Where:

  • -localFolder is a local folder to watch
  • -spFolder is SP folder to sync to

When applied changes are synced with SharePoint.

All flags description

go run ./samples/spsync/ -h
FlagDescription
-strategystring, Auth strategy (default "saml")
-configstring, Config path (default "./config/private.json")
-localFolderstring, Local folder to watch
-spFolderstring, SP folder to sync to (default "SiteAssets")
-skipSyncbool, Skips initial sync of files on startup
-watchbool, Watch local folder for changes