{"id":1328,"date":"2012-02-27T07:34:01","date_gmt":"2012-02-27T13:34:01","guid":{"rendered":"http:\/\/neosmart.net\/blog\/?p=1328"},"modified":"2012-02-27T10:06:51","modified_gmt":"2012-02-27T16:06:51","slug":"the-case-for-a-git-powered-project-gutenberg","status":"publish","type":"post","link":"https:\/\/neosmart.net\/blog\/the-case-for-a-git-powered-project-gutenberg\/","title":{"rendered":"The Case for a Git-Powered Project Gutenberg&#8230;"},"content":{"rendered":"<p><img class=\"colorbox-1328\"  decoding=\"async\" style=\"float:right;\" src=\"\/blog\/wp-content\/uploads\/Project_Gutenberg_logo.png\"\/> <a href=\"http:\/\/www.gutenberg.org\/\" title=\"Project Gutenberg\" rel=\"follow\">Project Gutenberg<\/a>, for those of you that are not already familiar with it, is one of the single-most important community projects of the century: an attempt at creating a digital library of free books in a variety of formats, preserving classics and other works of literature from all ages. At the time of this post, the project boasts an impressive 38,000 works for which the copyrights have expired and have been released into the public domain.<\/p>\n<p>Project Gutenberg (PG from here on out) not only indexes the text of these titles, but also original illustrations, metadata (author(s), publisher(s), date(s), illustration(s), etc., and most importantly, bookmarks\/tables of contents). The process of &#8220;creating&#8221; a book comprises many steps and starts off with scanning the original books, using OCR to convert the scanned images to text, manually reviewing the scanned contents for OCR conversion errors, fixing formatting (footnotes, endnotes, spacing, etc.), marking bookmarks and jump locations, creating tables of contents, and finally, to use a software terminology, &#8220;building&#8221; the files into many different formats to cover the very much fragmented spectrum of eBook file types.<\/p>\n<p>The reason for this primer on how PG works is to give a sense of how complex the entire endeavor is and all the steps and components involved in the process. There probably are more steps were not more immediately apparent and most of the steps listed above can probably be broken up into several more steps each. The point is, it&#8217;s an incredibly complicated <em>and error prone<\/em> process. And even when it&#8217;s done without errors or mistakes, there&#8217;s always room for improvement. And this is where the need for version control comes in.<\/p>\n<p><!--more--><\/p>\n<p>At the start of any Project Gutenberg title, you&#8217;ll find something similar to this (between the PG listing info, some disclaimers, and volunteer acknowledgements), as taken from one of my favorite books of all time, <a href=\"http:\/\/www.gutenberg.org\/ebooks\/778\" rel=\"follow\"><em>The Five Children and It<\/em><\/a>, written by <a href=\"http:\/\/en.wikipedia.org\/wiki\/E._Nesbit\" rel=\"follow\">E. Nesbit<\/a>, published in 1902, and now in the public domain, at least in the USA and the EU (date of death + 70 years).<\/p>\n<pre>*Project Gutenberg Etext of Five Children and It, by E. Nesbit*\r\n*****This file should be named fivit10.txt or fivit10.zip******\r\n\r\nCorrected EDITIONS of our etexts get a new NUMBER, fivit11.txt.\r\nVERSIONS based on separate sources get new LETTER, fivit10a.txt.<\/pre>\n<p>Project Gutenberg books are textbook-perfect examples of non-sourcecode projects that would benefit immensely from version control in general, and distributed version control (DVCS), such as GIT, in particular.<\/p>\n<p>As you can see from the PG excerpt above, each book can have &#8220;editions&#8221; and &#8220;versions.&#8221; While I think the definitions of &#8220;edition&#8221; and &#8220;version&#8221; have been confused (well, to be honest, plain wrong), the important thing is that there are separate publications of each eBook (editions, or what PG is calling &#8220;versions&#8221;) each with their own sequence of edits and fixes (versions, or what PG is calling &#8220;editions&#8221;). Books can have typos, formatting errors, OCR mistakes, incorrect metadata, etc. which need fixing or can have features improved or added, such as introducing a linked table of contents, adding annotations, and so on and so forth, all of which warrant the introduction of a new version of a particular edition\/publication.<\/p>\n<p>At the same time, books can be available in multiple editions (say, different languages, illustrated vs non-illustrated, different publishing houses, reprints, improved texts, etc.) which are all equally correct and usable (i.e. one edition does not supercede the other).<\/p>\n<p>These attributes of PG titles scream the need for a versioning system. I don&#8217;t know whether PG uses a versioning system internally\/privately, but no such repository is publicly available (to the best of my knowledge). It&#8217;s downright foolish <em>not<\/em> to take advantage of the wonders a good VS can work with this sort of content: versions are revisions, editions are branches, commit logs preserve integrity and posterity, and an index of all changes is forever kept. Nothing is ever lost or overwritten, and the changes over time can be analyzed, indexed, and reviewed.<\/p>\n<p>Now for the <b>Distributed<\/b> VCS part: PG accepts both new titles and revisions to existing titles from everyone. With 38,000 titles, that&#8217;s nothing to laugh about. Perhaps you spotted a typo in your copy of <em>The Five Children and It<\/em> introduced during the OCR process, or maybe you&#8217;re adding a translation no one has entered before, or you&#8217;ve found a missing footnote &#8211; with a DVCS solution like Git or Mercurial, nothing could be easier than forking the original, making your changes, then opening a ticket to propose that PG merge your changes back into their &#8220;official&#8221; distribution!<\/p>\n<p>Or perhaps it&#8217;s time to make things even more interesting: these are all <em>public domain<\/em> titles. That doesn&#8217;t just mean that you&#8217;re free to read, copy, and distribute them all you like &#8211; you can even change what they say! No one can actually stop you from going around and changing your favorite classics. Maybe you want to rename a character, or change the way a particular story ends? It may be a sacrilege, but it&#8217;s your right, and with a DVCS, it becomes downright easy to make your changes while keeping them linked to the original, so you can pull any other corrections or fixes made to your &#8220;source&#8221; branch!<\/p>\n<p>Or perhaps a less sacrilegious\/offensive course of action would be to change a particular grammatical oddity. For instance, Edith Nesbit is famous for using &#8220;it&#8221; as a gender-neutral pronoun for situations where the person(s) being referred to can be male or female (i.e. not an object):<\/p>\n<blockquote><p>Everyone got its legs kicked or its feet trodden on in the scramble to get out of the carriage.<\/p><\/blockquote>\n<p>You can easily enough go through her book (though I&#8217;d shoot you if I ever met you afterwards!) and change that to something more conventional (the removal of &#8220;on&#8221; from &#8220;trodden on&#8221; is an OCD reaction to the poor parallelism in the original text and not associated with gender-neutral pronouns):<\/p>\n<blockquote><p>Everyone got <strong>his or her<\/strong> legs kicked or <strong><del datetime=\"2012-02-27T12:44:17+00:00\">its<\/del><\/strong> feet trodden <del datetime=\"2012-02-27T13:36:36+00:00\">on<\/del> in the scramble to get out of the carriage.<\/p><\/blockquote>\n<p>In short, Project Gutenberg cries out for a DVCS interface. Not only does it make linking editions and versions a lot easier and more manageable (imagine if that were 38 million titles instead of 38 thousand? Each being actively maintained and fixed?), it also preserves changes and makes it easy to find who&#8217;s responsible for what. It makes it easy for anyone to contribute fixes and changes back (\u00e1 la Wikipedia), and introduces some very interesting possibilites into the mix (a GitHub-like fan-fiction site!). And, as a freebie, it makes something like integrating nightly build systems to generate the various output formats a breeze!<\/p>\n<p>We&#8217;ll be contacting Project Gutenberg with a link to this article and will even offer our services in helping set something like this up, to figuratively put one&#8217;s money where one&#8217;s mouth is. In the meantime, just think about how DVCS could revolutionize the world!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Project Gutenberg, for those of you that are not already familiar with it, is one of the single-most important community projects of the century: an attempt at creating a digital library of free books in a variety of formats, preserving &hellip; <a href=\"https:\/\/neosmart.net\/blog\/the-case-for-a-git-powered-project-gutenberg\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":505,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[390,837,831,836,832,834,835],"class_list":["post-1328","post","type-post","status-publish","format-standard","hentry","category-software","tag-copyright","tag-dvcs","tag-git","tag-literature","tag-mercurial","tag-project-gutenberg","tag-version-control"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4xDa-lq","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/1328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/users\/505"}],"replies":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/comments?post=1328"}],"version-history":[{"count":11,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/1328\/revisions"}],"predecessor-version":[{"id":1340,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/1328\/revisions\/1340"}],"wp:attachment":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/media?parent=1328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/categories?post=1328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/tags?post=1328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}