Jump to content

Topic on Talk:PAWS

How can i change the default edit summary

6
Summary by Chicocvenancio

Question resolved.

Info-farmer (talkcontribs)

I am from ta.wiki and using PAWS for categorization, replace text,.. An example There the default edit summary is (Pywikibot v.2) (அடையாளம்: PAWS [1.2]). But i want to put my edit summary to ease the patrol of a sysop at the recent changes. Where i can do the edit summary customization?

Ivanhercaz (talkcontribs)

Hi @Info-farmer! There are several ways to change the summary if you use Pywikibot.

You can use -summary: in your PAWS shell with the script that you want. Another way is set a message in your user-fixes.py, very useful if you use a fix to replace; you can read about it.

Good luck with your tasks!

Regards, Ivanhercaz (talk) 21:07, 26 December 2016 (UTC)

Info-farmer (talkcontribs)

still i am unable to use the -summary:

i created 2 files to add a category. One is list of wiki pages(category-list.csv) to add a category. Another is a python script page namely add-category.py in which the script is as follows:-

import csv 
import pywikibot

with open('category-list.csv', 'r') as csvfile:
    reader = csv.reader(csvfile,delimiter="~")
    for row in reader:
        booktitle=row[0]
        print (row[0]) 
        site = pywikibot.Site('ta', 'wikipedia')
        page = pywikibot.Page(site, booktitle)
        page.text = page.text+'\n[[category:தனியுடைமை மென்பொருட்கள்]]'
        page.save()

When i run the command at PAWS's terminal as bellow,

python add-category.py -summary:+category:தனியுடைமை மென்பொருட்கள்

nothing happens in the edit summaty. What is the procedure, i have to follow. I am a newbie.Please,guide me.

Ivanhercaz (talkcontribs)

Don't worry @Info-farmer! I am not an expert but I can try to help you.

If you use python add-category.py -summary:+category:தனியுடைமை மென்பொருட்கள் you should try to write the summary between " ", in that way: python add-category.py -summary:"+category:தனியுடைமை மென்பொருட்கள்".

If it doesn't work for you, you can try to set summary text in your python script. To make that you have to add to page.save() something like page.save(summary="text"). You can read about in Pywikibot old docs.

I hope it could help you!

Regards, Ivanhercaz (talk) 10:32, 27 December 2016 (UTC)

Info-farmer (talkcontribs)

page.save(summary="text") method works fine. See the result The first terminal method is not working. Though English is not convenient language for me, i will read the refered old pywikibot page by you.. Thanks indeed brother !.

Ivanhercaz (talkcontribs)

Glad to know you got it! Don't worry, if you have something more only ask, we are here to help between us.

Your welcome and good luck with your task!

Regards, Ivanhercaz (talk) 18:53, 27 December 2016 (UTC)