Logs for #nikola for 2015-11-12

16:12:05 -GitHub[site]:#nikola- [nikola-site] Kwpolska pushed 1 new commit to master: http://git.io/v8xbe
16:12:05 -GitHub[site]:#nikola- nikola-site/master 6db3cd5 Chris Warrick: Update Mac OS X install instructions (getnikola/nikola#2171)...
18:01:20 <jluttine> is it possible to get the filename and post type (md, rst, ...) in jinja template? i'd need to write some links based on the filename conditioned on the post type..
18:01:48 <jluttine> i've tried {{ post.filename }} and almost all {{ post.* }} i can think of..
18:02:01 <jluttine> i couldn't find a documentation about the post object
18:03:26 <jluttine> {{ post.meta('slug') }}  is close but slug isn't necessarily the same as the base filename of the source
18:11:48 <jluttine> ok, i maybe found something! looking at Post class in nikola/post.py source code
18:20:05 <ralsina> jluttine: there is no documentation for that object, but yes, looking at the Post source should work
18:20:44 <jluttine> i got the filename but can't find a way to determine which type the source is
18:21:19 <jluttine> i can of course use different template for some source types but then i would need to copy a bunch of templates
18:24:11 <jluttine> got it! post.source_path and post.compiler.name :) :) :)
18:30:43 <ralsina> cool :-)
18:30:59 <ralsina> Sorry I couldn't be specific but I am nowhere near the code :)
20:38:13 <erdgeist> Is there a way to spider a mediawiki-installation just as with a wordpress site?
20:47:47 <ralsina> erdgeist: sadly no
20:48:12 <ralsina> erdgeist: if you can get a list of URLs you may be able to import them using import_gae and some scripting
20:48:40 <ralsina> erdgeist: we do have a mediawiki-like markup compiler if you have a dump of the site in some reasonable format
20:48:46 <erdgeist> ralsina: Smartest thing would be to export them in mediawiki-syntax?
20:49:12 <ralsina> erdgeist: probably, although I don't know how GOOD the mediawiki parser is :-P
20:49:27 <ralsina> erdgeist: you are in unmarked territory :-)
20:49:28 <erdgeist> ralsina: I found that you can dump the raw syntax with some SQL
20:49:29 <erdgeist> SELECT page_title, page_touched, old_text 
20:49:29 <erdgeist> FROM revision,page,pagecontent
20:49:29 <erdgeist> WHERE revision.rev_id=page.page_latest
20:49:30 <erdgeist> AND pagecontent.old_id=revision.rev_text_id;
20:50:01 <ralsina> ok, then some more scripting should let you create a folder with all the dumps in it so nikola can eat it :-)
20:50:10 <erdgeist> Looks like I have to manually put all pages into a category, then use the Special:Export on that category and use xslt to convert to something
20:50:36 <ralsina> erdgeist: if you do find a reasonable path, please document the steps!
20:51:05 <erdgeist> .oO( did anything resemble something reasonable even remotely? ;-)
20:51:33 <erdgeist> It's worse than facebook!
20:53:12 <erdgeist> ralsina: But thank you, anyway!
20:53:19 <ralsina> haha
20:53:32 <ralsina> mediawiki is complicated, the API is pretty nuts too