LitOps

Literature as software

By @jjmerelo, writer of things.

Welcome to the era of the lone book creator

Amish Vampire kittens in space

Including the cover

Book algorithm

while (! book):
      write
      write
      check?

check again
format
package	      
upload	      

Book realm → Dev world

Manuscript → Source code

Spell check → Test

Copy editing → Debugging

Publishing → Releasing/Deploying

Automation

⇒ LitOps

Literature-as-code

[The Analytical Engine] ...might act upon other things besides numbers

Augusta Ada King (Née Byron), countess of Lovelace

Manuscript = MarkDown + UTF8

pandoc == vagrant for LitOps

Debugging → GitHub

With enough eyes...

all typos are shallow

And continuous integration

branches:
  except:
    - gh-pages
language: perl
perl:
  - "5.16"
before_install:
  - sudo apt-get update -qq
  - sudo apt-get -y install libhunspell-1.3-0 libhunspell-dev 
  - echo "use Test::Text;just_check( 'text','/usr/share/hunspell' );" > just_check.t
install: cpanm  ExtUtils::PkgConfig Test::Text TAP::Harness
script: perl -MTAP::Harness -e 'use utf8; \\
    my $harness = TAP::Harness->new( { verbosity => 0} );\\
    die "FAIL" if  $harness->runtests( "just_check.t" )->failed;'

But also...

Vocabulary, entropy, literacy level measures, number of new words.

Enforce style

And... deploy

Ebook transpiling

Paper:

the Internet explorer of the LitOps world

And there's no API or SDK

use Text::Markdown;
sub MAIN( $dir = "txt/", $length = 60 ) {
    for $dir.IO.dir(:test(/ ".md" $/)) -> $f {
	my @items =  Text::Markdown::Document.new($f.slurp()).items;
	say ( @items 
	      ==> grep( { $^þ ~~ Text::Markdown::CodeBlock } )
	      ==> map( { .text.split("\n") } )
	      ==> flat()
	      ==> grep( { .chars > $length }  )
	      ==> map( { "‣$f → $^þ\n ⤷ is "~$^þ.chars~" characters long" } )
	      ==> join( "\n" xx 2 ) );	
    }
}

hyper text

ficheros = glob.glob(dir+"/*.md")
for f in ficheros:
    file_content = open(f,"r").read()
    file_content = re.sub(r'\[([^\]]+)\]\((http[^\(]+)\)',r'\1 → \2', file_content)

    for key in sorted(dict_urls,key=len,reverse=True):
        file_content = file_content.replace(key, dict_urls[key])
    f = f.replace('.md','-links.md')
    with open(f, "w") as links_file:
        links_file.write( file_content )
	      

LitOps is in pre-α

Toolchain is yet to arrive

Meanwhile

Keep codingwriting

Credits