1.0.0 • Published 4 years ago

@quantr/quantr-365-cli v1.0.0

Weekly downloads
1
License
Quantr Commercial...
Repository
gitlab
Last release
4 years ago

This command not live yet, we are just designing this cli library

Introduction

We need a set of command to manipulate the data on Office 365, especially SharePoint.

Developers

Peter peter@quantr.hk , System Architect

Tiffany tiffany@quantr.hk , Programmer

Installation

npm i -g @quantr/quantr-365-cli

Development

Compile

Edit src/index.ts, then

npm run build

Run

node dist/index.js -c clonelist --username dev@quantr.hk --password xxx --from https://quantr.sharepoint.com/quantr-365-cli/lists/list1 --to https://quantr.sharepoint.com/quantr-365-cli/lists/list2

Commands

This command support these functions:

  1. Create list (done)
  2. Copy list items to
  3. Clone list
  4. Clone user groups
  5. Export list to excel (done)
  6. Import excel to list
  7. Clone site
  8. Google drive to SharePoint folder

Create empty list option

Options

  1. --username
  2. --password
  3. --from
  4. --listname
quantr-365-cli -c createlist --username peter@quantr.hk --password xxx --from https://quantr.sharepoint.com/tiffany/Lists/testing4 --listname testing4

Create list

--type(s)

  1. 9 (number)
  2. 2 (text)
  3. 3 (note)
  4. 4 (datetime)

Propertie(s)

  1. title (necessary)
  2. required
  3. default
  4. unique
  5. readonly
quantr-365-cli -c createlist --username peter@quantr.hk --password xxx --from https://quantr.sharepoint.com/tiffany --listname testing --field type=9,title=testnum1

Create list from json

quantr-365-cli -c createlist --username peter@quantr.hk --password xxx --from https://quantr.sharepoint.com/tiffany/Lists/testing4 --listname testing4 --json xx.json

Export list

quantr-365-cli -c exportlist --username peter@quantr.hk --password xxx --from https://quantr.sharepoint.com/tiffany/Lists/testing4 --listname testing4

Clone list (Same tenant)

quantr-365-cli -c clonelist --username peter@quantr.hk --password xxx --from https://quantr.sharepoint.com/tiffany/Lists/claim%20form --to https://quantr.sharepoint.com/tiffany/Lists --titlefield Title

Clone list (Different tenant)

quantr-365-cli -c clonelist --username peter@quantr.hk --password xxx --usernameDest peter@quantr.hk --passwordDest xxx --from https://quantr.sharepoint.com/dev/lists/list1 --to https://xxx.sharepoint.com/eform/lists/list1 --titlefield Title

Get list

node dist/index.js -c getlist --username peter@quantr.hk --password xxx --from https://quantr.sharepoint.com/tiffany --listname testing6