Category.py

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Category.py

Jan Dudík
Hello, I have question about category.py

How can I do this situation:

There are category Villages and District X. I want to remove both  
categories and add new category Villages in District X.

How can I do it?

JAn

--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

_______________________________________________
Wikibots-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikibots-l
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Category.py

Pietrodn
I can't understand what you want to do. Do you want to remove the  
category links from the articles? In this case, the syntax is:
     python category.py remove <category1> <category2>

For the second part of your request ("and add new category Villages in  
District X"), do you want to add a new subcategory "Villages" in  
category "District X"? If I understood, you needn't a bot.

Best regards

Pietrodn
[hidden email]

> Da: Jan Dudík <[hidden email]>
> Data: 10 agosto 2008 13:10:43 GMT+02:00
> A: "[hidden email]" <[hidden email]>
> Oggetto: [Wikibots-l] Category.py
> Rispondi a: [hidden email], Wikimedia bot editors discussion <[hidden email]
> >
>
>
> Hello, I have question about category.py
>
> How can I do this situation:
>
> There are category Villages and District X. I want to remove both  
> categories and add new category Villages in District X.
>
> How can I do it?
>
> JAn
>
> --
> Tato zpráva byla vytvořena převratným poštovním klientem Opery: http://www.opera.com 
> /mail/


_______________________________________________
Wikibots-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikibots-l
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Category.py

Jeroen M.W. van Dijk
It looks like you want to rename category village and district X to vilage in district X.

--- On Sun, 10/8/08, Pietrodn <[hidden email]> wrote:

> From: Pietrodn <[hidden email]>
> Subject: Re: [Wikibots-l] Category.py
> To: [hidden email]
> Date: Sunday, 10 August, 2008, 7:09 PM
> I can't understand what you want to do. Do you want to
> remove the  
> category links from the articles? In this case, the syntax
> is:
>      python category.py remove <category1>
> <category2>
>
> For the second part of your request ("and add new
> category Villages in  
> District X"), do you want to add a new subcategory
> "Villages" in  
> category "District X"? If I understood, you
> needn't a bot.
>
> Best regards
>
> Pietrodn
> [hidden email]
>
> > Da: Jan Dudík <[hidden email]>
> > Data: 10 agosto 2008 13:10:43 GMT+02:00
> > A: "[hidden email]"
> <[hidden email]>
> > Oggetto: [Wikibots-l] Category.py
> > Rispondi a: [hidden email], Wikimedia bot editors
> discussion <[hidden email]
> > >
> >
> >
> > Hello, I have question about category.py
> >
> > How can I do this situation:
> >
> > There are category Villages and District X. I want to
> remove both  
> > categories and add new category Villages in District
> X.
> >
> > How can I do it?
> >
> > JAn
> >
> > --
> > Tato zpráva byla vytvořena převratným poštovním
> klientem Opery: http://www.opera.com 
> > /mail/
>
>
> _______________________________________________
> Wikibots-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikibots-l


      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html

_______________________________________________
Wikibots-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikibots-l
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Category.py

Jan Dudík
In reply to this post by Pietrodn
In the articles are now
[[Category:District X]]
[[Category:Villages]]


I want to use tidy (because in category District X are another articles  
too)
and get

[[Category:Villages in District X]]

I can do it by bot for two edits, but I want to do in in one edit.

Dne Sun, 10 Aug 2008 19:09:20 +0200 Pietrodn <[hidden email]>  
napsal/-a:

> I can't understand what you want to do. Do you want to remove the
> category links from the articles? In this case, the syntax is:
>      python category.py remove <category1> <category2>
>
> For the second part of your request ("and add new category Villages in
> District X"), do you want to add a new subcategory "Villages" in
> category "District X"? If I understood, you needn't a bot.
>
> Best regards
>
> Pietrodn
> [hidden email]
>
>> Da: Jan Dudík <[hidden email]>
>> Data: 10 agosto 2008 13:10:43 GMT+02:00
>> A: "[hidden email]" <[hidden email]>
>> Oggetto: [Wikibots-l] Category.py
>> Rispondi a: [hidden email], Wikimedia bot editors discussion  
>> <[hidden email]
>> >
>>
>>
>> Hello, I have question about category.py
>>
>> How can I do this situation:
>>
>> There are category Villages and District X. I want to remove both
>> categories and add new category Villages in District X.
>>
>> How can I do it?
>>
>> JAn
>>
>> --
>> Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
>> http://www.opera.com
>> /mail/
>
>
> _______________________________________________
> Wikibots-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikibots-l



--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

_______________________________________________
Wikibots-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikibots-l
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Category.py

Nicolas Dumazet
If I understand well, you're trying to make intersection of categories.
If page in A & B, remove cat A and cat B, and add cat C.

Well, there's no common way that I know to do that using category.py .
You would have to write your custom script, or to do it using
replace.py, and some intricated regexes.

2008/8/11 Jan Dudík <[hidden email]>:

> In the articles are now
> [[Category:District X]]
> [[Category:Villages]]
>
>
> I want to use tidy (because in category District X are another articles
> too)
> and get
>
> [[Category:Villages in District X]]
>
> I can do it by bot for two edits, but I want to do in in one edit.
>
> Dne Sun, 10 Aug 2008 19:09:20 +0200 Pietrodn <[hidden email]>
> napsal/-a:
>
>> I can't understand what you want to do. Do you want to remove the
>> category links from the articles? In this case, the syntax is:
>>      python category.py remove <category1> <category2>
>>
>> For the second part of your request ("and add new category Villages in
>> District X"), do you want to add a new subcategory "Villages" in
>> category "District X"? If I understood, you needn't a bot.
>>
>> Best regards
>>
>> Pietrodn
>> [hidden email]
>>
>>> Da: Jan Dudík <[hidden email]>
>>> Data: 10 agosto 2008 13:10:43 GMT+02:00
>>> A: "[hidden email]" <[hidden email]>
>>> Oggetto: [Wikibots-l] Category.py
>>> Rispondi a: [hidden email], Wikimedia bot editors discussion
>>> <[hidden email]
>>> >
>>>
>>>
>>> Hello, I have question about category.py
>>>
>>> How can I do this situation:
>>>
>>> There are category Villages and District X. I want to remove both
>>> categories and add new category Villages in District X.
>>>
>>> How can I do it?
>>>
>>> JAn
>>>
>>> --
>>> Tato zpráva byla vytvořena převratným poštovním klientem Opery:
>>> http://www.opera.com
>>> /mail/
>>
>>
>> _______________________________________________
>> Wikibots-l mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/wikibots-l
>
>
>
> --
> Tato zpráva byla vytvořena převratným poštovním klientem Opery:
> http://www.opera.com/mail/
>
> _______________________________________________
> Wikibots-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikibots-l
>



--
Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]
pywikipedia & mediawiki
_______________________________________________
Wikibots-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikibots-l
Loading...