Logs for #nikola for 2015-07-16

06:46:35 <ChrisWarrick> erdgeist: it’s not hard to get a datetime object, where you default to midnight on January 1st/midnight on the 1st day of the month, and just use Python’s standard <> comparison operators
10:39:39 <erdgeist> ChrisWarrick: But that does not really match the WHOLE of the year
10:39:57 <ChrisWarrick> erdgeist: <= >=
10:40:30 <erdgeist> ChrisWarrick: It should remember Jan 1st midnight and an "accuracy" of 365 days
10:40:50 <ChrisWarrick> 365.25*
10:40:54 <erdgeist> ;)
10:41:34 <erdgeist> ChrisWarrick: I still do not see that it's working the way you suggest it. DateTime objects just do not remember the specifity they were initialised with.
10:41:34 <ChrisWarrick> if date >= datetime.datetime(2015, 01, 01, 00, 00, 00, tzinfo=…) and date < datetime.datetime(2016, 01, 01, 00, 00, 00, tzinfo=…):
10:43:20 <erdgeist> ChrisWarrick: Uhm, I _DO_ know how to implement that manually. Still it is not built-in. And does not work by just comparing it against an object initialized just with a year
10:43:40 <ChrisWarrick> filling in the missing numbers is really simple
10:43:56 <ChrisWarrick> wait, I’m an idiot
10:43:59 <ChrisWarrick> if date.year == 2015:
10:44:40 <erdgeist> You don't seem to get what the js-API does for you
10:45:31 <erdgeist> You can just compare a date with a string and ask "does the date match the informal description", where one of those descriptions is the year, others are "weekday" or "monday" or "past noon"
10:48:29 <ChrisWarrick> then find a parser in python that does that.  but I would prefer to use slightly more formal things
10:49:18 <erdgeist> ChrisWarrick: Yes, finding this parser was exactly the question I had all along
10:49:37 <ChrisWarrick> write it yourself if it does not exist
10:50:22 <erdgeist> This is what I would need to resort to, then. ;) But I think this deserves another lib, then
10:51:09 <ChrisWarrick> erdgeist: one simple google search got me this: https://pypi.python.org/pypi/parsedatetime/?
10:51:29 <erdgeist> and why would you not allow users to informally express their filters? If the parser does not get it, they can always retry
10:51:34 <ChrisWarrick> https://github.com/scrapinghub/dateparser
10:51:41 <erdgeist> ChrisWarrick: Well, this lib can only parse to datetime
10:51:55 <erdgeist> ChrisWarrick: But it does not allow keeping the implied precission
10:52:06 <ChrisWarrick> fork it
10:52:08 <ChrisWarrick> write something better
10:52:14 <ChrisWarrick> use more computer-friendly formats
10:52:18 <erdgeist> ChrisWarrick: So 2001 turns out to be "today in 2001"
10:52:51 <erdgeist> Before I fork, I want to find out, if someone already wrote something like this
10:53:17 <ChrisWarrick> https://www.google.com/search?q=python+human+time+parsing
10:53:46 <erdgeist> the parsing is there, yes. But the comparing is not
10:54:03 <erdgeist> all those libs lose the implied precission after parsing
10:54:18 <ChrisWarrick> fork them, write something better, or just use more computer-friendly formats
10:56:38 <ChrisWarrick> I could write a programmer-friendly implementation with widely-understood tokens and no ambiguities in 15–30 minutes.
10:57:48 <erdgeist> So could I, but looking into sugarjs' implementation I notice there's a awful lot of corner cases to consider and I do not think that I could write it down flawlessly in 15-30 minutes
10:58:04 <ChrisWarrick> corner cases is your exact problem
10:59:09 <erdgeist> They even allow for a little margin of error that may be introduced by computing time alone, e.g. if you compare to "now"
11:12:56 <ChrisWarrick> done writing my parser
11:14:53 <ChrisWarrick> it’s enough for most users; “>=2015” does not work but I could fix that easily
11:15:52 <erdgeist> can I see it? :)
11:17:02 <ChrisWarrick> fixed >=2015, will pastebin in a sec
11:17:47 <ChrisWarrick> erdgeist: https://gist.github.com/2779f7d1ea006971aad1
11:18:16 <ChrisWarrick> exact and friendly to anyone who would use Nikola anyway
11:19:43 <ChrisWarrick> To get the year 2015: >=2015,<2016   or year>=2015,year<2016  without hacks
11:21:38 <erdgeist> The only think missing I can think of is day of week
11:21:51 <erdgeist> but besides that it looks great
11:24:06 <ChrisWarrick> that can be patched in, too
11:24:34 <erdgeist> currently trying
11:24:57 <ChrisWarrick> done, see https://gist.github.com/Kwpolska/2779f7d1ea006971aad1
11:25:37 <erdgeist> awesome :)
11:28:30 <ChrisWarrick> now that I did all this work, it will probably get itself merged into Nikola (I’ll relicense to MIT)
17:21:31 <KwBot> [nikola-themes] Kwpolska assigned issue #49 to Kwpolska: Can't install any theme https://github.com/getnikola/nikola-themes/issues/49
17:23:18 -GitHub[nikola]:#nikola- [nikola] Kwpolska created ssl-workaround (+1 new commit): http://git.io/vmgl5
17:23:18 -GitHub[nikola]:#nikola- nikola/ssl-workaround 80d64a1 Chris Warrick: Fix getnikola/nikola-themes#49 -- https→http fallback...
17:23:43 -GitHub[nikola]:#nikola- [nikola] Kwpolska opened pull request #1892: Fix getnikola/nikola-themes#49 -- https→http fallback (master...ssl-workaround) http://git.io/vmg8C
17:27:19 -travis-ci:#nikola- getnikola/nikola#5769 (ssl-workaround - 80d64a1 : Chris Warrick): The build failed.
17:27:20 -travis-ci:#nikola- Change view: https://github.com/getnikola/nikola/commit/80d64a12da21
17:27:20 -travis-ci:#nikola- Build details: https://travis-ci.org/getnikola/nikola/builds/71290191
17:28:19 -GitHub[nikola]:#nikola- [nikola] Kwpolska force-pushed ssl-workaround from 80d64a1 to e7d6693: http://git.io/vmgBC
17:28:19 -GitHub[nikola]:#nikola- nikola/ssl-workaround e7d6693 Chris Warrick: Fix getnikola/nikola-themes#49 -- https→http fallback...
17:32:56 -travis-ci:#nikola- getnikola/nikola#5771 (ssl-workaround - e7d6693 : Chris Warrick): The build was fixed.
17:32:57 -travis-ci:#nikola- Change view: https://github.com/getnikola/nikola/compare/80d64a12da21...e7d66934511e
17:32:57 -travis-ci:#nikola- Build details: https://travis-ci.org/getnikola/nikola/builds/71290839
18:29:27 <uwjesq> Hello. You know that? ERROR: You are using doit version 0.28.0, it is too new! This application requires version <= 0.27.
18:30:47 <uwjesq> ChrisWarrick: Hello.
18:31:05 <ChrisWarrick> uwjesq: hello.  upgrade nikola.
18:31:26 <uwjesq> ChrisWarrick: Just did. Doing it again.
18:31:40 <ChrisWarrick> cannot happen with v7.6.1 and quite a few older versions
18:31:55 <uwjesq> ChrisWarrick: This is 7.2 from pip.
18:32:00 <ChrisWarrick> uwjesq: this is ancient
18:32:43 <uwjesq> ChrisWarrick: I am just doing what the manual told me.
18:32:54 <uwjesq> ChrisWarrick: Let me try to install from github.
18:32:57 <ChrisWarrick> uwjesq: wat
18:33:04 <ChrisWarrick> uwjesq: pip install --upgrade Nikola
18:34:33 <uwjesq> ChrisWarrick: There seems to be a problem. just a sec
18:35:20 <uwjesq> pip uninstall Nikola   Can't uninstall 'Nikola'. No files were found to uninstall.
18:36:10 <ChrisWarrick> uwjesq: you made a mess on your system
18:36:26 <ChrisWarrick> uwjesq: pip install --upgrade Nikola  and hope it works
18:36:40 <uwjesq> ChrisWarrick: It did not.
18:37:01 <uwjesq> ChrisWarrick: Anyways. Thanks.
18:40:38 <ChrisWarrick> uwjesq: you made some sort of mess in your system, in which pip has issues detecting your nikola install
18:41:23 <ChrisWarrick> uwjesq: also, how does `pip install --upgrade Nikola` fail?
18:41:23 <uwjesq> ChrisWarrick: Yes, thank you.
18:42:46 * gour just did upgrade to 7.6.1
18:44:52 <gour> https://bpaste.net/show/8ccfbbd263e2
18:45:31 -GitHub[nikola]:#nikola- [nikola] Kwpolska force-pushed ssl-workaround from e7d6693 to 63dcbc7: http://git.io/vmgBC
18:45:31 -GitHub[nikola]:#nikola- nikola/ssl-workaround 63dcbc7 Chris Warrick: Fix getnikola/nikola-themes#49 -- https→http fallback...
18:49:52 -travis-ci:#nikola- getnikola/nikola#5773 (ssl-workaround - 63dcbc7 : Chris Warrick): The build passed.
18:49:53 -travis-ci:#nikola- Change view: https://github.com/getnikola/nikola/compare/e7d66934511e...63dcbc7092b7
18:49:53 -travis-ci:#nikola- Build details: https://travis-ci.org/getnikola/nikola/builds/71302954
19:35:27 <ralsina> gour: is that python3? Also, what version of Nikola?  I totally broke auto in 7.5
19:35:31 <ralsina> or 7.6
19:35:39 <ralsina> something like that :-)
19:44:39 <ChrisWarrick> more like I broke it
19:45:54 <KwBot> [nikola-themes] Kwpolska closed issue #49: Can't install any theme https://github.com/getnikola/nikola-themes/issues/49
19:45:59 <ChrisWarrick> wait, different breakage
19:46:09 -GitHub[nikola]:#nikola- [nikola] ralsina deleted ssl-workaround at 63dcbc7: http://git.io/vm2BP
19:47:49 <ralsina> Once I dropped livereload it would not work at all on py3
19:50:16 -travis-ci:#nikola- getnikola/nikola#5775 (master - 7c9219e : Roberto Alsina): The build passed.
19:50:17 -travis-ci:#nikola- Change view: https://github.com/getnikola/nikola/compare/8667a0946ab5...7c9219e8b5c4
19:50:17 -travis-ci:#nikola- Build details: https://travis-ci.org/getnikola/nikola/builds/71311801
20:02:11 <gour> ralsina: yes, python3 and 7.6.1
20:02:36 <ralsina> hmmmm ok, that's a new one then :-P
20:04:39 <gour> i'm going to sleep...if you'd require ore details ping me tomorrow
20:04:54 <gour> *more
20:05:02 <gour> 'night
23:54:41 <KwBot> [nikola] Aeyoun closed issue #1791: Norwegian translation update https://github.com/getnikola/nikola/issues/1791