Page MenuHomePhabricator

Make -notitle the default behavior in pagefromfile.py
Closed, DeclinedPublic

Description

The documentation states

The pagename will be the first headword in your textfile (the first word between ''' '''). It is currently automatically inserted in the uploaded page.

I don't know why pagefromfile.py acts this way and I don't find it helpfull at all since the user already states in the file what he intends to have inserted to the page. This behaviour should be made into an option instead of default.

Event Timeline

Just found out I can switch this function of with -notitle switch, but the original request stays in place. This should be opt-in function.

Dvorapa renamed this task from Prevent pagefromfile.py from inserting articles name into the created article to Make -notitle the default behavior in pagefromfile.py.May 28 2017, 11:40 AM
Dvorapa updated the task description. (Show Details)
Dvorapa added a subscriber: Dvorapa.

I think the reasoning is that, especially for new articles, the page title is generally part of the first sentence of an article, e.g.,

'''Wikipedia''' is a free [[online encyclopedia]] with the aim to allow anyone to edit

in which case the article name does not have to be given explicitly.

Change 426638 had a related patch set uploaded (by Dvorapa; owner: Dvorapa):
[pywikibot/core@master] [IMPR] Do not insert title automatically by pagefromfile.py

https://gerrit.wikimedia.org/r/426638

Dvorapa triaged this task as Low priority.
Xqt lowered the priority of this task from Low to Lowest.EditedApr 15 2018, 8:32 AM
Xqt added a subscriber: Xqt.

See valhallasw's comment. The default behaviour is to have the page title highlighted in the text. The bot always extracts the page title in this way.
Sample:
'''Wikipedia''' is a free [[online encyclopedia]] with the aim to allow anyone to edit
extracts Wikipedia as page title

I guess it could be valid to implement the opposite way if -titlestart and -titleend is given.
Sample:
-titlestart:::
-titleend:":: "
::Wiki:: #redirect [[Wikipedia]]
extracts Wiki as the title. In this case the -notitle option could be set to True by default imho.

Ah, I see, all the time I understood the documentation that the page must be in format like:

xxxx
'''Wikipedia'''
'''Wikipedia''' is a free online encyclopedia....
yyyy

Then the docs should be more clear first

I guess it could be valid to implement the opposite way if -titlestart and -titleend is given.
Sample:
-titlestart:::
-titleend:":: "
::Wiki:: #redirect [[Wikipedia]]
extracts Wiki as the title. In this case the -notitle option could be set to True by default imho.

I think we should first ask ourselves, if users more often upload pages like articles, with the page title included in the text, or pages like templates or redirects.

Then the docs should be more clear first

Great job with your patch. Thanks!

Dvorapa closed this task as Declined.EditedApr 15 2018, 8:00 PM

As the title is

  • easy to opt-out
  • usually a part of articles (which I believe are frequently uploaded than other types of pages)

and the docs are more clear about it, I'm marking this finally as Declined

If the condition (the title usually a part of articles, which are more frequently uploaded among others) would change in the future, anybody feel free to reopen

Change 426638 merged by jenkins-bot:
[pywikibot/core@master] [IMPR][doc] Make usage of title in pagefromfile.py more clear

https://gerrit.wikimedia.org/r/426638

Dvorapa claimed this task.