Copy Function - Tikolu/SETTI GitHub Wiki

The Copy function can be used to copy the contents of a page to another page.

Usage

setti.Copy(page, to, printOutput)

page - the page you want to copy, if not specified, will target the main page

to - where you want the the text to be copied to, if not specified, will target the main page

printOutput - not required, True by default. if True, will print out a confirmation message

The Copy command will take the contents of the page page and past them into the page to, deleting anything that was there before. It will print out Copied page to to. to the console if showOutput is True.

Examples

setti.Copy("marisa", "hell")

Copies the contents of the page http://htwins.net/edit/marisa to http://htwins.net/edit/hell.


promptA = "What page would you like to copy?"
promptB = "Where would you like to paste it?"
promptC = "Copied Successfully"

setti.Copy(input(promptA), input(promptB), False)
print(promptC)

Asks the user for the page to copy and where to paste it, but tells SETTI not to printOutput as the program has a custom confirmation message.


backupList = ["apple","pineapple","orange","mango"]
for page in backupList:
    setti.Copy(page, page + "/backup", False)
print(str(len(backupList)) + " pages backed up.")

Backs up each page in the list backupList and prints a confirmation message. For example, if the list contained the page frog, it would be backed up to frog/backup.