See previous discussions and proposals:
In the current proposal we are to indicate the publication status of a document in a JSON file included in the directory. I wonder whether we should, rather, do this using git branches.
Current proposal
Have a JSON file with publication data, including publication status. This would be included at the top folder level in bilara-data. This has the advantage that all publication data is included in one place, and can act as a master reference for all SCâs publications. However I fear it may have some problems:
- How do we handle complex cases where a translator wishes to publish certain texts in a nikaya and not others? They might have to make a list of hundreds of sutta UIDs in JSON. This would be brittle and error-prone.
- The publication status of a particular text is not evident in the Github UI. Someone looking at the repo wouldnât know what is published and what isnât, unless they read the JSON file.
Git proposal
Distinguishing between âpublishedâ and âunpublishedâ branches is of course one of the basic functions of Git. Rather than reinventing the wheel, why not use this for texts, just as we do for code?
- Under this model, when a translator begins work on Bilara, their work is opened on an
unpublished
branch in Bilara. Anyone looking at the Bilara repo immediately knows what is what. - When ready to publish, that branch is merged with the
published
branch. In this scenario, it is, I think, better to call this branchpublished
rather thanmaster
, which is not really meaningful. - Anything on the
published
branch is âready to consumeâ by any app that wants it. Typically weâd expect that apps would mirror the published content and serve it from their own repo. - Note that in some cases, apps will want to transform the data in different ways. For example, on SC we want to turn markdown emphasis into HTML
<em>
tags, whereas for a voice app they may be removed.
How would this be handled in terms of UI? Iâm thinking that work in Bilara is always committed to unpublished
. There is a button in the bilara toolbar, PUBLISH. When you hit that, it opens a modal dialog or something like that. The data for publication.json
is entered via this modal, or automatically generated. Thus normally publication.json
would not be hand-edited (which is a change from my original proposal.)
In the following mockup, I use italics for text that will be autopopulated.
This action will publish your translation publicly to SuttaCentral.net, as well as any services that use SuttaCentralâs texts
Before publishing, ensure that texts are proofread and all corrections are made.
Text
Root title: Majjhima NikÄya
Translated title: Middle Discourses
ID: mnTranslator(s)
Author UID: sujato
Full name: Bhikkhu Sujato
Short name: SujatoPublication action
â Publish all changes to collection Middle Discourses.
Publish only this text (MN 1) to collection Middle Discourses.Unpublish
â Unpublish all texts from collection Middle Discourses.
â Unpublish only this text (MN 1) from collection Middle Discourses.Publication status
â Draft: this work is incomplete and will be revised.
Completed: the main work on this text is complete, but corrections and improvements are ongoing.
â Final: no further revision is anticipated.Edition
â Initial publication.
â Minor update. Use this for simple corrections and minor revisions. This update will not be recorded in the publication data, but is retained in Github.
Revised edition. Use this for a substantially revised new edition. This update will be recorded in the publication data.
- text field for revised editions: âDescribe the nature of the revision (required)â.
License
All publications made on Bilara must use a Creative Commons Zero license. The author or authors dedicate the work to the Public Domain. This dedication is irrevocable.
Check these details are correct
Publish a completed version of a revised edition of MN 1 in Middle Discourses by Bhikkhu Sujato.
Confirm
Then the relevant data would be automatically added to publication.json
.
Letâs break this down.
Text
The root text title and ID are set up in a separate process at the start of the project. The root text is basically what would normally be considered a âbookâ, i.e. a nikaya, a book of the Khuddaka, one of the Vibhangas or Khandhakas, a book of the Abhidhamma, etc.
Translator
Like the title info, the translator data is already set up at the start of the project.
Publication action
The Publication Action is by default set to the whole collection.
However a translator may want to work progressively. Imagine for example that someone wishes to translate a Samyutta sutta every day. Then they set the publication action to âthis text onlyâ. Then:
- If the collection is not yet published, it is created in
publication.json
and the specific text ID added. - If the collection is already published, the ID is added.
- If the text is already published, but is revised, it is simply pushed.
A translator should also have the ability to unpublish work.
Publication status
This is a note to let readers know the current status of the project. It might be used, for example, to trigger a âdraftâ flag on the website.
Edition
We want to be able to note substantial changes, however we need not record every corrected comma in publication.json
: thatâs what git is for. The only way to do this is to rely on the translator.
Initially, âinitial publicationâ is automatically checked and other options are disabled. Once the commit is made, the situation reverses: Initial publication is disabled, and âminor updateâ is checked. The translator can choose to check ârevised editionâ.
- âInitial Publicationâ: This creates the relevant entry in
publication.json
. - âminor updateâ. Changes will be logged in git with generic commit message, but not recorded in
publication.json
. - âRevised editionâ, the date and commit number will be added as a new edition to
publication.json
. In addition, they will have to add some text describing the revised edition. This will be the commit message, and also will be added topublication.json
Check the details
Weâll want to make sure everything is right.
Details added by system
Certain details can be left out of this dialog for simplicity, and will be added automatically to publication.json
. These will include;
- Publication number:
scpub1
,scpub2
⌠- Source URL
- CC0 license
- edition number (if needed)
- publication date/time
- If individual suttas are added to a collection over a period of time, the date/time records only the first and last times as a range.
- Publisher name âSuttaCentralâ
- Publication type and URL. In some cases these may have to be added by hand later, eg. for books.