Archive for the ‘Planet Gnomefr’ Category

git commit / darcs record

Saturday, November 3rd, 2007

I’ve been working wit git lately but I have also missed the darcs user interface. I honestly think the darcs user interface is the best I’ve ever seen, it’s such a joy to record/push/pull (when darcs doesn’t eat your cpu) 🙂

I looked at git add --interactive because it had hunk-based commit, a pre-requisite for darcs record-style commit, but it has a terrible user interface, so i just copied the concept: running a git diff, filtering hunks, and then outputing the filtered diff through git apply --cached.

It supports binary diffs, file additions and removal. It also asks for new files to be added even if this is not exactly how darcs behave but I always forget to add new files, so I added it. It will probably break on some extreme corner cases I haven’t been confronted to, but I gladly accept any patches 🙂

Here’s a sample session of git-darcs-record script:

$ git-darcs-record
Add file:  newfile.txt
Shall I add this file? (1/1) [Ynda] : y

Binary file changed: document.pdf

Shall I record this change? (1/7) [Ynda] : y

foobar.txt
@@ -1,3 +1,5 @@
 line1
 line2
+line3
 line4
+line5

Shall I record this change? (2/7) [Ynda] : y

git-darcs-record
@@ -1,17 +1,5 @@
 #!/usr/bin/env python

-# git-darcs-record, emulate "darcs record" interface on top of a git repository
-#
-# Usage:
-# git-darcs-record first asks for any new file (previously
-#    untracked) to be added to the index.
-# git-darcs-record then asks for each hunk to be recorded in
-#    the next commit. File deletion and binary blobs are supported
-# git-darcs-record finally asks for a small commit message and
-#    executes the 'git commit' command with the newly created
-#    changeset in the index
-
-
 # Copyright (C) 2007 Raphaël Slinckx
 #
 # This program is free software; you can redistribute it and/or

Shall I record this change? (3/7) [Ynda] : y

git-darcs-record
@@ -28,6 +16,19 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

+# git-darcs-record, emulate "darcs record" interface on top of a git repository
+#
+# Usage:
+# git-darcs-record first asks for any new file (previously
+#    untracked) to be added to the index.
+# git-darcs-record then asks for each hunk to be recorded in
+#    the next commit. File deletion and binary blobs are supported
+# git-darcs-record finally asks for a small commit message and
+#    executes the 'git commit' command with the newly created
+#    changeset in the index
+
+
+
 import re, pprint, sys, os

 BINARY = re.compile("GIT binary patch")

Shall I record this change? (4/7) [Ynda] : n

git-darcs-record
@@ -151,16 +152,6 @@ def read_answer(question, allowed_responses=["Y", "n", "d", "a"]):
        return resp

-def setup_git_dir():
-       global GIT_DIR
-       GIT_DIR = os.getcwd()
-       while not os.path.exists(os.path.join(GIT_DIR, ".git")):
-               GIT_DIR = os.path.dirname(GIT_DIR)
-               if GIT_DIR == "/":
-                       return False
-       os.chdir(GIT_DIR)
-       return True
-
 def git_get_untracked_files():

Shall I record this change? (5/7) [Ynda] : y

# On branch master
# Changes to be committed:
#   (use "git reset HEAD file..." to unstage)
#
#       modified:   document.pdf
#       modified:   foobar.txt
#       modified:   git-darcs-record
#       new file:   newfile.txt
#
# Changed but not updated:
#   (use "git add file file..." to update what will be committed)
#
#       modified:   git-darcs-record
#
What is the patch name? Some cute patch name
Created commit a08f34e: Some cute patch name
 4 files changed, 3 insertions(+), 29 deletions(-)
 create mode 100644 newfile.txt

Get the script here: git-darcs-record script and put in somewhere in your $PATH. Any comments or improvements is welcome !

Graduation

Monday, July 2nd, 2007

As of friday, I shall be referred to as “Ir. Raphael Slinckx” 🙂

