Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar

Automatically Upgrade Your Wordpress

Today I upgraded my Wordpress from 2.2.1 to 2.2.2. They didn't change many things, it was only a security update. So, being not a major update, it is possible to copy the new wordpress files overwriting the old files from your installation, without being necessary to update your database. This worked well, but here I want to point the other method to update your wordpress blog, using a plugin that will upgrade your blog automatically to the latest version. The plugin can be downloaded here and the detailed instructions to using it are here.

The steps which the plugin does;

1. Backs up the files and database and makes them available for download.
2. Downloads the latest files from http://wordpress.org/latest.zip and unpack it.
3. Puts the site in maintenance mode, deactivates all active plugins and will enable them at the end.
4. Upgrades wordpress files and give you the possibility to upgrade the database.
5. Re-activates the plugins.

If you don't want to see/use the intermediate steps let the plugin to be run in an automated mode, and you don't have to carry about, you will see only the final page and you are invited to check your blog.

That's all .

Minor problems in my case:

1. the plugin had no rights to write in wordpress install directory, so I had to fix this first, and rerun the update

2. all plugins were activated but only the sidebar plugin was not activated at the end, so, it was necessary to activate it manually

the avatar of Flavio Castelli

Strigi gains full Xesam queries support

As I said in this previous post, Strigi’s Xesam support was half-done since XesamUserSearchLanguage wasn’t yet handled. Well, this is no longer true… ;) In these weeks I’ve been working on XesamUserSearchLanguage support. Ehm… to be honest, I’ve been fighting with Bison.

But in the end I tamed the beast and now Xesam support in Strigi is full.

IMHO XesamUserSearchLanguage can be considered more important than XesamQueryLanguage since common users will write queries in this way.

As reported on the project page: {% blockquote %} It is [XesamUserSearchLanguage] designed as an extended synthesis of Apple’s spotlight and Google’s search languages. {% endblockquote %}

These are some possible queries (examples taken from freedesktop site):

  • _type:music hendrix_ will return all music items related to hendrix
  • _type:image size>=1mb tag:flower africa_ will return all pictures displaying a flower greater than 1 Mb and related with africa

Technical aspects

The Xesam’s UserSearchLanguage query –> Strigi::Query object conversion is made using a hand-written scanner and a C++ parser created by Bison.

You don’t have to worry if you don’t have Bison installed on your system since all parser generated code is already put into svn. In these days, as soon as I’ll have some spare time (when?!), I’ll write another post about open-source scanner and parser generators.

By now I would like to thank Andreas Pakulat (developer of KDevelop) for his help with parser generators.

a silhouette of a person's head and shoulders, used as a default avatar

a silhouette of a person's head and shoulders, used as a default avatar

I like emacs.

Here's some emacs lisp I whipped up yesterday. It helps out when running quilt against new .spec files on old systems. It's a bit crude, but so far it's proven quite the little timesaver -- it's certainly already repaid the 10 minutes I put into writing it.



;; Temporarily comment out %gconf_schemas_prereq, %lang_package,
;; %files lang, etc.
;; Useful when using quilt setup. Don't forget to save. You can
;; undo this with M-x ab-undumb-down-spec.
(require 'cl)
(setf replacements '(("^%gconf_schemas_prereq"
"# GCONF_SCHEMAS_PREREQ"
"%gconf_schemas_prereq")
("^%lang_package"
"# LANG_PACKAGE"
"%lang_package")
("^%files lang"
"# FILES LANG" "%files lang")
("^gnome-patch-translation-prepare"
"# GNOME-PATCH-TRANSLATION-PREPARE"
"gnome-patch-translation-prepare")
("^gnome-patch-translation-update"
"# GNOME-PATCH-TRANSLATION-UPDATE"
"gnome-patch-translation-update")))

(defun ab-dumb-down-spec ()
(interactive)
(let ((old-pnt (point-marker)))
(progn (mapcar (lambda (arg)
(progn (beginning-of-buffer)
(replace-regexp (first arg) (second arg))))
replacements)
(goto-char old-pnt))))

(defun ab-undumb-down-spec ()
(interactive)
(let ((old-pnt (point-marker)))
(progn (mapcar (lambda (arg)
(progn (beginning-of-buffer)
(replace-string (second arg) (third arg))))
replacements)
(goto-char old-pnt))))



Adding new pieces of text to replace and unreplace is easy: add a list containing a regular expression matching the text to destroy, a(n ideally) unique temporary replacement, and the original text to replacements. I use a regexp in the cars in case there's the same text elsewhere, which I wouldn't want to change.

