Monday, May 18, 2009

mi coche - reloaded

ok its true i just returned from trip, but its time to plan another ... why so soon? well i dont know where i'm going (i have few destinations on my head) by i know how i want to travel.

since last year's trip my dear "dyane" is resting. now is time to prepare it for next memorable trip. this time i'll try to take it even further. last year "we" made 5900km, this year i'll try to reach 10000km or more.

i started engine yesterday and after some few tweeks it was running perfect. except the the noisy engine. i guess that the sound of that "little" hole in exhaust system, but i already bought the replacement part. next thing to fix is clutch, which was damaged on last trip. then also replacement of bottom metal, because some serious holes apeared.

and to be a little more fun, all this i need to do this week since my registration expires on monday. plus all the work i have ... well its all aboout having fun right :P

yeeeey let the week begin ...

Sunday, May 17, 2009

back

long time since i wrote on my blog. well when you are living life of a nomad this is how it is :P after long time i'm again sitting in one of those ljubljanas bars where you feel like in your living room. ini my hand its my favorite newspaper/magazine (or call it whatever) "kralji ulice" (kings of the street). i came accross this poem which ... well ... mmm ... is just nice and fits my day today.

- nedeljsko jutro - by bosco
ko v jutranji zarji uzrl bi njene oči,
ko dan bi prinesel tebe,
ko sen bi bil izpolnjen,
ko ihta ljubezni, telesa in polti
bi izpolnjena bila.
umrl bi zate, ljubezen,
ves neučakan pogresam tvoje oči,
ogledalo moje duše.

thx bosco ... google translation in english

well its time to move on with the day - coddie arrived - its freaking great sunny day again. another day to win ahead of me...

Monday, March 9, 2009

in relationship of 2 persons that think similar, one is too much, so i left

yeeeey running again. knees are that better that i can walk and run :P i just found that golovec is so much better to run then roznik that i must promote it here.

and whats new. well last weekend i did some "horrible" things. i opened tweeter, facebook account. i started writing sms's again, i rent a book to read it, ... well you might find this things normal, but are not for me. this all goes in the basket of procrastrination (however it needs to be spelled). why i did this you would ask? i lost all my goals and wishes. nothing interests me. so i start doing things i hate. to appreciate how i lived before and old goals or to found some new ondes. so from now on procrastrination is on my daily agenda.

today i have 2 saying for you all, which i found them on old friend info page:
- Jej in pij in kavsaj, za večnost se ne ravsaj! (eat, drink and fuck, for eternity dont bother) Dr. F. Prešeren
- Če v timu dveh oseb oba mislita enako, je eden odveč. (in relationship of 2 persons that think similar, one is too much) Janez Škrabec

i can relate to both of them. so now i officialy screem "i wanna liveeeeee" :) hehe

p.s. soup the other day was not good because of tomatoes. well lets see how neighbour would say when i do it next time. well next day i realise i still have "a touch", since i (and me sis) coocked mussels, in 3 souses, cant tell how good it was since it was toooo fabulous.

Saturday, March 7, 2009

how to use git with collective (svn)

probably you are wondering why the hack would i use git when dealing with collective (svn). there are lot of reasons. i'll try to explain my working procces and feel free to comment it and even suggest better/different way.

for start you need git. its important that is version 1.6.1 (or above) since new cool options just found place in this release.

1. pulling project out of collective

git svn clone https://svn.plone.org/svn/collective/Products.TinyMCE --trunk=trunk --tags=tags --branches=branches --revision=75010:HEAD


options (see "git svn clone --help" for more):
--trunk: used to define where trunk folder lives
--tags: used to define where tags folder lives
--branches: used to define where branches folder lives
--revision: range of history with revisions that you want to pull

75010 is revision when Products.TinyMCE was first introduced in collective. and because collective is pretty large repository and we dont want to overload it, i really advice you to specifiy --revision. this will also make cloning go faster.

after you are done git created Products.TinyMCE folder with trunk content inside it.

