Sample:
'''Wikipedia''' is a free [[online encyclopedia]] with the aim to allow anyone to edit
extracts Wikipedia as page title
I proposed in T155356 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. But currently you have to use -no title to exclude all text between -titlestart and -titleend. Please also refer the -help doc string.
Hi Etienne,The -notitle flag should be able to help you do this. If you have an input file like this:{{-start-}}'''page title'''actual contents of the page{{-stop-}}{{-start-}}'''next page title'''contentsofthenextpage{{-stop-}}and then runpwb.py pagefromfile -file:test.txt -notitlethe bot will create two pages: one named 'page title' with contents 'actual contents of the page', and one named 'next page title' with several lines of contents, starting with 'contents'.Best regards,MerlijnOn 29 April 2018 at 18:11, Etienne Ruedin <Ruedin@gmx.net> wrote:Dear list membersI used pywikibot several times in the last six years for little helps on a minority language wikipedia (ln). Now, I am failling with pagefromfile.py1. What works:I can log in and upload one ore more than one article with {{-start-}} and {{-stop-}}.2. What does not workIf the title should be something other than the first word(s) between ''' ''', I can us the -titlestart and -titleend comands.I tried it in different manners , f.eg. in the txt file before or after the article text. It failed always and the ''' ''' word became the title of the article.I was in contact with people from als.wikipedia. The managed it that way, that they changed it afterwards manually.Question: How to use the title functions from pagefromfile.py? Is there a more detailed manual somewhere (not only the few information on mediawiki) or can someone give me a working example?3. Configuration: I create the txt files with leafpad utf-8 on ubuntu. I run python with the LXterminal on ubuntu.Best regardsEtienne
_______________________________________________
pywikibot mailing list
pywikibot@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot
_______________________________________________
pywikibot mailing list
pywikibot@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot