Skip to main content

Ralsina.Me — Roberto Alsina's website

Some New Stuff in Nikola

I did some quick work on Niko­la (a stat­ic web­site/blog gen­er­a­tor) late­ly, af­ter a long time, and here's what it was:

Multilingual Sitemaps

So, sitemaps are used by Google to in­dex your site. It turns out that they can de­scribe when there are sets of pages that are trans­la­tions of each oth­er. So the next re­lease will do that (Is­sue #1610)

Matplotlib Plots

Mat­plotlib comes with a sphinx ex­ten­sion to do plots So I went and im­ple­ment­ed it, this was Is­sue #1242 and it's a plug­in called py­plot­s, which will be soon at http://­plu­g­in­s.get­niko­la.­com#py­plots

I hat­ed the orig­i­nal code. It felt con­vo­lut­ed, and just weird (it's prob­a­bly just me) so I wrote it from scratch and it has some mi­nor dif­fer­ences, but it's fair­ly com­pat­i­ble.

Classy Images

The do­cu­tils im­age di­rec­tive, for what­ev­er rea­son, does­n't sup­port a class op­tion, so you need to do things like this:

.. class:: foo

.. image:: blah.png

Which is ... not pret­ty. So I did a hacky plug­in that mon­key­patch­es the im­age di­rec­tive to add that op­tion. The plug­in is at http://­plu­g­in­s.get­niko­la.­com/#­classy-im­ages and this fix­es Is­sue 1538

Mediawiki Markup

djbclark point­ed out that there is a li­brary to parse Me­di­aWi­ki from python called sm­c.mw so I im­ple­ment­ed a plug­in to use it, so now you can use Me­di­aWi­ki markup. The plug­in is at http://­plu­g­in­s.get­niko­la.­com/#­me­di­awi­ki

Removed Default Swatch from Bootswatch

This was Is­sue #1656 and now you have to spec­i­fy the swatch. This is a us­abil­i­ty fix, be­cause de­faults mat­ter.

Played with KaTeX

Niko­la sup­ports math us­ing Math­Jax. Math­Jax has some in­ter­est­ing qual­i­ties:

  • It's 160MB of code or so

  • It's not prac­ti­­cal to use with­­out a CDN

  • It's not prac­ti­­cal to use we­bas­set bun­­dles with it

Then, klingt­net men­tioned some­thing called Ka­TeX I had nev­er heard about. I did a quick hacky con­ver­sion to see how it work­s. Not done yet, to­tal­ly ex­per­i­men­tal, but it may be pos­si­ble to bun­dle it, and maybe even have it turned on by de­fault, re­mov­ing the need for the math­jax la­bel which is aw­ful us­abil­i­ty-­wise.

Some of these things are merged, some are still PRs, some are in core, some are plug­ins. They were all pret­ty fun to do :-)

Full Fathom Five (Craft Sequence, #3)

Cover for Full Fathom Five (Craft Sequence, #3)

Review:

I am start­ing to wish the mag­ic sys­tem in these books had been thought a lit­tle more. It seems to be a lit­tle too con­ve­nien­t.

In any case:

* Good to see char­ac­ters from the pre­vi­ous book­s! Maybe it's all com­ing to­geth­er in the next one?
* Kai is a very in­ter­est­ing lead
* The idea of crim­i­nal re­ha­bil­i­ta­tion in this book is scary as hell

Two Serpents Rise (Craft Sequence, #2)

Cover for Two Serpents Rise (Craft Sequence, #2)

Review:

So, there's this guy liv­ing in a large city, south by the west coast, you see, and he's in­volved in some strange thing about wa­ter right­s.

Be­cause he's stub­born and has some in­ves­ti­gat­ing tal­en­t, he ends up way over his head, in the com­pa­ny of big fish, along with this mis­tery gal who may not be what she ap­pears to be.

So, like Chi­na­town (the movie) ex­cept LA is pop­u­lat­ed by mad aztec­s, and cen­tral amer­i­ca was de­stroyed a while ago. What's not to like?

El Sutil Arte de Citar

Los pe­ri­odis­tas tele­vi­sivos sue­len ten­er un cier­to com­ple­jo de in­fe­ri­or­i­dad con los que medios im­pre­sos. Por eso solés ver gente que con­duce ex­i­tosos ci­c­los políti­cos recor­dar que el­los el pe­ri­odis­mo lo ma­maron en la redac­ción del se­m­a­nario "El Man­grul­lo" de Ve­na­do Tuer­to, y que eso de ga­nar mucha gui­ta apare­cien­do en tele lo ha­cen porque no les que­da otra.

De ahí que cuan­do (ponéle) Ma­jul hace una no­ta y la lev­an­ta un medio im­pre­so, siem­pre la retwitea. Por ejem­plo, acá mues­tra, orgul­loso, que su no­ta es cita­da por el Cro­nista Com­er­cial:

Aho­ra bi­en, si uno va y lee la no­ta... re­sul­ta que dice ex­ac­ta­mente lo con­trario que el tí­tu­lo.

Cito la no­ta:

"Con Rab­bani no ten­emos ningún in­ter­cam­bio de dinero."

Sí ad­mite recibir dinero de Irán:

Muchas ve­ces las uni­ver­si­dades de Teherán con­tribuían con nosotros y le decíamos "nece­si­ta­mos tan­to para hac­er el tra­ba­jo re­li­gioso"

Sin em­bar­go, Irán no es Rab­ban­i, y Rab­bani no es Irán. No ten­go idea de si Khalil recibe dinero de Rab­ban­i, y no es de lo que es­toy hablan­do en este mo­men­to. Lo que sí veo es que no lo di­jo. Y que ese tí­tu­lo es men­ti­ra, y el tweet es men­ti­ra, y Ma­jul repite una men­ti­ra.

Y lo hace a sa­bi­en­das.

Co­mo diría Luis Ma­jul... ¿Que sen­tís, Luis Ma­jul?


Contents © 2000-2024 Roberto Alsina