Actualización

This commit is contained in:
perro tuerto 2023-06-26 09:29:22 -07:00
parent c3347a60c5
commit a6dad5b345
9 changed files with 13 additions and 277 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
.token
public/

View File

@ -1,264 +0,0 @@
/**************************************************/
/******************* RESETEADOR *******************/
/**************************************************/
/* http://meyerweb.com/eric/tools/css/reset/ v2.0 */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* Old browsers / Para viejos exploradores */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1.5;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/**************************************************/
body * {
font-family: AlegreyaSansRegular, sans-serif;
line-height: 1.15;
font-weight: normal;
font-style: normal;
}
body b {
font-family: "AlegreyaSansBold", sans-serif;
font-weight: bold;
font-style: normal;
}
body i {
font-family: "AlegreyaSansItalic", sans-serif;
font-weight: normal;
font-style: italic;
}
body a {
text-decoration: none;
}
body span.icon {
padding-right: .25rem;
}
header {
width: 100%;
height: 20rem;
background-image: url('../img/banner_color.jpg');
background-position: bottom;
background-repeat: no-repeat;
background-size: cover;
display: flex;
align-items: center;
justify-content: center;
}
header > img {
display: block;
height: 200px;
width: auto;
margin: auto;
}
nav, footer {
position: -webkit-sticky; /* Safari */
position: sticky;
top: 0;
background-color: #e5582d;
color: white;
padding: 1rem;
}
nav {
margin-bottom: 2rem;
font-size: 1.25rem;
}
nav a, footer a {
color: white;
}
nav li {
display: inline;
}
nav li:not(:first-of-type) {
margin-left: 1rem;
}
nav input#search-bar {
display: inline-block;
border-radius: 1rem;
padding: .15rem .5rem;
border: none;
width: 200px;
box-sizing: border-box;
color: #2e2e2e;
}
nav input#search-bar:focus {
outline: none;
}
section {
max-width: 40rem;
margin: auto;
padding: 0 1rem;
font-size: 1.15rem;
}
section > h1 {
font-size: 2rem;
margin-top: 2rem;
}
section > h1 + p {
margin-top: 1rem;
}
li.link {
scroll-margin-top: 5rem;
padding-top: 1rem;
}
li.link:not(:first-of-type) {
margin-top: 1rem;
}
li.link + li.link {
border-top: 1px dashed black;
}
li.link h1 {
font-size: 1.5rem;
}
li.link a.anchor {
font-size: 1rem;
padding-right: .5rem;
}
li.link summary {
color: #e5582d;
margin-left: -1rem;
}
li.link p.description,
li.link p.tags,
li.link p.dates {
color: gray;
}
li.link p.description:before,
li.link p.tags:before,
li.link p.dates:before,
li.link summary:before {
padding-right: .5rem;
}
li.link p.description:before {
content: "📝";
}
li.link p.tags:before {
content: "🏷️";
}
li.link p.dates:before {
content: "📅";
}
li.link span.created:before {
content: "Creado: ";
}
li.link span.updated:before {
content: "Actualizado: ";
padding-left: 1rem;
}
li.link div.info {
margin-top: 1rem;
}
li.link a.link {
display: table-cell;
padding-right: .5em;
}
details {
padding-left: 1rem;
}
details h1, details h2 {
margin: 1rem auto;
}
details h1:before, details h2:before {
color: #e5582d;
}
details h1:before {
content: "# ";
}
details h2:before {
content: "## ";
}
details h3:before {
content: "### ";
}
details p + p {
text-indent: 1rem;
}
footer {
margin-top: 2rem;
padding: 1em 25%;
text-align: center;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 583 KiB

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"count":1,"next":null,"previous":null,"results":[{"id":91,"url":"https://www.larramendi.es/i18n/consulta/libroselectronicos.do","title":"Biblioteca Virtual de Polígrafos","description":"Obras de Menéndez Pelayo, Hernando de Larramendi y otros en ebook.","notes":"# Presentación\r\n\r\n## Concepto de polígrafo y poligrafista\r\n\r\nMenéndez Pelayo retratado por SorollaLa Fundación se propone, a partir de una idea de Menéndez Pelayo, creador del término polígrafo en el sentido que se emplea aquí, hacer accesible el pensamiento de polígrafos españoles, portugueses, brasileños e hispanoamericanos reuniendo digitalmente su obra. El proyecto se realiza en algunas de sus partes mediante la colaboración con otras instituciones.\r\n\r\n## Concepto de polígrafo\r\n\r\nLa palabra *polígrafo* se refiere en este contexto al creador polifacético cuya obra marcó un punto de inflexión en su campo.\r\n\r\n## El poligrafista\r\n\r\nLlamamos *poligrafista* al profesos investigador especialista en alguno o algunos de los polígrafos que componen esta biblioteca virtual y que escribe un estudio sobre su figura y su obra. La Fundación Ignacio Larramendi encarga muchos de estos estudios.\r\n\r\n## El comienzo\r\n\r\nLa Biblioteca Virtual de Polígrafos es un proyecto que ideó y puso en marcha Ignacio Hernando de Larramendi en los años 90 del siglo XX, con la intención de aprovechar las posibilidades que las incipientes nuevas tecnologías ofrecían para la conservación y la difusión del conocimiento.\r\n\r\nIgnacio Larramendi centró esta Biblioteca Virtual en cuatro colecciones que recibieron el nombre de uno de los polígrafos más importantes de cada una de ellas: Marcelino Menéndez Pelayo, para la colección de polígrafos españoles, José de Anchieta, para la de brasileños, Francisco Manuel de Melo, para la de portugueses, y Andrés Bello, para la de hispanoamericanos. En recuerdo del aquellos comienzos figuran los cuatro polígrafos, por ese orden, en la cabecera de este micrositio.\r\n\r\n## Reconocimiento de la Biblioteca Virtual de Polígrafos por Europeana y el W3C\r\n\r\nLa Biblioteca Virtual de Polígrafos de la Fundación Ignacio Larramendi, denominada en inglés Polymath Virtual Library por el W3C, ha sido seleccionada por el clúster de Datos Bibliográficos de esta entidad como [Case Study](http://www.w3.org/2005/Incubator/lld/wiki/Use_Case_Polymath_Virtual_Library).\r\n\r\nTambién esta Biblioteca Virtual ha sido elegida por Europeana un [EDM Case Study](https://pro.europeana.eu/page/polymath-edm).","website_title":"Biblioteca Virtual de Polígrafos > \r\n Obras\r\n \r\n Libros electrónicos","website_description":"","is_archived":false,"unread":false,"shared":true,"tag_names":["esteticas","historia","ideas","blog"],"date_added":"2023-06-24T23:31:04.671856Z","date_modified":"2023-06-25T21:59:05.406668Z"}]}

