\documentclass[DIV=13,%
               BCOR=0mm,%
               headinclude=false,%
               footinclude=false,%
               fontsize=10pt,%
               oneside,%
               paper=a5]%
               {scrartcl}



\usepackage[noautomatic]{imakeidx}



\usepackage{microtype}
\usepackage{graphicx}
\usepackage{alltt}
\usepackage{verbatim}
\usepackage[shortlabels]{enumitem}
\usepackage{tabularx}
\usepackage[normalem]{ulem}
\def\hsout{\bgroup \ULdepth=-.55ex \ULset}
% https://tex.stackexchange.com/questions/22410/strikethrough-in-section-title
% Unclear if \protect \hsout is needed. Doesn't looks so
\DeclareRobustCommand{\sout}[1]{\texorpdfstring{\hsout{#1}}{#1}}
\usepackage{wrapfig}

% avoid breakage on multiple <br><br> and avoid the next [] to be eaten
\newcommand*{\forcelinebreak}{\strut\\*{}}

\newcommand*{\hairline}{%
  \bigskip%
  \noindent \hrulefill%
  \bigskip%
}

% reverse indentation for biblio and play

\newenvironment*{amusebiblio}{
  \leftskip=\parindent
  \parindent=-\parindent
  \smallskip
  \indent
}{\smallskip}

\newenvironment*{amuseplay}{
  \leftskip=\parindent
  \parindent=-\parindent
  \smallskip
  \indent
}{\smallskip}

\newcommand*{\Slash}{\slash\hspace{0pt}}


% http://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url
\PassOptionsToPackage{hyphens}{url}\usepackage[hyperfootnotes=false,hidelinks,breaklinks=true]{hyperref}
\usepackage{bookmark}

\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setmainfont{texgyrepagella-regular.otf}[Script=Latin,%
 Ligatures=TeX,%
 Path=/usr/share/texmf/fonts/opentype/public/tex-gyre/,%
 BoldFont=texgyrepagella-bold.otf,%
 BoldItalicFont=texgyrepagella-bolditalic.otf,%
 ItalicFont=texgyrepagella-italic.otf]
\setmonofont{cmuntt.ttf}[Script=Latin,%
 Ligatures=TeX,%
 Scale=MatchLowercase,%
 Path=/usr/share/fonts/truetype/cmu/,%
 BoldFont=cmuntb.ttf,%
 BoldItalicFont=cmuntx.ttf,%
 ItalicFont=cmunit.ttf]
\setsansfont{cmunss.ttf}[Script=Latin,%
 Ligatures=TeX,%
 Scale=MatchLowercase,%
 Path=/usr/share/fonts/truetype/cmu/,%
 BoldFont=cmunsx.ttf,%
 BoldItalicFont=cmunso.ttf,%
 ItalicFont=cmunsi.ttf]
\newfontfamily\englishfont{texgyrepagella-regular.otf}[Script=Latin,%
 Ligatures=TeX,%
 Path=/usr/share/texmf/fonts/opentype/public/tex-gyre/,%
 BoldFont=texgyrepagella-bold.otf,%
 BoldItalicFont=texgyrepagella-bolditalic.otf,%
 ItalicFont=texgyrepagella-italic.otf]



\let\chapter\section


% global style

\pagestyle{plain}




\usepackage{indentfirst}

% remove the numbering
\setcounter{secnumdepth}{-2}

% remove labels from the captions
\renewcommand*{\captionformat}{}
\renewcommand*{\figureformat}{}
\renewcommand*{\tableformat}{}
\KOMAoption{captions}{belowfigure,nooneline}
\addtokomafont{caption}{\centering}







\deffootnote[3em]{0em}{4em}{\textsuperscript{\thefootnotemark}~}


\addtokomafont{disposition}{\rmfamily}
\addtokomafont{descriptionlabel}{\rmfamily}


\frenchspacing
% avoid vertical glue
\raggedbottom

% this will generate overfull boxes, so we need to set a tolerance
% \pretolerance=1000
% pretolerance is what is accepted for a paragraph without
% hyphenation, so it makes sense to be strict here and let the user
% accept tweak the tolerance instead.
\tolerance=200
% Additional tolerance for bad paragraphs only
\setlength{\emergencystretch}{30pt}

% (try to) forbid widows/orphans
\clubpenalty=10000
\widowpenalty=10000





% given that we said footinclude=false, this should be safe
\setlength{\footskip}{2\baselineskip}

\title{Rationale (second part)}
\date{}
\author{Marco Pessotto}
\subtitle{}




% https://groups.google.com/d/topic/comp.text.tex/6fYmcVMbSbQ/discussion
\hypersetup{%
pdfencoding=auto,
pdftitle={Rationale (second part)},%
pdfauthor={Marco Pessotto},%
pdfsubject={},%
pdfkeywords={doc}%
}


\begin{document}






\thispagestyle{empty}


  \strut\vskip 2em
  \begin{center}

  {\usekomafont{title}{\huge Rationale (second part)\par}}%
  \vskip 1em
  
  \vskip 2em
  
  {\usekomafont{author}{Marco Pessotto\par}}%
  
  \vskip 1.5em





  
    \strut\par
  


  \end{center}


  \vskip 3em
  \par






\begin{quote}


\texttt{<idiot\_on\_irc> You built an albatross for no reason, just to serve
a directory of static files}



\end{quote}


A year ago, I got this, let's call it so, “criticism” over a
conversation on an IRC channel. Unfortunately the logs got lost, or
they never existed, so those could be not the exact words, but the
meaning is pretty much intact. Oh, yes, the nickname has been amended.


It's worth nothing that the above IRC user was the same one which, a
bunch of years ago, had the idea of building a digital library, gave
me a Drupal installation, supervised for a while, then got busy and
disappeared, but now and then chimes in, mostly ranting because the
said library runs amusewiki and not the Drupal he gave me.


Yes, running amusewiki means basically serving texts. It shouldn't be
too complicated, right? We don't even have a commenting system. It
turns out that things are never so simple.


Amusewiki is built around the texts. The idea is that each muse file
which gets inserted in the archive is in a format which is both human
and machine readable, it includes all the needed meta information and
can be used locally, without the need of a running site.


Systems running sites sometimes die, get abandoned, etc. if you think
over the long term. If I put a lot of work on a text, writing it,
correcting it, caring about that, I would love to have a copy of that
at least in a file, \emph{with all the logical information intact}, possibly
in a revision control system, so I know what I did and when.


At the beginning, to keep track of the work on the Drupal site, I
started writing scripts to help me out, and things got out of hand
pretty fast, because the syncing back and forward wasn't going to work
out, unsurprisingly.


So the first step was to abandon Drupal, take the loot of the texts,
and build something around it. It all started with a couple of CGI
scripts which, even if not nice to see, was working better (for the
editors) than Drupal. At this point the "filtered HTML" was still in
use and was a pain to edit (and too error prone).


Of course I started looking around. MoinMoin and ikiwiki were
considered, but still weren't the solution (particularly ikiwiki was
quite near to get used), because I wanted some features (like the
LaTeX PDF and the bookbuilder) which are hard to achieve without
having a backend daemon which does the heavy lifting.


The first version of Amusewiki was also written in Perl, using the
Dancer framework. The Git backend was integrated, the Bookbuilder
worked, but the application didn't scale for multiple sites and for
different language. However, the file system structure behind it was
exactly the same which amusewiki uses nowadays.


The current version of Amusewiki uses another Perl framework,
Catalyst, with a full database behind that, a real localization
engine, a full test suite (which takes about 20 minutes to run), but
the concept is still intact. You could download the whole archive, and
build something else with that. Please note that every time a text on
amusewiki is published, a HTML index of the whole archive is built.
When you run the backup of the amusewiki working directory, you have
also a version of the site which can work both locally without any
webserver, you can access the PDF, the EPUB and the sources. This
means you can also have sites which runs as mirrors, just syncing that
directory and serving static files.


The point here is that even if at some point you won't be running
amusewiki anymore, or if I disappear for whatever reason (this is
mostly a one-man project), you will still have the whole archive
\emph{intact} and in a useful format, and if you use git to do the backups,
with the full history of the archive, and without the layout elements
which usually make the migrations a pain, and you can do whatever you
want with that.


So, to conclude and to reply to the user, I built this system for a
real reason, not out of boredom: preserve the texts (without coupling
them with the code and the database) and make the editing experience
pleasant (read: off-line editing). All the other features (which are
not vital) are of course nice in my opinion, but that's a bonus which
comes from having someone actually working on the codebase.







% begin final page

\clearpage



% new page for the colophon

\thispagestyle{empty}

\begin{center}





\bigskip
\includegraphics[width=0.25\textwidth]{logo-amw.pdf}
\bigskip

\end{center}

\strut

\vfill

\begin{center}


Marco Pessotto

Rationale (second part)






\bigskip



   

       

       

       

       

       
   



\bigskip
\textbf{amusewiki.org}


\end{center}

% end final page with colophon


\end{document}


% No format ID passed.