2. commiting to collective and updating from it
now that we have our working git clone we start working and soon and as we work we can commit changes, but this changes wont show up in the collective repo just yet. you could say you have local repo. so commiting works the same way we would normaly do with

cd Products.TinyMCE
echo "# useless code" >> setup.py # we do some changes
git commit # commit localy
... # we work some more
git svn dcommit # finaly we push to collective

... # now new changes are avail. in collective for us to pick them

git svn rebase
# works like svn update



3. taging for release
normaly before release you also tag certain revision to some tag.

git svn dcommit # make sure all is commited to collective
git svn tag # tag it


4. stashing ...
(your boss will like it)
its a calm monday morning and you just started to work on new feature on project you are working. last weekend deployment was a success. next minute your boss brakes the door because there is some very important bug you need to fix (normaly is not that important, since nobody dies because of my code, but anyway some takes life more serious then me). you have some not commited code laying around and you would quickly need to return to commited version. with git its easy...

git stash # now your uncommited changes are stashed
... # work on that important bug and make your boss happy, commit it, deploy, etc...
git stash apply # and you are back to calm monday morning


5. working with branches
all your branches and tags are pulled into git. lets look them:

git branch -r # list all remote branches
1.1
1.2
stripped
tags/1.0
tags/1.0rc1
tags/1.0rc2
trunk
git branch # list all local branches
* master
git checkout -b fix-strange-1.2-bug 1.2 # we create local branch for fixing strange bug that apeared in 1.2 branch
git branch # * is marking current active branch
*
fix-strange-1.2-bug
master
git checkout master # we switch back to master branch
git svn fetch # fetches the updates with out modifying the local working files (which git svn rebase would)

convinced?

there is one drawback when using git with svn. this is external repositories, but more about this next time.

Friday, March 6, 2009

dreamsoup

tried to cook today. sky gave me some sun so i started with little smile. i cooked for few h then i realized i'm not even hungry. actually soup was supposed to be the best of soups i can make (tomato soup with "custom made" ravioly filled with cheese&ham), but for some reason something was missing. dont know what, just feeling was not right. it tasted ok, look was also as it supost to be, but sometimes you can smell the magic when "best" soup is served. neighbour liked the soup so i packed and gave it to her.

feels like i fail at anything i put my hands on this week or better last few weeks. somehow this lack of energy i have turns everything to worse. i miss days when i was jumping just because of some stupid little thing. normaly sun gets me in good mood, and even brings up the efficiency at work, but dont know whats with the sun today. actually is not sun, its me, and i know the reason, i just dont want to tell out loud. it would freak ppl. it freaks even me, when i'm laying on sofa and waiting time to pass by.

i want old dreams back. well dont care about old dreams, i just need something to dream about so i can then follow it. being dreamless sucks. anyway i have moments when i put smile on, but they end when the dance is over. so its there (in me) the joy for life i'm looking for. just need to bring it out more often, how? who knows...

todays quote: "I like traveling more then reaching final destination" (Ljubljana's King O'Tone 1st)

Wednesday, March 4, 2009

want it to rain

ljubljana today is ... well sad. it looks whole day that its going to drop huge storm on us but nothing, almost nothing happens. just few drops of rain. you could feel the sky trying to tell you something. well probably screem at you. its like walking with eyes coverd with tears but somehow you are not able to cry, only drop now and then drops down, but with your eyes you are screeming to everybody.

again i did my - now almost by habit - walk thru ljubljana center. i even left my self phone at home. nothing to distrub me. visit few cafes, read news papers, help with few cents some homeless friends and headed home.

strange is that when doing this, i'm not feeling anything. its a habit that i'm used to do. its like being paralized. probably with time i'll get "feeling for life" back, i must or else i'm robbed of things you leave for, "feelings". but story to write another time. some homeless old man responded me today: "thanks for money and kind words, i'll take the money, but you keep the kind words, i see you need them more then i do".

