From c5711736f9860542b8328b204e308308ab25c900 Mon Sep 17 00:00:00 2001 From: shivang-b <97739650+shivang-b@users.noreply.github.com> Date: Wed, 29 Jun 2022 19:22:28 +0530 Subject: [PATCH] Update README --- README | 59 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/README b/README index 27245bf..5c1cf6f 100644 --- a/README +++ b/README @@ -1,38 +1,35 @@ -This library provides the ability to automate various -SharePoint activities through easy to read and modify Python -scripts. +## Overview +This library provides the ability to automate various SharePoint activities through easy to read and modify Python scripts. -The core library is located in the sp module. The scripts -module contains a number of scripts for performing specific -activities such as backing up sites. +The core library is located in the sp module. The scripts module contains a number of scripts for performing specific activities such as backing up sites. -USAGE +## Usage +```python +# Working with the sp module. - # Working with the sp module. - - import sp - from sp import * - - # enumerate all sites and print out the url - sp.enum_sites("http://myserver", lambda s: print s.Url) - - # apply a master page to all webs - def apply_theme(web): - web.MasterUrl = "http://myserver/custom.master" - web.Update() - - sp.enum_all_webs("http://myserver", apply_theme) - +import sp +from sp import * + +# enumerate all sites and print out the url +sp.enum_sites("http://myserver", lambda s: print s.Url) + +# apply a master page to all webs +def apply_theme(web): + web.MasterUrl = "http://myserver/custom.master" + web.Update() + +sp.enum_all_webs("http://myserver", apply_theme) +``` - # Calling scripts in the scripts module - > cd sp.py - > ipy backupsites.py --url http://myserver --destination c:\backups --overwrite - > - > ipy setprofileprop.py --url http://myserver --property Picture --value http://myserver/pics/{Alias}.jpg - > +# Calling scripts in the scripts module + +> cd sp.py +> ipy backupsites.py --url http://myserver --destination c:\backups --overwrite +> +> ipy setprofileprop.py --url http://myserver --property Picture --value http://myserver/pics/{Alias}.jpg +> -REQUIREMENTS +## Requirements -This library is designed to work with Iron Python 1.1.1. You -can download Iron Python from http://www.codeplex.com/IronPython. +This library is designed to work with Iron Python 1.1.1. You can download Iron Python from http://www.codeplex.com/IronPython.