aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranthk <anthk@texto-plano.xyz>2021-03-25 16:51:37 +0000
committeranthk <anthk@texto-plano.xyz>2021-03-25 16:51:37 +0000
commitcdcae585587c4320f0c45237519b12f1d543bb94 (patch)
tree810069aa533d4282e0460bcb6879e6ca9b7b6683
parent5b67e2cd6d47f97061e40e141dbaa9a0750092e4 (diff)
downloadbliper-es-cdcae585587c4320f0c45237519b12f1d543bb94.tar.gz
Castellización básica
-rw-r--r--LEEME187
-rw-r--r--bin/bliper-blog.pl6
-rw-r--r--bin/bliper-generate.pl38
3 files changed, 128 insertions, 103 deletions
diff --git a/LEEME b/LEEME
index b536899..38ed0c5 100644
--- a/LEEME
+++ b/LEEME
@@ -14,97 +14,122 @@ todos los enlaces a los posts y páginas que se generen.
Los ficheros incluídos son:
-.
-|-- LICENSE
-|-- Makefile
-|-- README
-|-- TODO
-|-- bin
-| |-- bliper-blog.sh
-| |-- bliper-create-post.sh
-| |-- bliper-deploy.sh
-| |-- bliper-generate.pl
-| `-- bliper-menu-creation.sh
-|-- changelog
-|-- main-articles
-| |-- 2013-11-07-readme
-| `-- 2013-11-10-markdown-notes
-|-- output
-| |-- images
-| | `-- puffytron.jpg
-| `-- style.css
-|-- pages
-| |-- about
-| `-- contact
-|-- pages-b
-| `-- readme-again
-`-- template
- |-- footer
- |-- main-bottom
- |-- main-top
- |-- page-bottom
- `-- page-top
+.:
+LEEME
+LICENSE
+Makefile
+README
+TODO
+articulos/
+bin/
+changelog
+paginas/
+paginas-b/
+plantilla/
+salida/
+tree
+
+./articulos:
+2013-11-10-markdown-notes
+2013-11-27-readme
+
+./bin:
+bliper-blog.pl
+bliper-create-post.sh
+bliper-deploy.sh
+bliper-generate.pl
+bliper-menu-creation.sh
+
+./paginas:
+about
+blog.md
+contact
+
+./paginas-b:
+readme-again
+
+./plantilla:
+article-bottom
+article-top
+footer
+main-bottom
+main-top
+page-bottom
+page-top
+
+./salida:
+colors.css
+images/
+style.css
+
+./salida/images:
+puffytron.jpg*
+sample.png
bin/bliper-blog.pl
- simple script to check if posts exist in main-articles/. If no posts
- exist, 'blog' page will not be created.
+ Simple script para ver si existen nuevos artículos en artículos/.
+ De no existir, no se generará un direcotorio "blog".
bin/bliper-create-post.sh
- use this instead of `touch <file>' for your posts. It just prepends `date
- '+%Y-%m-%d'` to the beginning of the filename.
+ Usa esto en vez de `touch <fichero>' para sus envíos. Solo prepone `date
+ '+%Y-%m-%d'` al inicio del fichero, es decir, la fecha.
bin/bliper-deploy.sh
- is a script tha "deploys" the website. It's based on rsync and I've
- included a sample config. Just change "user@host:/path/to/output" with
- the real one.
+ es un script que "distribuye" la web. Usa rsync y lo he incluído
+ como una configuración simple. Solo cambia "usuario@host:/ruta/a/la/salida"
+ con la verdadera ruta.
bin/bliper-generate.pl
- is the main script that parses every post in input/ and recreates it as
- HTML in output/. It also creates the index.html page and appends all links
- to posts.
+ Es el script principal que interpreta cada post en articulos/
+ y los recrea como HTML en salida/. También general la página index.html page
+ y adjunta todos los enlaces a los envíos.
bin/bliper-menu-creation.sh
- upon generation, a file called 'tmp' gets created. Then, this script
- comes and replaces all "INSERTMENU" strings in templates with the real
- menu. Nothing fancy, but you need to run this before deployment or
- viewing to generate your menus in all pages.
+ Al generarse, se genera un fichero llamado 'tmp'. Entonces, este script
+ reemplaza todas las cadenas "INSERTMENU" en las plantillas con el menu
+ de verdad. Nada pomposo, pero necesitas ejecutar este script antes de
+ distribuir la web para generar los menús para todas las páginas.
-main-articles
- files in this directory will be linked in 'blog' page. If no articles
- exist, blog page will not be created.
+articulos
+ Los ficheros de este directorio serán enlazados en la página 'blog' .
+ Si no hay artículos, no se generará ninguno
Makefile
- just type 'make' to generate your site. It calls bin/bliper-generate.pl
- and bin/bliper-menu-creation.sh. When you edit your
- bin/bliper-deploy.sh, you can deploy your site with 'make deploy'.
- Possible options are: make, make clean, make deploy.
-
-output
- is the directory which all generated pages are placed. Edit the style.css
- file according to your needs.
-
-pages
- is the directory where all individual pages live (check the included
- sample).
-
-pages-b
- is the directory which produces pages that do not appear on the menu.
- You can link to them through other pages with markdown.
-
-template
- main-top is the top section of the main page.
- main-bottom is the bottom section of the main page.
- page-top is a generic template for the top section of any post page.
- page-bottom is a generic template for the bottom section of any post page.
- footer is just the footer appended in all pages.
-
-To view the demo, run `make` in your main bliper directory. This calls
-bin/bliper-generate.pl and bin/bliper-menu-creation.sh. If you need to view the
-results, just run `$BROWSER output/index.html`
-
-When your site is ready, edit `bin/bliper-deploy.sh` accordingly and just `make
-deploy` on your main bliper directory.
-
-There is also support for disqus individualy for pages and articles. Just
-uncomment the disqus section on template/article-bottom and/or
-template/pate-bottom to enable disqus on articles and/or pages.
+ Simplemente escribe el comando "make" para generar tu página. Este
+ llama a bin/bliper-generate.pl y bin/bliper-menu-creation.sh. Si
+ editas bin/blipper-deploy.sh, podrás "subir" tu página con 'make deploy'.
+ Los posibles comandos a introducir: make, make clean, make deploy.
+
+salida
+ El directorio donde se genera la web. Edita style.css
+ para tus necesidades de estilo para tu web.
+
+paginas
+ El directorio donde residen las páginas individuales. Echa un vistazo
+ a los ejemplos introducidos.
+
+paginas-b
+ Las páginas donde no serán enlazadas al menú.
+ Puedes enlazar hacia estas páginas usando markdown.
+
+plantilla
+ main-top es la sección tope de la página principal.
+ main-bottom is es la sección del fondo de la página principal.
+ page-top is es una plantilla genérica para la sección tope en cada artículo.
+ page-bottom es una plantilla genérica para la sección del fondo en cada artículo.
+ footer es el pié de página de cada página (de cada una de ellas).
+
+Para ver la web de ejemplo, lanza el comando `make` en el directorio
+principal de Bliper. Esto hará que se llame a
+bin/bliper-generate.pl y bin/bliper-menu-creation.sh.
+Si necesitas ver el resultado, solo abra
+$BROWSER salida /index.html`, siendo $BROWSER Firefox, Chrome,
+Lynx, lo que prefieras.
+
+Cuando tu web esté lista, edita `bin/bliper-deploy.sh` según
+requisitos y lance `make deploy` en el directorio principal de
+Bliper.
+
+También hay soporte para disqus de forma individual para las páginas y
+artículo. Solo descomente la sección disqus en plantilla/article-bottom y/o
+plantilla/page-bottom para activar disqus en artículos y/o páginas.
diff --git a/bin/bliper-blog.pl b/bin/bliper-blog.pl
index 29173fb..67ec1bd 100644
--- a/bin/bliper-blog.pl
+++ b/bin/bliper-blog.pl
@@ -17,14 +17,14 @@ while (my $de = readdir($dh)) {
}
if ($count gt 0) {
- chdir($articledir) or die "Can't change dir to $articledir $!\n";
+ chdir($articledir) or die "No se puede cambiar a $articledir $!\n";
my @files = <*>;
@files = reverse @files;
- open (OUT, '>>', "../paginas/blog.md") or die "Could not open blog file $!\n";
+ open (OUT, '>>', "../paginas/blog.md") or die "No se ha podido abrir el fichero de blog $!\n";
foreach my $file (@files) {
$file =~ s/\.[^\.]*$//;
print OUT "<a class=\"blogitem\" href=\"$file.html\">$file</a><br>";
}
close OUT;
- chdir($maindir) or die "Can't change dir to $maindir $!\n";
+ chdir($maindir) or die "No se puede acceder a $maindir $!\n";
}
diff --git a/bin/bliper-generate.pl b/bin/bliper-generate.pl
index 4b80c2d..207f88a 100644
--- a/bin/bliper-generate.pl
+++ b/bin/bliper-generate.pl
@@ -5,23 +5,23 @@ use Cwd;
my $main_dir = getcwd;
my $main_page = 'salida/index.html';
-my $indir = 'articulos'; # The input directory name
-my $outdir = 'salida'; # The salida directory name
-my $pagedir = 'paginas'; # Individual paginas directory
-my $paginas_b = 'paginas-b'; # Pages that do not show at menu
-my @maint = qx(cat plantilla/main-top); # Top section for main page
-my @mainb = qx(cat plantilla/main-bottom); # Bottom section for main page
-my @footer = qx(cat plantilla/footer); # Footer for every page incl main
-my @paget = qx(cat plantilla/page-top); # Top section for every page in paginas/
-my @pageb = qx(cat plantilla/page-bottom); # Bottom section for every page in paginas/
-my @articlet = qx(cat plantilla/article-top); # Top section for every article in articulos/
-my @articleb = qx(cat plantilla/article-bottom); # Bottom section for every article in articulos/
-my $previewnum = 3; # Article number preview for frontpage
+my $indir = 'articulos'; # Directorio de entrada
+my $outdir = 'salida'; # Directorio de salida, la web
+my $pagedir = 'paginas'; # Páginas web individuales
+my $paginas_b = 'paginas-b'; # Páginas no mostradas en el menú
+my @maint = qx(cat plantilla/main-top); # Sección tope de la página
+my @mainb = qx(cat plantilla/main-bottom); # Sección al fondo de la página
+my @footer = qx(cat plantilla/footer); # Pie de cada página
+my @paget = qx(cat plantilla/page-top); # Sección tope para cada página en paginas/
+my @pageb = qx(cat plantilla/page-bottom); # Sección del fondo para cada págiona en paginas/
+my @articlet = qx(cat plantilla/article-top); # Sección tope para cada artículo en articulos/
+my @articleb = qx(cat plantilla/article-bottom); # Sección del fondo para artículo en articulos/
+my $previewnum = 3; # Número de vista previa para la página principal
my $cssfile = 'salida/style.css';
-unlink glob "salida/*.html"; # Remove old paginas
-unlink "salida/tmp"; # File which stores menu
-open (OUT, '>', "$outdir/index.html") or die $!; # Create the index.html page
+unlink glob "salida/*.html"; # Borrar páginas antiguas
+unlink "salida/tmp"; # Fichero que recogía el menú
+open (OUT, '>', "$outdir/index.html") or die $!; # Generar la página index.html
print OUT @maint;
chdir($pagedir) or die "No se puede acceder a $pagedir $!\n";
@@ -29,7 +29,7 @@ print "\n\t\t\tblipper (BLog In PERl) v0.1\n\n";
print "Entering " . getcwd . "\n\n";
open (OUT, '>>', "../$outdir/tmp") or die $!; # Crear el menú para las páginas de forma individual
print OUT "<ul class=\"menu\">"; # Comenzar el menú para la lista de lementos
-print OUT "<li><a href=\"index.html\">home</a></li>";
+print OUT "<li><a href=\"index.html\">Inicio</a></li>";
my @paginas = <*>; # Crear páginas individuales
foreach my $page (@paginas) {
@@ -55,11 +55,11 @@ close OUT or die $!;
chdir($main_dir) or die "No se puede acceder a to $main_dir $!\n";
# open (OUT, '>>', "$outdir/index.html") or die $!; # Crea la página index.html
-# print OUT "<p class=\"latart\">Latest articles:</p>";
+# print OUT "<p class=\"latart\">Últimos artículos:</p>";
# close OUT or die $!;
print "\nCompletada la generación de páginas individuales. ";
chdir($indir) or die "No se puede acceder a $indir $!\n";
-print "\nAccediendo a" . getcwd . "\n\n";
+print "\nAccediendo a " . getcwd . "\n\n";
my @files = <*>;
@files = reverse @files;
@@ -90,7 +90,7 @@ foreach my $file (@files) { # Lee cada entrada file(post) desde el direcotir
$preview_array[1]<br>
$preview_array[2]<br>
<p><a class=\"previewlink\" href=\"$file.html\">
- <em>read more... →</em></a></p></div>";
+ <em>Lee más... →</em></a></p></div>";
print OUT "\n";
print OUT "<br>";
}
Un proyecto texto-plano.xyz