Se añade posibilidad de fecha de publicación inicial

This commit is contained in:
Nika Zhenya 2019-04-15 11:00:49 -05:00
parent 1ff8d2da9e
commit 002f71cc4f
12 changed files with 42 additions and 17 deletions

View File

@ -29,7 +29,8 @@ end
# Formats date in RFC 2822
def format_date date
raw_date = date.gsub(/[\/:]/, ',').gsub(/\s+/, '').split(',')
raw_date = date.gsub(/[\/:]/, ',').gsub(/[\s+|[A-Za-zÁÉÍÓÚÜáéíóúü]+]/, '').split(',')
raw_date = raw_date.reject{|e| e.empty?}
par_date = DateTime.new(raw_date[0].to_i, raw_date[1].to_i, raw_date[2].to_i,
raw_date[3].to_i, raw_date[4].to_i, raw_date[5].to_i,
DateTime.now.to_s[-6..-6] + DateTime.now.to_s[-4..-4])
@ -53,13 +54,13 @@ Dir.glob('content/html/*').each do |local|
.strip
date = File.read(f)
.gsub(/\n/, '')
.gsub(/^.*?#{$template_lang[locale]['build']}\s+(\d+.+?)\..*$/, '\1')
.gsub(/^.*?#{$template_lang[locale]['published']}\s+([^<]+?)<.*$/, '\1')
.strip
if title != ''
content.push(' <div class="post">' + "\n" +
' <p><a href="' + file + '">' + file.gsub(/_.*$/, '').to_i.to_s + '. ' + title + '</a></p>' + "\n" +
' <p>[' + date + ']</p>' + "\n" +
' <p>[' + $template_lang[locale]['published'] + ' ' + date + ']</p>' + "\n" +
' </div>')
end
end

View File

@ -119,6 +119,7 @@ Dir.glob(po_dir + '*/*.po').each do |po|
html_tmp = html_tmp.gsub('@donate', $template_lang[hash['locale']]['donate'])
html_tmp = html_tmp.gsub('@copyfarleft', $template_lang[hash['locale']]['copyfarleft'])
html_tmp = html_tmp.gsub('@license', $template_lang[hash['locale']]['license'])
html_tmp = html_tmp.gsub('@published', $template_lang[hash['locale']]['published'])
html_tmp = html_tmp.gsub('@build', $template_lang[hash['locale']]['build'])
html_tmp = html_tmp.gsub('@date', Time.now.strftime('%Y/%m/%d, %H:%M'))

View File

@ -9,6 +9,7 @@ $template_lang = {
'copyfarleft' => 'All content is under',
'license' => 'Open and Free Publishing License',
'build' => 'Last build of this page:',
'published' => 'Published:',
},
'es' => {
'main' => 'Publishing is Coding: Change My Mind',
@ -20,5 +21,6 @@ $template_lang = {
'copyfarleft' => 'Todo el contenido está bajo',
'license' => 'Licencia Editorial Abierta y Libre',
'build' => 'Última modificación de esta página:',
'published' => 'Publicado:',
}
}

View File

@ -26,6 +26,9 @@
</div>
<section>
<h1 id="from-publishing-with-free-software-to-free-publishing">From Publishing with Free Software to Free Publishing</h1>
<blockquote class="published">
<p>Published: 2019/03/20, 13:00</p>
</blockquote>
<p>This blog is about “free publishing” but, what does that means? The term “free” it isn't only problematic in English. May be more than in others languages because of the confusion between “free as in beer” and “free as in speech.” But by itself the concept of freedom is so ambiguous than even in Philosophy we are very careful in its use. Even though it is a problem, I like that the term doesn't have a clear definition—at the end, how free could we be if freedom is well defined?</p>
<p>Some years ago, when I started to work hand-in-hand with Programando Libreros and Hacklib, I realized that we weren't just doing publishing with free software. We are doing free publishing. So I attempted to defined it in <a href="https://marianaeguaras.com/edicion-libre-mas-alla-creative-commons/">a post</a> but it doesn't convince me anymore.</p>
<p>The term was floating around until December, 2018. At Contracorriente—yearly fanzine fair celebrated in Xalapa, Mexico—Hacklib and me were invited to give a talk about publishing and free software. Between all of us we made a poster of everything we talked that day.</p>
@ -57,7 +60,7 @@
</section>
<footer>
<p class="left no-indent">All content is under <a href="../../../content/html/en/_fork.html">Open and Free Publishing License (<span class="smallcap">LEAL</span>)</a>.</p>
<p class="left no-indent">Last build of this page: 2019/04/14, 13:37.</p>
<p class="left no-indent">Last build of this page: 2019/04/15, 10:59.</p>
<p class="left no-indent"><span class="smallcap"><a target="_blank" href="https://perrotuerto.blog/feed/en/rss.xml">RSS</a></span> | <a href="../../../content/html/en/001_free-publishing.html"><span class="versalita">EN</span></a> | <a href="../../../content/html/es/001_free-publishing.html"><span class="versalita">ES</span></a></p>
</footer>
</body>

View File

@ -34,12 +34,12 @@
<section>
<div class="post">
<p><a href="001_free-publishing.html">1. From Publishing with Free Software to Free Publishing</a></p>
<p>[2019/04/14, 13:37]</p>
<p>[Published: 2019/03/20, 13:00]</p>
</div>
</section>
<footer>
<p class="left no-indent">All content is under <a href="../../../content/html/en/_fork.html">Open and Free Publishing License (<span class="smallcap">LEAL</span>)</a>.</p>
<p class="left no-indent">Last build of this page: 2019/04/14, 13:37.</p>
<p class="left no-indent">Last build of this page: 2019/04/15, 10:59.</p>
<p class="left no-indent"><span class="smallcap"><a target="_blank" href="https://perrotuerto.blog/feed/en/rss.xml">RSS</a></span> | <a href="../../../content/html/en/index.html"><span class="versalita">EN</span></a> | <a href="../../../content/html/es/index.html"><span class="versalita">ES</span></a></p>
</footer>
</body>

View File

@ -26,6 +26,9 @@
</div>
<section>
<h1 id="de-la-edicion-con-software-libre-a-la-edicion-libre">De la edición con <i>software</i> libre a la edición libre</h1>
<blockquote class="published">
<p>Publicado: 2019/03/20, 13:00</p>
</blockquote>
<p>Este <i>blog</i> es acerca de «edición libre» pero ¿qué quiere decir eso? El término «libre» no es tan problemático en nuestra lengua como en el inglés. En ese idioma existe una confusión entre «<i>free</i>» como «barra libre» y como «libre discurso». Sin embargo, eso no elimina el hecho de que el concepto de libertad es tan ambiguo que incluso en Filosofía tratamos de usarlo con cuidado. Aunque sea un problema, prefiero que el término no tenga una definición clara; al final, ¿qué tan libres podríamos ser si la libertad estuviese bien definida?</p>
<p>Hace unos años, cuando empecé a trabajar codo a codo con Programando Libreros y Hacklib, me di cuenta que no solo estábamos editando con <i>software</i> libre. Estamos haciendo edición libre. Así que intenté definirla en <a href="https://marianaeguaras.com/edicion-libre-mas-alla-creative-commons/">una publicación</a> pero ya no me convence.</p>
<p>El término siguió flotando alrededor hasta diciembre del 2018. Durante el Contracorriente —feria anual de <i>fanzine</i> celebrado en Xalapa, México— Hackblib y yo fuimos invitados a dar una charla sobre edición y <i>software</i> libre. Entre todos hicimos una cartulina de lo que hablamos aquel día.</p>
@ -57,7 +60,7 @@
</section>
<footer>
<p class="left no-indent">Todo el contenido está bajo <a href="../../../content/html/es/_fork.html">Licencia Editorial Abierta y Libre (<span class="smallcap">LEAL</span>)</a>.</p>
<p class="left no-indent">Última modificación de esta página: 2019/04/14, 13:37.</p>
<p class="left no-indent">Última modificación de esta página: 2019/04/15, 10:59.</p>
<p class="left no-indent"><span class="smallcap"><a target="_blank" href="https://perrotuerto.blog/feed/es/rss.xml">RSS</a></span> | <a href="../../../content/html/en/001_free-publishing.html"><span class="versalita">EN</span></a> | <a href="../../../content/html/es/001_free-publishing.html"><span class="versalita">ES</span></a></p>
</footer>
</body>

View File

@ -34,12 +34,12 @@
<section>
<div class="post">
<p><a href="001_free-publishing.html">1. De la edición con <i>software</i> libre a la edición libre</a></p>
<p>[2019/04/14, 13:37]</p>
<p>[Publicado: 2019/03/20, 13:00]</p>
</div>
</section>
<footer>
<p class="left no-indent">Todo el contenido está bajo <a href="../../../content/html/es/_fork.html">Licencia Editorial Abierta y Libre (<span class="smallcap">LEAL</span>)</a>.</p>
<p class="left no-indent">Última modificación de esta página: 2019/04/14, 13:37.</p>
<p class="left no-indent">Última modificación de esta página: 2019/04/15, 10:59.</p>
<p class="left no-indent"><span class="smallcap"><a target="_blank" href="https://perrotuerto.blog/feed/es/rss.xml">RSS</a></span> | <a href="../../../content/html/en/index.html"><span class="versalita">EN</span></a> | <a href="../../../content/html/es/index.html"><span class="versalita">ES</span></a></p>
</footer>
</body>

View File

@ -7,7 +7,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2019-04-14 13:36-0500\n"
"PO-Revision-Date: 2019-04-15 10:55-0500\n"
"Language-Team: none\n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
@ -15,7 +15,10 @@ msgstr ""
#: content/md/001_free-publishing.js:1
msgid "# From publishing with free software to free publishing"
msgstr "# From Publishing with Free Software to Free Publishing"
msgstr ""
"# From Publishing with Free Software to Free Publishing\n"
"\n"
"> @published 2019/03/20, 13:00 {.published}"
#: content/md/001_free-publishing.js:2
msgid ""

View File

@ -7,7 +7,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2019-03-21 16:42-0600\n"
"PO-Revision-Date: 2019-04-15 10:59-0500\n"
"Language-Team: none\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
@ -15,7 +15,10 @@ msgstr ""
#: content/md/001_free-publishing.js:1
msgid "# From publishing with free software to free publishing"
msgstr "# De la edición con _software_ libre a la edición libre"
msgstr ""
"# De la edición con _software_ libre a la edición libre\n"
"\n"
"> @published 2019/03/20, 13:00 {.published}"
#: content/md/001_free-publishing.js:2
msgid ""

View File

@ -52,6 +52,15 @@ section .post {margin-top: 1em;}
section .post p {text-indent: 0;}
section .post p:first-child {font-size: 1.15em;}
/* Entry */
.published {
margin: 0;
margin-top: -1.5em;
margin-bottom: 1.5em;
font-size: .85em;
}
/* Footer */
footer {margin-top: 50px;}

View File

@ -7,7 +7,7 @@
<description>Blog about free culture, free software and free publishing.</description>
<language>en</language>
<managingEditor>hi@perrotuerto.blog (Nika Zhenya)</managingEditor>
<lastBuildDate>Sun, 14 Apr 2019 13:37:00 -0500</lastBuildDate>
<lastBuildDate>Mon, 15 Apr 2019 10:59:00 -0500</lastBuildDate>
<image>
<title>Publishing is Coding: Change My Mind</title>
<url>https://perrotuerto.blog/icon.png</url>
@ -16,7 +16,7 @@
<item>
<title>1. From Publishing with Free Software to Free Publishing</title>
<link>https://perrotuerto.blog/content/html/en/001_free-publishing.html</link>
<pubDate>Sun, 14 Apr 2019 13:37:00 -0500</pubDate>
<pubDate>Wed, 20 Mar 2019 13:00:00 -0500</pubDate>
<guid isPermaLink="false">guid1</guid>
</item>
</channel>

View File

@ -7,7 +7,7 @@
<description>Blog about free culture, free software and free publishing.</description>
<language>es</language>
<managingEditor>hi@perrotuerto.blog (Nika Zhenya)</managingEditor>
<lastBuildDate>Sun, 14 Apr 2019 13:37:00 -0500</lastBuildDate>
<lastBuildDate>Mon, 15 Apr 2019 10:59:00 -0500</lastBuildDate>
<image>
<title>Publishing is Coding: Change My Mind</title>
<url>https://perrotuerto.blog/icon.png</url>
@ -16,7 +16,7 @@
<item>
<title>1. De la edición con <i>software</i> libre a la edición libre</title>
<link>https://perrotuerto.blog/content/html/es/001_free-publishing.html</link>
<pubDate>Sun, 14 Apr 2019 13:37:00 -0500</pubDate>
<pubDate>Wed, 20 Mar 2019 13:00:00 -0500</pubDate>
<guid isPermaLink="false">guid1</guid>
</item>
</channel>