and in all this mess how to have be happy? how to have it all? this was keeping me busy all my walk today. and funny answer is very simple - as are all things in life. maybe to but it in some smart words "those who want to be happy, are already the happiest persons" and yes its that simple. i didnt say easy, just simple. lets call the sun over ljubljana for tomorrow.

Monday, March 2, 2009

feel like homeless

in beggining i opened this blog to be "blog for *all* my non-sense", although i wrote only about tech stuff. i guess my life was that good (so good lie) that i didnt feel urge to write about other stuff.

after last week of more or less beeing home, beacuse of my bad knees, this week started good. i finnaly managed to get down the stairs almost without the pain (well at least i didnt have to use my hands). today it was sunny in ljubljana so perfect day to work around the center. i went from bar to bar meeting friends, working a bit (where there was internet in bars) and this was it. nothing special. after long time i bought my favorite magazine "Kralji ulice" ("Kings of the street"). you can only buy it on the streets of ljubljana. in addition of this blog i'll translate some of articles and add my thinking along the lines.

since i recently made some serious changes in my life, i'm at "ground 0" - starting point. i almost need to start my life again and rebuild it from scratch. but hey nobody said life will always go up, there are downs too. i never regret nothing in my life, but last year i regret how i lived my life. slowly moving away from myself and becoming someone just to be accaptable for someone. its funny how ppl are always on the side of victim. but for something to happen you need 2 sides, everybody in relationship are partialy responsible. so at the same time as i feel as a victim i'm also the bad guy i guess. just ratio is different.

if you like the day, then you must also accept the night. we dont have to like it, we just need to accept it, its part of the day. but normaly when we accept something we also like it (we are probably not even aware of this). thats where we normaly have problem. if we are ready to throw away all our judgements (for that we dont have to change our values) we would be able accept. accaptance is condition for more quality inner and outer live in place and time we are live in. life is just tos misterious, that we would always had to be the smart guy.

i'm not sure i'm ready to accept, but i try...

Saturday, February 28, 2009

need help: importing wikipedia

few months ago i wrote blueprint for importing wikipedia articles into plone. (reason was this post)
since then i didnt have enough resources (my leptop is not that fast) to import bigger set of articles into plone. i reached 25 000 articles then job was pushing and i need cpu for work. i would really like to see how far plone could go. is it possible to import whole wikipedia into plone? would be nice for promotion of plone... "look you can have wikipedia is that big enough for you sir" :P

well if you have some testing server that has spare cpu power and you are also wondering how far plone could go drop me an email and lets try too push it to the limits.

Tuesday, February 24, 2009

website mockups, giving instructions with images

with websites getting richer and richer in style every day is hard for a developer (themer) to just know what his boss is thinking about. especialy if you are me i guess, i tend to think in a weird ways :P. it would be fantastic if i'll get concrete sketches or screenshots, since one image can replace 1000 (or more) words. but ofcourse making this king of images/sketches/screenoshots is painful since there is no tool that will copy your ideas to paper.

