@jjmerelo, writer of things.
while (! book):
write
write
check?
check again
format
package
upload
[The Analytical Engine] ...might act upon other things besides numbers
Augusta Ada King (Née Byron), countess of Lovelace
pandoc == vagrant for LitOpsbranches:
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;'
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 ) );
}
}
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 )