The 2007 promotion (I’m the guy with the red jacket). Note the geeks. Especially our teacher that looks like Clint Eastwood ready to shoot someone.

Antoine and me with the AILv price. We ended in 4th position for the best mémoire that can lead to a business.

Election Day

Sunday, June 10th, 2007

Today was election day in Belgium!E-voting

It turns out that my area uses the electronic voting, unfortunately

I can only hope that WYSIWYV !

Google Summer Of Code

Saturday, April 21st, 2007

Summer of Code

I’m mentoring two students this year for the google summer of code:

Daniel Siegel

Daniel is going to implement some kind of photobooth application for GNOME. There has been some buzz around the idea lately. I believe that the idea if done well could really be a mini-killer-application. There is also some integration work to be done. Two ideas were discussed in the proposal: gnome-about-me could popup the photobooth widget to take a picture of you. Same for any IM client to setup an avatar. This is just how Mac Osx does the job. Another idea would be flickr/youtube integration, the ability to directly post a photo/video to those websites from the application. More ideas discussed in the google soc proposal.

Sebastian Pölsterl

Sebastian has been contributing to deskbar already. He is also the creator of the NewStuffManager started in deskbar now growing as a standalone project gaining more and more traction. Now his task for this summer is a difficult one. Deskbar has grown organically the last year to a point where it becomes difficult to add any feature or correct the long standing bugs because of architectural problems. The issues are well known and have been discussed on IRC or the live.gnome.org wiki page. The refactoring work should land in 2.20 so we can start on a fresh basis. Ideas that are discussed include the ability to embed the deskbar entry widget in other applications like gimmie, or allow to query deskbar via dbus without using the UI. Startup times and memory usage are also priorities.

Photobooth

I promised to release the code for my photobooth-like application, which Daniel is going to use as inspiration as well. There you are:

I do not plan to maintain this piece of code, since other people will make it evolve better than me !

Let’s take pictures!

Monday, March 12th, 2007

This wednesday our local louvain-la-neuve LUG (louvain-li-nux) will participate to a student fair showcasing all activity groups present in the university. We had the idea of creating a photo booth stand where people can stop by take a picture by pressing a button and then send that picture on a dynamic website or on a big projector live. All this using free software of course. It’s a good way to engage conversation with people!

I searched the internet for something existing but unfortunately couldn’t find anything except this little snippet of code for the Nokia 880 device. I took the code, embraced and extended it resulting in:

ScreenshotPhotobooth Screenshot

Basically it uses gstreamer to grab frames from the webcam then it feeds a double pipeline, one displaying the image on screen on the gtk widget, and the other allowing to take a buffer when the user clicks the button and encode it to whatever image format is needed.

There is of course the little countdown from 3 to ‘Smile’ when clicking the button, and i plan to add the white screen thingy when the shot is made.. I think apple can sue me right away

The code will be released next week after the application has been proved in the field to be stable enough 🙂

My Christmas present: Gossip Audio/Video

Sunday, December 24th, 2006

Gossip has now video/audio capabilities !

Coming soon in your favorite distribution. Notes:

  • In reality I’m handsome, the weird face is due to the camera’s angle
  • The black square is actually the video preview frame where you see yourself (but it can’t be screenshotted)
  • The meters aren’t working yet
  • If no video is possible, then only the button+status and the meters are shown in the window
  • All this is powered by Telepathy and the telepathy branch of Gossip
  • I’m not alone on this stuff, many thanks to Xavier Claessens and Eitan Isaacson for maintaining the telepathy branch!
  • This stuff is experimental, blabla, and also it’s not a final design, it’s open for discussion, etc
  • Come and help/discuss on #telepathy on Freenode or #gossip on Gimpnet

You can get the code using darcs get http://www.gnome.org/~rslinckx/darcs/gossip-telepathy-voip

Merry Christmas and Hapy New Year !

Scandinavia ♥ Tux

Friday, December 15th, 2006
Scandinavia ♥ Tux

Tivoli, Copenhagen

Internet pour tous !

Tuesday, May 23rd, 2006
Internet pour tous

Je viens de recevoir un courrier de notre gouvernement fédéral, faisant la promotion de “L’internet pour tous”.

Moyennant une somme de 850€ maximum, le peuple peut acheter un “pack” comprenant un ordinateur, un abonnement adsl pour an, des logiciels, un lecteur de carte d’identité électronique ainsi qu’une formation de base. De plus, 21% de cette somme est déductible fiscalement, soit une réduction d’environ 170€. J’applaudis !

Mais quelque chose me chipote, je ne vois aucune offre linux parmi les packs proposés, quid ?

Peut-être est-ce le règlement de l’opération qui prévoit que le pack doive contenir au moins un logiciel anti-spam, un logiciel anti-spyware, un logiciel anti-virus et un firewall personnel. Depuis quand avons nous des spywares sous linux (je pense pouvoir affirmer qu’il n’existe même aucun programme anti-spyware) ?

Et voila notre penguin favori disqualifié de la course..

Pensez-y:

Voiture Volante

Peut-être cette voiture est-elle illégale, car elle ne dispose pas d’une roue de secours ?

Epiphany is hype, get over it

Wednesday, March 15th, 2006

Ploum writes about epiphany 2.14, and explain why it’s the best browser for gnome.

To make it short, here is a summary of the killer features in epiphany 2.14

  • Easy RSS subscription, integration with gnome programs (liferea, blam, straw)
  • “Tagged” Bookmarks management (very Web 2.0)
  • Adblock extension working out of the box
  • HIG and gnome integration everywhere
  • Simple and easy to understand preferences
  • Light and responsive
  • Very few popups, unobtrusive error pages are used instead

…but he missed the deskbar integration, which i will fix now:

  • Deskbar will index and allow to search through bookmarks
  • Deskbar will index and allow to search through your browsing history
  • Deskbar will allow you to quickly search using epiphany smart bookmarks
Epiphany smart bookmarks
This is my epiphany toolbar, i have three smart bookmarks, one to search for gnome bug number, another one to search stock quotes by ticker symbol, and the last one is google.be search
Epiphany url bar
This is the epiphany dropdown when i stype somehting in epiphany URL bar, allowing me to use one of my smart bookmark with the query. Here i’m searching for a random bug number
Deskbar uses epiphany smart bookmarks
And finally, i can use deskbar, even if the browser isn’t running, a keyboard shortcut away, to use my smart bookmarks. Here i’m going to search for yahoo quotes for GOOG symbol. Also note how i have history pages, and bookmarks appearing too, allowing me to quickly open them.

There is also a way to associate a keyboard shortcut to search engines, and/or a ‘keyword’ in deskbar preferences:

Deskbar has shortcuts/keywords
In deskbar preferences, when you select ‘Web searches’, you can click the ‘More…’ button to get more smart bookmarks preferences.

As you can see, i have the ‘g’ letter for google, which means i can type in deskbar g test to search in google the term ‘test’.

Even better, i can directly use the shortcut to open the term in google without even selecting it in the list: I type ‘test’, then hit Alt-g, and it fires up a google search (this of course only works when you have a one-letter keyword)

This is also a feature we want to extend for every possible action in future versions of deskbar.

Now, use epiphany, and be happy !

One last thing…

And finally a quick tip: if you want to open a command-line program and see it’s output, type it’s name and instead of selecting it in the list, hit Alt-t, it will start the program and redirect it’s output in a text window using zenity, useful for example to see if the command executes successfully.

Deskbar open in terminal
After launching a sitecopy command with alt-t, i receive the output of the command in a nice window, useful for quick commands like that.

Deskbar 2.14

Tuesday, March 14th, 2006

There it is, we finally released the final 2.14 version of deskbar for the general audience !

Nigel made an excellent comment and a screencast (flash) (mirror) showcasing some current deskbar capabilities.

I’m glad to see that the gnome community is loving it, and using it !

THANKS !