well maybe there is. Pencil (http://www.evolus.vn/Pencil/). small (400k), comes standalone (GTK+) or as firefox plugin. that means if you are running system that you have problems installing freaky software like flash, air, etc... , like i have (ppc/linux) then tool that *just works* with your browser is +100.

how it works?
* Tools -> Pencil sketcking
* you drag 'n drop screenshot of site you are working with
* right click on default page, and select properties, give our current page a name and select size
* and thats how i start sketching ...

Pencil have concept of multiple pages inside one document. which fit nicely since you normaly need to show how to change website (eg. default plone) in steps. and when you create new page you can select one of previouspages as background, which boosts sketching up. now i really feel that telling story with images is fun.

the only thing missing in this tool is to have a button that will screenshot one of my websites in firefox, but i use differenet tool for that (actually is batch script, one of first scripts i wrote in linux)

since Pencil is really too-easy-to-use tool, let it be enough and i'll leave you to try it. if you are using some cool tool that would make sketching even easier, please i'm all ears.

Monday, February 16, 2009

jqueryui datepicker as z3cform widget for plone

last time i released collective.z3cform.datepicker i also stripped js code out of jqueryui. this time i packed jqeuryui code and made it availiable to plone as separate package (collective.jqueryui).

you can find source code on github: http://github.com/garbas/collective.z3cform.datepicker

miohtama generously helped me with developing and actually pushed me to work on it. current state of code is rc, so expect some minor problems, but soon also stable release will be made.

not all options from datepicker are used and there is a lot of room for improvement. for now there are only 2 kinds of widgets: date and datetime widget. simple example would look like:

from collective.z3cform.datepicker.widget import DatePickerFieldWidget
from collective.z3cform.datepicker.widget import DateTimePickerFieldWidget

class ExampleForm(Form):
""" form """
fields = field.Fields(IExampleSchema)
fields['datetime_field'].widgetFactory[interfaces.INPUT_MODE] = \
DateTimePickerFieldWidget
fields['date_field'].widgetFactory[interfaces.INPUT_MODE] = \
DatePickerFieldWidget


code was also pushed to plone.org/products (using collective.dist.. tnx tarek for this usefull tool). but i found plone.org/products a little annoying since i need to wait for confirmation before my package is seen to public. is this the purpose how plone.org/product works or i screw something up.

Saturday, February 14, 2009

sarajevo story ends

i'm back, back to ljubljana ...

i neglected my blog fot the last 2 months, but meanwhile lots of things happen, some good some not that good. well staying in sarajevo was an experience i will remember, anyone that has never been to sarajevo i wormly suggest to visit it. despite recent war, everyday life stuff are back to normal, and reputation that sarajevo had in ex yugoslavia is restored (quote: "sarajevo is just like a little kid that will give you that child-like most honest look. if you hold him it will never let you go.").

in ljubljana finnaly things are shinny again, found a flat in the center (waiting for internet and then i move in), and also we have sun here at last. freelance waters are calm and stable, tnx for all my job providers for bearing with me last "crazy" month. so things are getting to normal again.

now its time to do new plans and throw old ones in the basket. for start i need to get back to my dear dyana (car) and restore it completely. then take it on unfogetable trip. destination is unknown and will probably depend on the job i get over the summer.

i did many releases on the pypi and didnt even bother to blog about it. in next week i'll "sync" it with plone.org and blog about them, looking fw to your comments.

and last for this after-long-time blogpost, if you are a company located at south of spain (or any other part will also be ok) and looking for some help with zope/plone related project give me a mail, since i plan to be there during summer and what could be more fun then to spend it with some great plonistas doing some cool stuff.


... today its salsa time, see you at gospodarsko rastavisce in ljubljana. i wonder if i still rember some moves :P

Thursday, December 4, 2008

8th plone tuneup, doc team joining

i would say plone tuneup is one of the success stories of this year happening in plone community. maybe i see it because with tuneups i started to finnaly contribute back to plone, but i think i'm not the only one.

lately there has been also a lot of movement on plone-documentation mailing list. JoAnna Springsteen wrote in email to plone-doc and plone-users list:


I'd like to take this opportunity to announce that started with the
December 5th Tune Up Day, we will now have documentation tasks
available for people to work on. The Doc team Editors have carefully
chosen several items that would be great for anyone who wants to get
involved with writing docs.
You can see the documentation specific tickets for tune up day here:
http://tinyurl.com/tuneupdocs
If none of these appeal to you, trust me, we have more. If you have an
idea for a document that you'd like to work on and it's not listed in
trac, we'll put it in there and get it tagged for tune up day. I will
be participating in Tune Up Day and available to help you find a doc
task to work on.
This is a great opportunity for newbies that want to start
contributing to the doc team or for anyone that wants a
non-programming task. Our goal is to make this a regular and easy way
to contribute to the doc team.
Hope to see you there!


here is my todo list for tomorrow. i'll be joing at late hours, but i'll put my share there for sure.

 * resolve one/two tickets (i didnt decide which one yet)
 * release sphinxbuilder for sphinx 0.5
 * start documenting one of plone.* package

So plone comunity is working towards better Plone, are you?

Friday, November 21, 2008

plone-coredev with git (recursive svn:external solved)

months ago i migrated my projects to git. i wont go into debate why git, maybe this is for another post, but one of reasons was that it also seemlesly integrates with subversion. so you can use git on svn repos too.

if you are an old svn user and want to give git a try here is a nice tutorial with comparison to svn commands (http://git.or.cz/course/svn.html). there are also other good tutorials on the web, uncle google is the guy to ask.

there were some cool changes in plone-coredev/trunk lately so this is a reason more to give it a try. but ofcourse i'll use git. there are many svn:externals which git-svn does not support but there is a workaround ofcourse. so lets start...

rok@bestia ~/Projects $ git svn clone https://svn.plone.org/svn/plone/buildouts/plone-coredev --trunk=trunk --branches=branches --tags=tags --revision=21212:HEAD
rok@bestia ~/Projects $ cd plone-coredev


this only pulls buidlout from svn, svn:externals are not pulled out. now we use git-externals script which will pull svn:externals.

rok@bestia ~/Projects/plone-coredev $ ./path/to/git-externals
... fetch a coffie/tea/beer this will take time ...
rok@bestia ~/Projects/plone-coredev $ virtualenv-2.4 --no-site-packages ./
rok@bestia ~/Projects/plone-coredev $ source bin/activate
(plone-coredev)rok@bestia ~/Projects/plone-coredev $ python2.4 bootstrap.py
(plone-coredev)rok@bestia ~/Projects/plone-coredev $ buildout -v
(plone-coredev)rok@bestia ~/Projects/plone-coredev $ instance


and you have plone-coredev/trunk running... from first tast ... its fats :)


so what that does that git-externals script do?
its a script i wrote today, probably is buggy as hell but it works for now. it clones svn:externals in place they should be. in every package that has svn:exernals, .svn-externals file is created. reason i created it is because i didnt found any that can handle svn:externals recursivly. so here it is, ... http://github.com/garbas/garbasgit.svnexternals/tree/master/git-externals

if you have any ideas, wishes, suggestions just write on rok-dot-garbas-at-gmail-dot-com.

Wednesday, November 19, 2008

z3c.form in viewlets

i blame hannosch for not to be able to sleep tonight :P (previous post)

my obstacle today/tonight was z3c.form+viewlet coctail. after 2h of testing and optimizing i got quite nice peace of code:



and layout_viewlet.pt



now instead of wrapping with FormWrapper we wrap with our new ViewletFormWrapper, like:
OurViewletView = wrap_form(OurCustomZ3CForm, __wrapper_class=ViewletFormWrapper)

all that is left to do is register OurViewletView with browser:viewlet directive and form is ready.

i found this wrapper really usefull and i hope it can get into plone.z3cform. or is there any other way of doing this?

my plone wish list

i just read hannosh's "News from trunk ..." before going to bed and as a result of this i woke up in the middle of the night (its 2:30am here) to write this blog post. i will just write things that i wish would be in plone4. some of this are unpolished ideas, some of this are just pain that i'm expiriencing.
  • everything is a folder (no folder content type)
    idea is not new, its taken from limi's blog, but everything (except File, Image) content types should be folderish.

  • no Image content type
    well Image is nothing more then extended File content type. what i saw in past was that users were confused that there are so many content types. by having only one content type it make plone even easier and close to file-like-system.

  • small/tiny/micro plonecore code base
    when plannning next release please also consider developers happiness not only end-users. we are ppl too you know :P. what i mean is that 90% time i work with plone i really dont need all those features that are builtin. 90% time i need only 2 content types (Document, File) which i extend, superclass, ... this is again subject to argue about, whether plone is framework or software. why it couldnt be both? having light plone core which developers could use to build on it, and end users ready packages like plonefor.community (curent plone), plonefor.getpaid, plonefor.goverment, plonefor.education, ...

  • link content types, wtf?@#$%
    maybe i should read some more end user doc but i just dont get what with link content types all about. just to store link to some page. i would expet form it to show content inside plone (like Windowz product), redirect to that link or even both options. but ofourse this is something that should not be in plonecore (menitoned above).

  • portlets+viewlets=widgets (or call it as you want)
    again idea is nothing knew. all i would ask from plone4 is that it provides rock solid UI to manipulate with them. draging and droping please.

  • no XML please
    i use genricsetup in day to day basis and writing all that xml is just not fun you know. we use perfect language - python - if you forgot. use it. it can do more then just magic. sonce XML is only computer friendly and if we really must use xml then an UI tool *must* be provided or if not next plone book should be "pistol for developers included - for self puprose only"

  • unified plone registry
    this has nothing to do with windows registry so dont panic. its just some centralized way of storing site configuration that can be also (ab)used by add-on products. now we have a mess. every configuration is stored in its own way and place.
    if i may dare this could also be next-generation of genericsetup (with no usage of XML ofcource).

  • no kss in plonecore, ship only with jquery
    50% of time i disable kss since it slows down the site. yes kss is usefull but not in all scenarios. make developers choose whether they would like to write javascript or use kss.

  • developer reference documentation
    this should be killer feature of plone4. currently there is no - or is really in bad shape - reference developer documentation. Christopher Warner few days ago wrote "If core code is undocumented it's broken". but who should be responsible for this? core developers. when there is new feature added/removed documentation should be alsoo updated. sphinx here offers a great way to document our code. it can be api, doctests, docstrings all in one. and can be done from the code ,so all those doctests, docstrings that are already there will be used.
--- after a while i found some more ---
  • plone theming
    deliverence promises a lot, but still plone itself must provide easier theming expirience. something as easy as old zope2 skins and scalable/reusable as zope3 resources.

  • wsgi out-of-the-box
    this is a must, repoze middleware that is availiable now looks so usefull i'm just wainting for some project to try it out.

well this is it, for now ... i'm exited with plone4 release and now its time for me to go back to bed. i think by the end of this night i'll come up with few more.

Wednesday, November 12, 2008

one week of riding sphinx

i made 3 releases today to pypi:
  • SphinxBuilder
    buildout recipe for sphinx. that way writing/deploying sphinx docs becomes easier. initialy code was written by tarek i brought it from 0.1.2 to 0.2

  • AutoATSchema
    extension for sphinx which documents archetypes schema automaticaly
    example:
    .. collective.sphinx.autoatschema:: my.packages.content.mycontent.MySchema

  • IncludeDoc
    another extension for sphinx which includes doctest from also other packages.
    example usage:
    .. includedoc:: my.package:/relative-to-package/path/README.txt
inititaly i start looking into sphinx to see if also plone can also benifit from this usefull tool. i'm still doing research and will shortly publish my results and my ideas how to use sphinx in plone process.

i must mention that work on SphinxBuilder and AutoATSchema was sponsored by Headnet. thank you Headnet.

where to go from here?
you can see work in progress for possible replacement of api.plone.org. well its only research so currently only tree packages are there: plone.contentrules, Products.Archetypes, Products.ATContentTypes. there are a lot of stuff missing consider it as staring point.
http://docs.garbas.si/plone-latest

why i think sphinx is the right tool for api.plone.org?
  • definitly *not* because sphinx is new hot stuff, but because of its features and because it makes can integrates well in plone proccess
  • very few ppl uses api.plone.org because of its current state. plone was by some extend ment to be framework and frameworks needs good, clear api so new developers can "plug-n-play"
  • we all know that api is not the strongest point of plone. well i could criticise it, but that wont change anything. with sphinx we can hide bad api parts or emphasise good / useful ones.
  • best / up-to-date documentation can only be written by core developers at the time of development (and maybe reviewed by doc team). well maybe not only but is sure the easiest way for all. we all are aware of TDD, there is several very well writen doc(test)s, but hidden from eayes of public.
  • because i think this can be the stongest feature for plone4. yes, having up-to-date documentation can do magic or at least attract more developers.
wanna help?
join us at http://www.openplans.org/projects/plonedevdocs where we brainstorm about possible options.

Thursday, October 30, 2008

strange "decoder jpeg not available"

well its obious what is wrong. pil was not compiled with jpeg support.

i'm currently setting up plone buildout on some centos box (for gentooista - like me - this is like having only one hand to type). i created virtual environment with --no-site-packages as usual. that means i need to install pil manualy.

?> wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz
?> tar zxvf Imaging-1.1.6.tar.gz
?> cd Imaging-1.1.6
?> python setup.py install

the i've looked at build summary
--------------------------------------------------------------------
PIL 1.1.6 BUILD SUMMARY
--------------------------------------------------------------------
version 1.1.6
platform linux2 2.4.3 (#1, May 24 2008, 13:57:05)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)]
--------------------------------------------------------------------
*** TKINTER support not available
*** JPEG support not available
*** ZLIB (PNG/ZIP) support not available
*** FREETYPE2 support not available
--------------------------------------------------------------------


well next steps were obvious. i need to install libjpeg, zlib and freetype2, and then reinstall pil.

?> yum install libjpeg-devel zlib-devel freetype-devel
?> python setup.py install

and build summary is now
--------------------------------------------------------------------
PIL 1.1.6 BUILD SUMMARY
--------------------------------------------------------------------
version 1.1.6
platform linux2 2.4.3 (#1, May 24 2008, 13:57:05)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
--------------------------------------------------------------------


so i installed it right? WRONG!! if you test you plone instance you'll see that you can not upload image. even deleting pil from site-packages and reistalling didnt helped. problem is that you need to have fresh unpacked (untouched) version of pil when you install it.

?> cd ..
?> rm Imaging-1.1.6/* -R && rmdir Imaging-1.1.6
?> tar zxvf Imaging-1.1.6.tar.gz
?> cd Imaging-1.1.6
?> python setup.py install


i think i saw some guy/girl asking ppl on #plone why there is no pil support even if build summary shows that there is. well i think this was the case or at least this save my day.

Tuesday, October 21, 2008

my favorite buildout recipes

i'd like to share my experience with recipes. which one i use and which i found very exciting. and for the end which recipe i miss.
  1. zerokspot.gitrecipe
    since git is dvcs of my choice this recipe provides nice integration with git, when my code is not published yet.
  2. collective.buildbot
    i must admit that i didnt have chance to setup it up and give it a test. i heard ppl are really satisfied with it. well why shouldn't they be, setting up buildbot is super-easy now. i'm just searching time to setup buildbot to monitor my published projects.
  3. collective.recipe.backup
    use it constantly really useful recipe for your production. i would say this is a must in your production configuration.
  4. collective.recipe.sphinxbuilder
    great recipe for building your plone documentation with sphinx. it has some problems with recent 0.4.3, but i prepared some patch for it (need to tell tarek about it), should be included in next release.
  5. collective.recipe.supervisor
    i didn't use this recipe, but could become next thing to ship my deployment configuration with. i use simple (bellow) zc.recipe.egg:scripts recipe to ship with supervisord. then i have configuration files for supervisord separated from the buildout configuration, which is not so nice. for my next deployment i'll definitely look into this.
    [supervisor]
    recipe = zc.recipe.egg:scripts
    egg = supervisor
  6. gocept.nginx
    since i use nginx in 99% of my cases i like to ship also the configuration code for it within the buildout.
  7. iw.recipe.sendmail
    just found out about this one. i always add sendmail configuration code inside project i use which is then hard to switch to developing environment. well from tomorrow on i'll be using this. this is useful when you want to deploy Singing&Dancing with plone.
  8. plone.recipe.deliverance
    i'm really sorry not to have time to test this nice recipes. deliverence is "next plone generation themeing engine". i read all the docs/tutorials/reviews i could found about deliverence. i hope there will be some project in future that i could try it. maybe this recipe will make me try it since configuration is really easy.
  9. plone.recipe.varnish (plone.recipe.squid)
    i use varnish, but heard really nice words from ppl using squid. configuration of this to recipes is not similar, but is *identical*, so i might give squid a try just from my own curiosity . but before that i would need to learn some more about catching in plone. this is the area i lack knowledge most.
i also found more recipes which i didn't have time to look closer into. i'll just list them for me to test them later. if you used some of this please share your experience.
well i spoke till now only about what recipes we already have. but there is one recipe i would really like to see.

since i'd like to provide client with up-to-date, bug less as possible code in short time and not to wait for next releases of packages i often patch them. it would be nice to have this kind of tool possible to use from within buildout. maybe this will speed up (or at least make it easier) patch testing in plone core development. that would maybe lead to patches tested not only from one person but from more, maybe this patches are already used in production environment before they reach plone core which is big plus i think. so to sum up: recipe (collective.recipe.patch) that would apply patch to certain python package version. possible to pin this patch to specific version of python package)

maybe tonight is the night to produce this recipe. lets go cooking...

Sunday, October 12, 2008

generate your own z3c.form docs

recently http://www.carduner.net/docs/z3c.form/ was down. for some of us who are using it extensivly that was just like someone pull a hat over my eyes. well since z3c.form ppl are using sphinx to generate this lovely documentation you can also create it on you own.

rok@bestia ~/Projects $ svn co svn://svn.zope.org/repos/main/z3c.form/branches/pcardune-sphinx z3cform-doc
rok@bestia ~/Projects $ cd z3cform-doc/
rok@bestia ~/Projects/z3cform-doc $ virtualenv --no-site-packages ./
rok@bestia ~/Projects/z3cform-doc $ source bin/activate
(z3cform-doc)rok@bestia ~/Projects/z3cform-doc $ python bootstrap.py
(z3cform-doc)rok@bestia ~/Projects/z3cform-doc $ buildout

(z3cform-doc)rok@bestia ~/Projects/z3cform-doc $ docs
(z3cform-doc)rok@bestia ~/Projects/z3cform-doc $ firefox parts/docs/z3c.form/build/index.html

and you have it, simple a? this is the way official plone documentation should be, by my opinion.


problems?
z3c.recipe.sphinxdoc have some dependecy problem so you might have outdated email python package. if your buildout fails just update it with "easy_install email" and rerun buildout.

Thursday, October 9, 2008

optional auto login in plone3

having optional auto login in plone2.5 was easy. well maybe not easy but at least it was documented (it would be nice if somebody with rights would update that documentation with working example for plone3). i recently post on plone-users mailing list regarding this issue and got a tip to look into cookie plugins for PAS.

follow all instructions as desribed here. this mean:
* you will adapt setAuthCookie script
* change login_form and login portlet
* set auth_cookie_length in site_properties

after that go to acl_users and add "Extended Cookie Auth Helper", give it some id/title and choose all functionalities for it.

Challenge (challenge)
Reset Credentials (resetCredentials)
Update Credentials (updateCredentials)
Extraction (extractCredentials)

and that should be it. except in my case this solution is not working, because i use email as username. and that gives error when username is trying - for some unknown reason to me - to decode credentials:
creds['login'] = login.decode('hex')
creds['password'] = password.decode('hex')
when i removed decoding auth started to work as expected. did i found a bug. as i see jens is last commiter for PAS (no commit in last 12months). i'll propose a fix on next plone tuneup or please explain me why this decoding is neccessary and how to address my problem with email as username. until then i'm patching PAS. (hmm is there any patching recipe out there, could come useful)