Skip to main content

Ralsina.Me — Roberto Alsina's website

Improved Wordpress.com Importer and a Question

Thanks to the co­op­er­a­tion of Hu­mi­tos who gave me his word­press back­up, I did some im­prove­ments in the word­press.­com im­port fea­ture of Niko­la, my stat­ic web­site/blog gen­er­a­tor

So, if you were to try to use nikola_wordpress_importer from master now, it would:

  1. Not crash ;-)

  2. Down­load at­­tach­­ments

  3. Fix links to at­­tach­­ments so they work on the new site

How­ev­er, I am now un­sure of what ex­act­ly is in word­press.­com's ex­port XML file. The posts them­selves are in this for­m:

Muchas gracias Nico por hacer el video este. Groso, quedó muy bueno.

[youtube=http://www.youtube.com/watch?hl=es&v=882qxARXa6c]

Two things jump to me:

  1. That's not HTML

  2. WTF is that youtube thing?

I am hav­ing some suc­cess pro­cess­ing it as mark­down, since that han­dles the para­graph breaks and some oth­er stuff. Maybe the youtube em­bed­ding is done with a mark­down ex­ten­sion?

Any­one knows?

Roberto Rodríguez / 2012-09-04 11:49:

Es un "shortcode", toma una lista de parámetros y los pasa a una función PHP http://codex.wordpress.org/...

Roberto Alsina / 2012-09-04 12:12:

Great! Thanks.

SemExpert / 2012-09-05 12:38:

No vas a poder hacer un parser que contemple todos los shortcodes posibles porque no hay limite a cuants shortcodes pueden existir. Cada plugin de WP trae los propios. Si podrías soportar los que vienen de fabrica. Tené en cuenta que no es lo mismo Wordpress.org que Wordpress.com. El primero te la aplicacion para que te la instales, el segundo es un servicio hosteado. El segundo soporta muchisimos mas shortcodes "de fabrica" que el primero

Roberto Alsina / 2012-09-05 12:45:

Con soportar algunos de los mas comunes de wordpress.com calculo que está bien.


Contents © 2000-2023 Roberto Alsina