View File

@ -24,7 +24,8 @@ contact = {
"github": "https://github.com/perrotuerto",
"email": "hi@perrotuerto.blog",
}
links = json.loads(Path(sys.argv[1]).read_text())
json_file = Path(sys.argv[1])
links = json.loads(json_file.read_text())
data = {"acerca": about, "contacto": contact, "links": links["results"]}
index = root / "public" / "index.html"
template = (root / "src" / "template.html").read_text()
@ -47,8 +48,8 @@ for key, val in data.items():
url = link["url"]
created = link["date_added"]
updated = link["date_modified"]
created = datetime.strftime(created, date1).strftime(date2)
updated = datetime.strftime(updated, date1).strftime(date2)
created = datetime.strptime(created, date1).strftime(date2)
updated = datetime.strptime(updated, date1).strftime(date2)
tags = filter(lambda x: x != "blog", link["tag_names"])
tags = map(lambda x: f'<span class="tag">#{x}</span>', tags)
tags = map(lambda x: f'<a>{x}</a>', tags)
@ -84,3 +85,4 @@ for key, val in data.items():
body += '\n</section>'
index.write_text(re.sub('#LINKS#', body, template))
json_file.write_text(json.dumps(data))

View File

@ -4,7 +4,7 @@ JSON=public/perro.json
cd $(dirname $0)/..
# Limpia sitio
rm -rf public
if [ -d "public" ]; then rm -rf public; fi
mkdir public
cp -r src/* public
rm public/*.*
@ -19,9 +19,9 @@ curl --request GET \
python3 ./scripts/make.py $JSON
# Hace commit al repo si hubo cambios
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Actualización"
git push origin
git push cuates
fi
#if [ -n "$(git status --porcelain)" ]; then
# git add .
# git commit -m "Actualización"
# git push origin
# git push cuates
#fi