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'''
contents
of
the
next
page
{{-stop-}}
and then run
pwb.py pagefromfile -file:test.txt -notitle
the 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,
Merlijn
On 29 April 2018 at 18:11, Etienne Ruedin <Ruedin(a)gmx.net> wrote:
Dear list members
I used pywikibot several times in the last six years for little helps on a
minority language wikipedia (ln). Now, I am failling with pagefromfile.py
1. What works:
I can log in and upload one ore more than one article with {{-start-}} and
{{-stop-}}.
2. What does not work
If 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 regards
Etienne
_______________________________________________
pywikibot mailing list
pywikibot(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot