Logs for #nikola for 2018-03-30

01:36:09 <BxCx> Hol.
01:36:12 <BxCx> Hola.
08:24:37 <KwBot> [plugins] bishesh opened issue #264: [publication_list] allow repeated bibtex entries optionally https://github.com/getnikola/plugins/issues/264
14:20:39 <berti> hmmm, now my plugin calculates estimated reading time for posts and pages, but how to add this meta information back to the post object, so that it is accessible from templates?
14:49:14 <ChrisWarrick> berti: estimated reading time is already provided by Nikola.
14:49:27 <berti> Huh? :-D
14:49:49 <ChrisWarrick> berti: But in a general case, you could just mdify the post object, or set post.meta values
14:51:01 <berti> the plugin is connected to the compile signal. is there a general method to get the post object from the signal event?
14:51:23 <ChrisWarrick> ugh, signal handlers
14:51:56 <berti> i could scan the timeline and match hashes until the correct one is found
14:52:29 <ChrisWarrick> https://github.com/getnikola/nikola/blob/master/nikola/post.py#L579
14:54:41 <berti> I 'm a python newbie ;-) How to get the post objekt from 'post': <Post: 'pages/projects/github_repo.md' 843c9ff25937b94eb757e17be8240d40> ?
14:55:24 <ChrisWarrick> it’s a dictionary
14:55:35 <ChrisWarrick> signal_thing['post']
14:56:37 <berti> yes. But to manipulate the post object itself I need some kind of "handle", or am i wrong?
14:57:10 <berti> I'm a C/C++ guy, the world is a pointer or a reference
14:57:16 <berti> :-D
14:57:25 <ChrisWarrick> python is pass-by-reference in most cases
15:02:18 <berti> OK, nice. #1220 already does exact the same thing my plugin should have done. reading the docs more carefully could help... ;-)
16:40:54 <berti> Reading time done, now onto the next missing thing, related posts.
16:51:13 <berti> similarity suffers from #246 and is a real T&M hog
16:54:10 <berti> ChrisWarrick: before i start to code my own "light" plugin to handle related posts via meta-data and common tags - is there already something available or on the todo list? ;-)
17:03:32 <ChrisWarrick> berti: no idea
18:51:05 <KwBot> [nikola] michaelb42 opened issue #3003: Missing docs for post props reading_time, remaining_reading_time, paragraph_count, remaining_paragraph_count https://github.com/getnikola/nikola/issues/3003
21:55:02 <ralsina> berti: but we already provide that
21:55:15 <ralsina> berti: in post.reading_time
21:55:46 <ralsina> BUT, if you really want to do it ... you need to make your plugin patch the post so it has that data
21:55:56 <ralsina> And then in the template you use it
21:56:16 <ralsina> One "easy" way is to just proramatically adding metadata to the post
21:57:48 <ralsina> For example, if 'en' is your default language, you can do p.meta['en']['readingtime'] = '12'
21:58:02 <ralsina> where p is the post object for which you calculated the reading time
21:58:15 <ralsina> You should prbably calculate this for each language separately
23:18:15 <KwBot> [nikola] amireldor opened issue #3004: Nikola 'clean' command shows and error and fails on Python 3 https://github.com/getnikola/nikola/issues/3004
23:19:48 <BxCx> hola.
23:29:17 <berti> ralsina: nope, i don't want to do it anymore. post.reading_time works fine. Only docs are missing...
23:31:28 <berti> ralsina: but i still have no good idea how to get the  post object to modify from the dictionary, from 'post': <Post: 'pages/projects/github_repo.md' 843c9ff25937b94eb757e17be8240d40>
23:32:15 <berti> beside of searching through site.timeline until the hast matches
23:52:16 <berti> s,hast,hash,