*** TDJACR has quit IRC | 00:02 | |
*** TDJACR has joined #cc | 00:05 | |
*** TDJACR has quit IRC | 00:09 | |
*** TDJACR has joined #cc | 00:12 | |
*** Danny_B has quit IRC | 00:21 | |
*** luisv has quit IRC | 00:21 | |
*** luisv has joined #cc | 00:22 | |
*** Danny_B has joined #cc | 00:23 | |
*** Kaetemi__ has joined #cc | 00:47 | |
*** Kaetemi__ has joined #cc | 00:47 | |
*** Kaetemi has quit IRC | 00:50 | |
*** shellac has quit IRC | 01:10 | |
*** luis__ has joined #cc | 02:03 | |
*** luis__ has quit IRC | 02:43 | |
*** luis__ has joined #cc | 02:46 | |
*** luis__ has quit IRC | 03:42 | |
*** JoiIto has joined #cc | 03:43 | |
*** JoiIto has quit IRC | 03:50 | |
*** luisv has quit IRC | 03:58 | |
*** JoiIto has joined #cc | 04:00 | |
*** JoiIto1 has joined #cc | 04:07 | |
*** JoiIto has quit IRC | 04:08 | |
*** JoiIto has joined #cc | 04:08 | |
*** JoiIto has quit IRC | 04:09 | |
*** JoiIto1 has quit IRC | 04:11 | |
*** JoiIto has joined #cc | 04:18 | |
*** luisv has joined #cc | 04:31 | |
*** luisv has quit IRC | 05:13 | |
*** luisv has joined #cc | 05:18 | |
*** JoiIto has quit IRC | 06:05 | |
*** JoiIto has joined #cc | 06:11 | |
*** sama has joined #cc | 06:21 | |
*** Kaetemi__ has quit IRC | 07:10 | |
*** sama has quit IRC | 07:23 | |
*** Bovinity has quit IRC | 09:05 | |
*** JoiIto has quit IRC | 09:15 | |
*** wormsxulla has quit IRC | 09:40 | |
*** wormsxulla has joined #cc | 09:59 | |
*** Kaetemi has joined #cc | 10:05 | |
*** Kaetemi has joined #cc | 10:05 | |
*** thomg has joined #cc | 10:30 | |
*** thomg has quit IRC | 10:45 | |
*** Kaetemi has quit IRC | 11:39 | |
*** Kaetemi has joined #cc | 11:45 | |
*** augustinas has joined #cc | 12:58 | |
augustinas | hello here :] | 12:58 |
---|---|---|
*** JoiIto has joined #cc | 13:07 | |
*** Kaetemi has quit IRC | 13:13 | |
*** JoiIto has quit IRC | 13:26 | |
*** JoiIto has joined #cc | 13:27 | |
*** JoiIto has quit IRC | 13:31 | |
*** nasenbaerchen has joined #cc | 13:43 | |
*** nasenbaerchen has left #cc | 13:43 | |
*** tvol has joined #cc | 13:52 | |
*** luisv has quit IRC | 15:44 | |
*** tvol has quit IRC | 16:17 | |
*** tvol has joined #cc | 16:20 | |
*** Kaetemi has joined #cc | 16:27 | |
*** Kaetemi has joined #cc | 16:27 | |
*** Kaetemi__ has joined #cc | 16:28 | |
*** Kaetemi__ has joined #cc | 16:28 | |
*** Kaetemi has quit IRC | 16:30 | |
*** Kaetemi__ is now known as Kaetemi | 16:30 | |
*** Bovinity has joined #cc | 16:50 | |
*** Bovinity has quit IRC | 16:56 | |
*** nathany has joined #cc | 17:09 | |
*** jgay has joined #cc | 17:09 | |
paroneayea | nathany: pd_waiting_verification <- is this view in the old cc0 code deprecated? It's written but the configure.zcml file doesn't point to it, and it seems to be using the more "generic" email view | 17:13 |
nathany | paroneayea, yeah, i think that's probably a copy and paste carry over from the old PDC code | 17:14 |
paroneayea | ok cool, thx | 17:17 |
*** JED3 has joined #cc | 17:24 | |
*** k9d-925 has joined #cc | 17:28 | |
*** mralex has joined #cc | 17:42 | |
*** michi__ has joined #cc | 17:52 | |
*** luisv has joined #cc | 17:54 | |
*** akozak has joined #cc | 18:04 | |
*** nathany has quit IRC | 18:09 | |
*** nathany has joined #cc | 18:10 | |
paroneayea | JED3: so did you catch the email I sent you friday night? | 18:22 |
JED3 | paroneayea, yep, thanks a ton for that | 18:22 |
paroneayea | one more point against librdf :\ | 18:23 |
*** michi__ has quit IRC | 18:23 | |
paroneayea | and np | 18:24 |
JED3 | paroneayea, appears to be more of an issue with libxml2 | 18:24 |
paroneayea | JED3: you think so? hm | 18:24 |
paroneayea | nathany suggested it may have to do with both lxml and librdf accessing libxml2 at once | 18:25 |
JED3 | paroneayea, yeah i think thats exactly it | 18:25 |
JED3 | libxml2 has a global/thread-local state | 18:26 |
paroneayea | ahhhh | 18:27 |
nathany | JED3, paroneayea, FWIW I don't have an answer for what to do, just identified the likely culprit :) | 18:27 |
paroneayea | nathany: simple answer, we'll just rewrite libxml2! ;) | 18:28 |
paroneayea | jk jk jk | 18:28 |
*** sama has joined #cc | 18:28 | |
JED3 | haah, how troubling would it be to move to rdflib? | 18:28 |
JED3 | not giving up on a solution, just curious | 18:29 |
paroneayea | well, I've had other seriously irritating issues with the librdf bindings (some very simple queries that take 5 minutes to run, had to use list comprehensions in python to make up for it :( ) | 18:31 |
paroneayea | so a move to rdflib would personally be something I'd be interested in investigating | 18:31 |
nathany | JED3, paroneayea: unfortunately its not 100% clear to me that rdflib has sufficient sparql support for everything we're doing | 18:32 |
nathany | that's my biggest caveat ATM | 18:32 |
paroneayea | nathany: ah, hm :\ | 18:32 |
paroneayea | well, yeah, a pretty big caveat | 18:32 |
nathany | so... yeah | 18:32 |
paroneayea | however it doesn't really seem *possible* to get around that libxml2 issue, does it? | 18:34 |
paroneayea | or is it? | 18:34 |
paroneayea | what's using lxml again? | 18:35 |
paroneayea | in cc.license | 18:35 |
paroneayea | oh right | 18:35 |
JED3 | nathany, are the concerns with the sparql speed or features? if features which portions of the sparql spec aren't covered in rdflib (just for my own knowledge) | 18:35 |
paroneayea | the xslt stuff, duh | 18:35 |
paroneayea | yes I am curious about this also | 18:36 |
JED3 | paroneayea, i think i may have a hack for it | 18:36 |
JED3 | ... testing said hack now | 18:36 |
nathany | JED3, paroneayea: see http://www.w3.org/2001/sw/DataAccess/tests/implementations | 18:46 |
nathany | FWIW rasqal didn't have full support either | 18:46 |
nathany | so may not matter | 18:46 |
mralex | is NK off? | 18:47 |
paroneayea | hm | 18:47 |
mralex | no wonder people can't use timemachine, the password for the backup server is wrong and/or the required user is missing. | 18:47 |
nathany | yes, until tomorrow | 18:47 |
JED3 | paroneayea, ping | 19:31 |
paroneayea | JED3: pong | 19:45 |
JED3 | hi, I am trying to use the licenseselector class for CC0 but am getting an IndexError | 19:47 |
paroneayea | hm | 19:47 |
paroneayea | could you paste how you are trying to use it? | 19:48 |
JED3 | CC0HTMLFormatter().format(LicenseSelector("http://creativecommons.org/publicdomain/zero/")) | 19:48 |
JED3 | Traceback (most recent call last): | 19:48 |
JED3 | File "<console>", line 1, in <module> | 19:48 |
JED3 | File "/home/jed/p/cc/cc.license/cc/license/selectors/classes.py", line 28, in __init__ | 19:48 |
JED3 | if child.get('id') != self.id: | 19:48 |
JED3 | File "/home/jed/p/cc/cc.license/cc/license/selectors/classes.py", line 45, in id | 19:48 |
JED3 | self._id = rdf_helper.get_selector_id(self.uri) | 19:48 |
JED3 | File "/home/jed/p/cc/cc.license/cc/license/_lib/rdf_helper.py", line 298, in get_selector_id | 19:48 |
JED3 | return str(solns[0]['lcode'].literal_value['string']) | 19:48 |
JED3 | IndexError: list index out of range | 19:48 |
paroneayea | I think part of the answer might be that I haven't really been using the LicenseSelector | 19:49 |
paroneayea | I've just been doing cc.license.by_code('CC0') | 19:49 |
paroneayea | so I do | 19:49 |
paroneayea | CC0HTMLFormatter().format(cc.license.by_code('CC0')) | 19:49 |
JED3 | awesome, that'll work just as well, thx | 19:50 |
paroneayea | :) | 19:50 |
*** sama has quit IRC | 20:06 | |
*** JoiIto has joined #cc | 20:10 | |
JED3 | paroneayea & nathany, my libxml2 bork fork: http://dpaste.com/156278/ | 20:16 |
paroneayea | bork fork | 20:16 |
JED3 | paroneayea, tehehe and it works just fine | 20:17 |
JED3 | albeit completely hackish | 20:17 |
paroneayea | wait | 20:17 |
paroneayea | what is happening? | 20:17 |
paroneayea | oh | 20:17 |
paroneayea | oh I see | 20:17 |
paroneayea | a subprocess :) | 20:17 |
paroneayea | yes, hackish, but also works, and that is good | 20:18 |
JED3 | :) brb lunch | 20:18 |
paroneayea | if this were perl we would have been doing it from the beginning anyway | 20:18 |
paroneayea | this is unix, I know this | 20:18 |
paroneayea | kk | 20:19 |
akozak | awesome http://googlingwithkittens.com/ | 20:57 |
*** JoiIto has quit IRC | 21:28 | |
*** jgay has quit IRC | 21:43 | |
JED3 | nathany, ping | 22:26 |
nathany | JED3, pong | 22:31 |
JED3 | nathany, nm i think i answered my own question | 22:31 |
nathany | awesome, glad i could help | 22:32 |
* paroneayea asks an annoying question to fill the void | 22:32 | |
paroneayea | nathany, JED3: how skilled are either or both of you at solving unicode decoding errors that appear to be somewhere deep in the zope i18n machinery? | 22:32 |
paroneayea | this little character is causing me hell: — | 22:33 |
nathany | paroneayea, can you be more specific about the error it's causing? | 22:33 |
paroneayea | sure :) | 22:34 |
paroneayea | so in the .po files there's this entry: | 22:34 |
paroneayea | #: c/engine/chooser_pages/gpl.pt:63 c/engine/chooser_pages/lgpl.pt:66 | 22:34 |
paroneayea | msgid "license.fsf_how_it_works" | 22:34 |
paroneayea | msgstr "" | 22:34 |
paroneayea | "Here's how the CC-GNU ${license_code} works: A user clicking on the " | 22:34 |
paroneayea | "Creative Commons icon gets the CC-GNU ${license_code} \"<a " | 22:34 |
paroneayea | "href=\"/licenses/${license_code}/${version_title}/\">Commons Deed</a>\" —" | 22:34 |
paroneayea | " a human readable version of the license. From that she can link to \"<a " | 22:34 |
paroneayea | "href=\"http://www.gnu.org/licenses/old-" | 22:34 |
paroneayea | "licenses/${license_name_lower}.html\">Legal Code</a>\" — the full text of" | 22:35 |
paroneayea | oh shoot that was a big paste, sorry | 22:35 |
paroneayea | well anyway, I'm getting this error: | 22:35 |
nathany | paroneayea, ok | 22:35 |
paroneayea | http://dpaste.com/156339/ | 22:36 |
nathany | paroneayea, what does sys.getdefaultencoding() | 22:36 |
nathany | return for you? | 22:36 |
paroneayea | 'ascii' | 22:37 |
nathany | paroneayea, ah-ha! | 22:37 |
paroneayea | I'm aware you can change that to utf-8, but I thought that was considered a no-no? | 22:37 |
nathany | paroneayea, i'm not sure why it's considered a no-no, beyond that it means mucking with the deployment | 22:37 |
paroneayea | http://farmdev.com/talks/unicode/ <- so says kumar's talk | 22:37 |
paroneayea | hm | 22:37 |
nathany | let me look | 22:38 |
nathany | i reject his assertion that it's more trouble than it's worth; apparently he hasn't dealt with tracebacks like yours :) | 22:40 |
nathany | (but let me look closer) | 22:40 |
nathany | paroneayea, at least he lists "default Python 2 encoding is 'ascii'" in the summary of problems | 22:41 |
nathany | paroneayea, does util.plain_template_view load the template from the package? | 22:41 |
paroneayea | util.plain_template view calls cc.license.formatters.pagetemplate.CCLPageTemplateFile | 22:43 |
paroneayea | by default plain ZPT doesn't provide any functionality for i18n at all, it leaves a method open for you to define it yourself | 22:43 |
paroneayea | ... which I had to dig and dig to figure that out ;p | 22:43 |
nathany | paroneayea, uh, ok; so are you reading the template from the file or is zope.* code doing that? | 22:44 |
nathany | it looks like if you do .decode() when you read it, that might fix things | 22:44 |
paroneayea | it's not the template that's doing it though | 22:45 |
paroneayea | er, not the character in the template | 22:45 |
paroneayea | it's what's being returned by translate() | 22:45 |
paroneayea | zope.i18n.translate that is | 22:46 |
paroneayea | try this: | 22:46 |
paroneayea | >>> from cc.i18npkg import ccorg_i18n_setup | 22:48 |
paroneayea | >>> from zope.i18n import translate | 22:48 |
paroneayea | >>> translate('license.fsf_how_it_works', 'cc_org', {u'version_title': u'2.0', u'license_url': u'http://creativecommons.org/licenses/GPL/2.0/', u'license_name_lower': u'gpl-2.0', u'license_code': u'GPL'}, default='stupid default here', target_language='en') | 22:48 |
paroneayea | it dies once it tries doing the interpolation of values unfortunately :\ | 22:49 |
nathany | i see | 22:50 |
nathany | i suppose the "right" solution would be to update our PO files and encode them as ASCII (if that'd even work with the em-dash) | 22:50 |
paroneayea | is that right though? Plenty of PO files won't fit into ascii | 22:51 |
nathany | hrm | 22:51 |
nathany | true | 22:51 |
paroneayea | the weird thing is: | 22:51 |
paroneayea | this works in zope | 22:51 |
paroneayea | theoretically, zope is also calling translate() | 22:52 |
nathany | what do you mean "in zope" | 22:52 |
paroneayea | in the old cc.engine | 22:52 |
nathany | sure | 22:52 |
nathany | we have the default encoding set to utf-8 :D | 22:52 |
paroneayea | ..... ahhh | 22:52 |
nathany | wasn't that easy? ;) | 22:52 |
nathany | seriously, it seems like the issue is that you need to decode when you load the PO file | 22:52 |
nathany | there's no reliable way to do detection, so you can't just "fix" zope.i18n | 22:53 |
paroneayea | do you mean load the PO file to convert to the MO file or load the MO file | 22:53 |
nathany | oh, right | 22:53 |
nathany | ok, no idea | 22:53 |
nathany | (forgot about the MOs) | 22:53 |
paroneayea | at any rate, I don't know *where* I'd do that, I've been looking at the cc.i18npkg.ccorg_i18n_setup hackery I wrote | 22:54 |
paroneayea | strange thing is though, most languages do not break | 22:54 |
paroneayea | just this stupid dash | 22:54 |
paroneayea | chinese loads just fine, and so it must be able to load utf-8... I don't know why it's breaking like this | 22:55 |
nathany | paroneayea, does chinese actually interpolate? | 22:55 |
nathany | it seems like it's not the loading that's the issue, it's the interpolation | 22:55 |
paroneayea | right that's true, but it should be dying on the deeds also then for the interpolation | 22:56 |
paroneayea | http://127.0.0.1:6543/licenses/by/3.0/deed.ar | 22:56 |
paroneayea | looking at arabic right now on my computer | 22:56 |
paroneayea | loads all pretty | 22:56 |
paroneayea | hm | 22:56 |
paroneayea | maybe there *isn't* interpolation on the deeds | 22:57 |
nathany | paroneayea, there isn't | 22:57 |
paroneayea | I bet the formatters are breaking then as well | 22:57 |
paroneayea | okay, so there seem to be two solutions here: | 22:57 |
paroneayea | - super easy theoretically gross solution: just set the default encoding to utf-8 | 22:58 |
paroneayea | - don't use zope.i18n.translate, use something else | 22:58 |
paroneayea | I guess I'll just try the former for now | 22:58 |
nathany | paroneayea, well if you want to follow kumar's advice, i have a third suggestion | 22:58 |
paroneayea | oh | 22:58 |
paroneayea | I am all ears | 22:58 |
nathany | he says to decode early, right? | 22:58 |
paroneayea | right | 22:59 |
nathany | so cc.i18npkg is what loads the PO files from disk via GettextMessageCatalog | 22:59 |
nathany | see http://svn.zope.org/zope.i18n/trunk/src/zope/i18n/gettextmessagecatalog.py?rev=75140&view=auto | 22:59 |
nathany | obviously the reload method is where that should be decoding and it's not | 22:59 |
nathany | so why not subclass and support an optional encoding | 22:59 |
nathany | use the codecs module in an overriden reload | 23:00 |
paroneayea | hm, yeah I can do that | 23:00 |
* paroneayea wonders if he should also send a patch to zope so they DTRT to start with | 23:00 | |
nathany | should take 5 minutes to write + test | 23:00 |
nathany | paroneayea, what would that patch be? | 23:00 |
paroneayea | I don't know :) | 23:00 |
nathany | :) | 23:00 |
paroneayea | okay | 23:01 |
paroneayea | that's a good idea | 23:01 |
paroneayea | I will take this route | 23:01 |
nathany | they're not going to try and guess the encoding; we might be able to add a different messagecatalog that supported decoding | 23:01 |
nathany | fwiw i have commit privileges @ zope | 23:01 |
paroneayea | cool | 23:01 |
paroneayea | thanks! This saves me a lot of sanity | 23:01 |
paroneayea | har har har, pun intended | 23:01 |
nathany | anyway, see if that fixes the problem | 23:01 |
nathany | :) | 23:01 |
paroneayea | nathany: also good news | 23:02 |
paroneayea | after I finish this, and pass the target_lang into a few areas where I was lazy | 23:02 |
paroneayea | we can stage cc.engine! | 23:02 |
nathany | awesome | 23:04 |
JED3 | nathany, sorry my question still remains... | 23:04 |
JED3 | http://api.creativecommons.org/docs/readme_dev.html#license-return-format | 23:05 |
JED3 | why is dc namespaced in the in rdf block of the result xml? | 23:05 |
nathany | JED3, if you pass in a title or author, it gets used in the resulting RDF | 23:06 |
nathany | (as part of the work information) | 23:07 |
JED3 | paroneayea, is there a way to get RDF for a license with a work_dict using cc.license? | 23:19 |
JED3 | basically what cc.license.by_code('by').rdf but with RDF about a work as well | 23:20 |
paroneayea | JED3: RDFa you mean? | 23:23 |
JED3 | no, RDF | 23:23 |
paroneayea | not afaik | 23:24 |
JED3 | ahh okay, see the <rdf> block here: http://api.creativecommons.org/docs/readme_dev.html#license-return-format | 23:24 |
paroneayea | only think that I've worked in that had work_dict/work_info shenanigans is the formatter | 23:24 |
paroneayea | html formatter | 23:24 |
paroneayea | yeah I don't know what the correct route for that is :) | 23:24 |
paroneayea | also if you did it, you would have to create two separate setups for cc0 and everything else, right? Because CC0 takes different values in for the work_dict, at least in the case of the htmlformatter | 23:25 |
JED3 | paroneayea, yeah, nathany just let me know that I don't have to worry about it because its being dprecated | 23:29 |
JED3 | less work for me, score! | 23:29 |
*** nathany has quit IRC | 23:30 | |
*** wormsxulla has quit IRC | 23:46 |
Generated by irclog2html.py 2.6 by Marius Gedminas - find it at mg.pov.lt!