User:SnowyCinema/SIW/Automatic transclusion

From Wikisource
Jump to navigation Jump to search

The premise behind this section of the idea is to make transclusion something that is entirely, or at least almost entirely, handled by the backend of the site.

History[edit]

Automatic transclusion of pages is something that has been done in the past by several prolific contributors, including SnowyCinema, Inductiveload, and Mpaa, among many others. Usually, this is either done through personal user JavaScript, or, more commonly, with Pywikibot, a Python package commonly used for bot accounts.

In other words, automatic transclusion has generally meant transcluding pages into the mainspace by means of automated editing. But these sorts of automated editing technologies have only been in the hands of contributors knowledgable enough technically to do this sort of work, or those who know how to contact them. This leaves a significant gap between most new editors who want to contribute something meaningful, and active contributors who have been in the community for quite some time. That is a huge problem, because transclusion is one of the more annoying and repetitive parts of contributing to this project.

Proposed method[edit]

Basically, the way I think transclusion should ideally work is that it is entirely controlled by the backend, with little to no human interference. So, when you proofread enough pages that an entire chapter is proofread, the transclusion process will happen automatically, given that all the parameters are properly specified.

Sectioning out chapters[edit]

In my proposed method, the chapter headers will be controlled by a magic word, possibly {{CHAPTER}} or {{STARTCH}}. This will control what the chapter header says, which will be detailed in another page later. But it will also tell the technology that this is where a specific chapter starts. {{ENDCH}}, in this example, will signify that the chapter has ended.

For example, for Dangerous Business/Chapter 1:

Page 1 (start of chapter):

{{CHAPTER|1}}

The stop awakened Jay and he lay, pleasantly drowsy, not remembering yesterday nor trying to recall it. Indeed, he vaguely was warned against any effort to deal further with that day. It had dealt with him. Here he was in a Pullman berth aboard the Century, westbound. Well enough—but behind the train was New [...]

When you place "CHAPTER" in the page in this way,

Page 9 (end of chapter):

he had promised, for Lida's sake, to take upon himself; and which his father would believe.

And Ellen Powell would learn. Suddenly he thought of her hearing it; and the shock to himself, as he imagined her, surprised him. And yet it was the first moment, since he had awakened, that he had thought of her at all.
{{ENDCH}}

Once {{ENDCH}} is specified, and ProofreadPage detects that each of the pages at least exist (and are of the "Not Proofread" or "1" status at least), the site's backend will automatically transclude the material implicitly. No bot would be needed for this, since the site itself will do this and perhaps label the creator of the first page (or something like that) as the transcluder.

For sections that appear in multiple places and need to be transcluded together as one chapter (such as continued stories in periodicals), something like a {{SPLITCH}} should do the trick.

At some point the user may be prompted as to whether or not they want the page transcluded. I'm not really sure whether or not consent should be involved in the process.

But with this, we're already delving into territory far astray from what Wikisource has ever tried.