Re: Django-AssetPackager
> I welcome patches, since I tried to just directly port the php version > of cssTidy to python there are bound to be bugs. Yeah, probably. The code is admittedly not the easiest thing to read; this is probably largely because the application was written in C++ first then ported to PHP. I'd probably have had an easier time porting the C++ to Python than the PHP as PHP's idiom of 10,000 top-level functions drives me slightly mental. Also worthy of note (on a somewhat related topic) is that CSSTidy has apparently reached the "end of life" as of version 1.3 according to its author, Florian Eckhardt, unless someone else is willing to take up the mantle. > I actually want to go though and redesign it to be more pythonic when > I get the time Moving the method documentation over to Python docstrings would be a great start and relatively painless. Breaking out some of the larger methods to smaller routines would also be helpful to better understand what is happening and introduce more readable/logical code and/or optimisations. I'm also certain the code could be executed faster, although getting everything working takes priority. Eventually it would be pretty awesome if some intrepid C programmer could help us by writing C modules for some of the more intensive routines. The problem with the closing ')' instead of ';' was in a couple of the predefined templates -- I unfortunately forget which ones -- but the element at index 6 contained the ")" instead of the correct ';'. I'll have to set up parallel directories with the subversion source and my working copy so I can make patch files. I confess I'm also relatively new to Google Code and don't know if there is even a defect tracker available or any way to post patches other than to paste them into a message. I haven't done any further investigation into the reduced file size yet; it's entirely possible that it's indicative of a defect in the CSS I was compressing. I will of course continue testing on increasingly complex files to see if I can discover the cause of the problem. Much like for you, this is going to be a complete side-project for me but hopefully there will be other interested parties who can contribute. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django-AssetPackager
On Mon, Feb 25, 2008 at 7:11 AM, isolationism <[EMAIL PROTECTED]> wrote: > That said, I've come across a few bugs -- need to capitalize 'True' on > csstidy.py line 448. Opps, will fix > There is also something more serious afoot, as recompressing a > previously-compressed file results in a size drop from 285KB to 5KB; > property definitions are ended with a close-paren instead of a semi- > colon, etc. that is odd, but I admit I only tested with 3 diff css files and none of the three are overly large or complex (and apparently did not even invoke sections of the parser) > > I will probably spend a little bit of time trying to sort out some of > these bugs. Are you interested in patches, or are you still actively > working on this at the moment and I should hold off? I welcome patches, since I tried to just directly port the php version of cssTidy to python there are bound to be bugs. I actually want to go though and redesign it to be more pythonic when I get the time, but I have two major projects going and this was more a little side project to fill a need I and a few other people had. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django-AssetPackager
Very nice. I have been using csstidy (C++ version) for a few years now to compress a rather large amount of CSS for an enterprise-class product. I have had use to call upon it rather a lot (a full build handles nearly a thousand output documents). Since my css framework compiler is written in Python I'm pretty excited about this project. Thank you for spending the time writing/ porting everything, and making it for Django (my favourite framework for prototyping). That said, I've come across a few bugs -- need to capitalize 'True' on csstidy.py line 448. There is also something more serious afoot, as recompressing a previously-compressed file results in a size drop from 285KB to 5KB; property definitions are ended with a close-paren instead of a semi- colon, etc. I will probably spend a little bit of time trying to sort out some of these bugs. Are you interested in patches, or are you still actively working on this at the moment and I should hold off? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---