jenkins-bot has submitted this change and it was merged.
Change subject: [IMPR] realign -help string to fit the option in the help context ......................................................................
[IMPR] realign -help string to fit the option in the help context
Change-Id: I0f5de7cd2678b6a1afb6b56b98e1798dab42c836 --- M scripts/listpages.py M scripts/makecat.py 2 files changed, 55 insertions(+), 49 deletions(-)
Approvals: Lokal Profil: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/listpages.py b/scripts/listpages.py index 59622b1..60a39a4 100755 --- a/scripts/listpages.py +++ b/scripts/listpages.py @@ -8,60 +8,62 @@
These parameters are supported to specify which pages titles to print:
--format Defines the output format. +-format Defines the output format.
- Can be a custom string according to python string.format() notation or - can be selected by a number from following list (1 is default format): - 1 - u'{num:4d} {page.title}' - --> 10 PageTitle + Can be a custom string according to python string.format() notation + or can be selected by a number from following list + (1 is default format): + 1 - u'{num:4d} {page.title}' + --> 10 PageTitle
- 2 - u'{num:4d} {[[page.title]]}' - --> 10 [[PageTitle]] + 2 - u'{num:4d} {[[page.title]]}' + --> 10 [[PageTitle]]
- 3 - u'{page.title}' - --> PageTitle + 3 - u'{page.title}' + --> PageTitle
- 4 - u'{[[page.title]]}' - --> [[PageTitle]] + 4 - u'{[[page.title]]}' + --> [[PageTitle]]
- 5 - u'{num:4d} \03{{lightred}}{page.loc_title:<40}\03{{default}}' - --> 10 PageTitle (colorised in lightred) + 5 - u'{num:4d} \03{{lightred}}{page.loc_title:<40}\03{{default}}' + --> 10 PageTitle (colorised in lightred)
- 6 - u'{num:4d} {page.loc_title:<40} {page.can_title:<40}' - --> 10 localised_Namespace:PageTitle canonical_Namespace:PageTitle + 6 - u'{num:4d} {page.loc_title:<40} {page.can_title:<40}' + --> 10 localised_Namespace:PageTitle + canonical_Namespace:PageTitle
- 7 - u'{num:4d} {page.loc_title:<40} {page.trs_title:<40}' - --> 10 localised_Namespace:PageTitle outputlang_Namespace:PageTitle - (*) requires "outputlang:lang" set. + 7 - u'{num:4d} {page.loc_title:<40} {page.trs_title:<40}' + --> 10 localised_Namespace:PageTitle + outputlang_Namespace:PageTitle + (*) requires "outputlang:lang" set.
- num is the sequential number of the listed page. + num is the sequential number of the listed page.
- An empty format is equal to -notitle and just shows the total amount - of pages. + An empty format is equal to -notitle and just shows the total + amount of pages.
--outputlang Language for translation of namespaces. +-outputlang Language for translation of namespaces.
--notitle Page title is not printed. +-notitle Page title is not printed.
--get Page content is printed. +-get Page content is printed.
--save Save Page content to a file named as page.title(as_filename=True). - Directory can be set with -save:dir_name - If no dir is specified, current direcory will be used. +-save Save Page content to a file named as page.title(as_filename=True). + Directory can be set with -save:dir_name + If no dir is specified, current direcory will be used.
--encode File encoding can be specified with '-encode:name' (name must be a - valid python encoding: utf-8, etc.). - If not specified, it defaults to config.textfile_encoding. +-encode File encoding can be specified with '-encode:name' (name must be + a valid python encoding: utf-8, etc.). + If not specified, it defaults to config.textfile_encoding.
--put: Save the list to the defined page of the wiki. By default it does not - overwrite an exisiting page. +-put: Save the list to the defined page of the wiki. By default it does + not overwrite an exisiting page.
--overwrite Overwrite the page if it exists. Can only by applied with -put. +-overwrite Overwrite the page if it exists. Can only by applied with -put.
--summary: The summary text when the page is written. If it's one word just - containing letters, dashes and underscores it uses that as a - translation key. - +-summary: The summary text when the page is written. If it's one word just + containing letters, dashes and underscores it uses that as a + translation key.
Custom format can be applied to the following items extrapolated from a page object: diff --git a/scripts/makecat.py b/scripts/makecat.py index 217e31b..d9ed2bf 100755 --- a/scripts/makecat.py +++ b/scripts/makecat.py @@ -7,18 +7,21 @@ (pages linked to and from pages already in the category), asking the user which pages to include and which not.
-Arguments: - -nodates automatically skip all pages that are years or dates (years - only work AD, dates only for certain languages) - -forward only check pages linked from pages already in the category, - not pages linking to them. Is less precise but quite a bit - faster. - -exist only ask about pages that do actually exist; drop any - titles of non-existing pages silently. If -forward is chosen, - -exist is automatically implied. - -keepparent do not remove parent categories of the category to be - worked on. - -all work on all pages (default: only main namespace) +The following command line parameters are supported: + +-nodates Automatically skip all pages that are years or dates + (years only work AD, dates only for certain languages). + +-forward Only check pages linked from pages already in the category, + not pages linking to them. Is less precise but quite a bit faster. + +-exist Only ask about pages that do actually exist; + drop any titles of non-existing pages silently. + If -forward is chosen, -exist is automatically implied. + +-keepparent Do not remove parent categories of the category to be worked on. + +-all Work on all pages (default: only main namespace)
When running the bot, you will get one by one a number by pages. You can choose: @@ -26,6 +29,7 @@ N(o) - do not include the page or I(gnore) - do not include the page, but if you meet it again, ask again. X - add the page, but do not check links to and from it + Other possiblities: A(dd) - add another page, which may have been one that was included before C(heck) - check links to and from the page, but do not add the page itself