User:Inductiveload/Requests/Moves to subpages

Requests Bulk moves to subpages

There are many examples where pages that should be subpages are all presented as top-level pages. These make it difficult to navigate works and should be moved to subpages.

I have a script to move pages from the root level to subpages.

You can request such a bulk move by providing a list of pages in the following format:

$PREFIX=Target Work Title

Page title A
Page title B |Subpage title if different
Page title C (Author)|
-Page title D

# Comment (does nothing)
# END #

Nothing here is processed
No matter how long it is

The pages will be moved in that order, and next/previous links will be constructed, also in that order. Thus, it is essential that you include all pages in the target work, even if they do not have an existing pages. Use -Foo lines to add "ghost" pages that are only used for the next/previous links of pages that do exist.

Data syntax edit

  • You must have a line $PREFIX=Target Work Title, where Target Work Title is the top level pages which the pages will become subpages of.
  • Blank lines are ignored
  • Lines starting # are ignores
  • A line containing only # END # ends the file (anything after this line is ignored)
  • Lines of the form Foo produce a move from FooPrefix/Foo
  • Lines of the form Foo|Bar produce a move from FooPrefix/Bar
  • Lines of the form Foo (Bar)| produce a move from Foo (Bar)Prefix/Foo (like a pipe trick).
  • Lines of the form -Foo do not generate a move, but are used as targets for the next/previous links of surrounding pages (they will naturally be redlinks).

Other options edit

Add these at the top if needed:

  • $DELETE_NOTES=1: Empty the notes field
  • $DELETE_YEAR=0: Do not delete the year (deleting the year is the default)

Disclaimer edit

Like all requests, I will do my level best to not break anything, but it will also be your responsibility to check the outcome is correct. Since you are requesting something, I assume you know more about the work in question, so you are in a better position to spot defects.

Example edit

This is the start of a real example that was used for The Complete Poems of Paul Laurence Dunbar:

$PREFIX=The Complete Poems of Paul Laurence Dunbar

Ere Sleep Comes Down To Soothe The Weary Eyes
The Poet and His Song
Retort
Accountability
Frederick Douglass (Dunbar)|
Life (Dunbar)|
The Lesson (Dunbar)|
The Rising Of The Storm
Sunset (Dunbar)|
The Old Apple-tree
A Prayer (Dunbar)|