Now I visit a .spec file, run M-x ab-dumb-down-spec, do quilt setup whatever.spec and other quilty things, and then revisit the .spec and do M-x ab-undumb-down-spec prior to doing actual builds.

(By the way, the meat of this post was created by setting a region around this chunk of lisp and running M-x htmlize, although it looks like blogger is eating the colors.)

a silhouette of a person's head and shoulders, used as a default avatar

Graph creating libraries for PHP

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. It is a very nice, used and easy to learn web programming language. I decided to play arround a bit with it and for this I needed a graph library to create dynamic scientific, business and stock-market charts. So, trying to find something I stopped on these two: PHPlot and JpGraph which are fine for my needs. You also can find useful to look for a nice Tutorial for Component Graph. I finish by tell you “happy programming and nice plots with PHP”.

a silhouette of a person's head and shoulders, used as a default avatar

a silhouette of a person's head and shoulders, used as a default avatar

back home

I arrived uneventfully in Mexico City last night. Was good to see my wife and cats again. Alma bought a bunch of plants during my absence. They make the apartment feel a little nicer somehow.

I got stuck in an extra small seat from CDG to MEX -- there was a big metal box under the seat in front of me bolted to the floor and occupying about 1/3 of the "legroom". At 193cm tall, I find all seats cramped, but this was ridiculous. Ridiculously uncomfortable, that is.

Being back at home is like stepping into a pair of old, comfortable shoes.

a silhouette of a person's head and shoulders, used as a default avatar

in Germany

I'm in Germany. I haven't been having a great time, though. I felt really sick a day after I arrived, and although I've been feeling steadily better since, my recovery has been quite slow. At least I'm able to eat and enjoy food (assuming it's edible and enjoyable, of course, which most of it is) again, although I get full quickly and stay full for a long time.

Seeing people whom I mostly know as email addresses and IRC nicks has been productive and nice, of course. That's the real value in this sort of trip.

a silhouette of a person's head and shoulders, used as a default avatar

Status of my

Status of my Suggested enhancements for OpenDocument V1.2:


Hi Thomas,

thanks for the question. Here is the status:



























Tables:
* introduce allowCollapse attribute for paragraphs following nested tables to encode WW and HTML-like tables. Not put up for discussion.
* declare sub tables as deprecated Under discussion in the Accessibility SC.
Numbering
* introduce text:level-text attribute to encode arbitrary number formats Rejected.
* introduce text:num-follow-char to encode WW-like numbering Partly accepted.
* introduce text:list-override to encode WW-like numbering Strongly rejected.
* declare style:list-level-properties/@text:space-before as deprecated. Effect can be achieved with paragraph indent. Rejected.
Master-page styles
* add header-first and footer-first to encode WW-like page-styles Not put up for discussion
* modify master-page styles such that WW-like sections can be encoded; current CSS3.0 like text:sections are not applicable Not put up for discussion
* declare the style:next-style-name attribute of master-page declarations as deprecated. Not put up for discussion
Styles:
* allow deriving paragraph-family styles from text-family styles. Not put up for discussion
"Break chars"
* introduce a command and a command similar to the command Not put up for discussion
Fields:
* enhance field support by introducing a <text:field-start/> and a <text:field-end/> element to which metadata can be attached. Rejected
Change tracking:
* introduce change tracking for tables Not put up for discussion
* introduce change tracking on property level Not put up for discussion
Discourage the use of the following OD features for MOOX interop:
* nested frames Not put up for discussion / Internally communicated as rejected.
* current CSS3.0 like text:sections Not put up for discussion / Internally communicated as rejected.
* use fo:break-before instead of fo:break-after Not put up for discussion / Internally communicated as rejected.
* use fo:margin-* for tables Not put up for discussion / Internally communicated as rejected.

In general I must confess the OpenDocument TC didn't picked up my discsussion topics... (It's listed as suggested but never has been put for discussion into the agenda). Additionally I had a lot of private communiation where my ideas where communicated as unwanted/rejected.

To get an idea of whats discussed for ODF1.2 take a look at:

  1. Proposals under discussion

  2. Proposals for consideration for a vote in the next coordination call

  3. Approved Proposals

  4. Proposal integrated into the specification document

a silhouette of a person's head and shoulders, used as a default avatar

Look who's sponsoring Ruby

Last weekend saw the Ruby Hoedown conference at RedHats Raleigh Headquarter, listing Microsoft as a sponsor. Interesting.

For those of you wondering Why Ruby ?, look at the conference website.
The Ruby language is growing exponentially, partially because it offers more flexibility than other more common languages.
Now add Suns support for Ruby last year, the famous Ruby on Rails web development framework and broad platform support, this language is still HOT.