lekhonee-gnome 0.9.1 is released

Thursday, April 29th, 2010 | Community, FOSS, News | 1 Comment

I am happy to announce the release of lekhonee-gnome 0.9.1 . You can download the source or check for koji builds for F12 or F13. New features are like:

  • Supports multiple Wordpress accounts
  • Tabbed UI for different modes
  • Now supports adding <br> tag using tool button
  • Preview mode (more details on this below)
  • Advertisement message is disabled for this release
  • Stopped segfault(s) in couple of corner cases
  • Supports <video> and <audio> tags in Visual and preview mode (you may have to write the details in HTML mode)
  • Can watch youtube videos in Preview mode (not an actual feature :p )

So the main two new features are multiple account handling and Preview mode. In the preview mode you can see how the post will look like in your blog with the theme you are having. To fetch the blog style please click on the small download style/theme button in the toolbar (this button will only come in the toolbar if you don’t have cached theme downloaded in your system), though you need internet connection for this mode to work.

Tags: , , ,

Problem with arduino in Fedora 12

Wednesday, April 21st, 2010 | problem | No Comments

Binary sketch size: 892 bytes (of a 30720 byte maximum)
/home/kdas/code/arduino/arduino-0018/hardware/tools/avrdude -C/home/kdas/code/arduino/arduino-0018/hardware/tools/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/tmp/build6600949432041572401.tmp/Blink.cpp.hex:i

avrdude: Version 5.10, compiled on Feb 19 2010 at 10:03:26
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is “/home/kdas/code/arduino/arduino-0018/hardware/tools/avrdude.conf”
User configuration file is “/home/kdas/.avrduderc”
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/ttyUSB0
Using Programmer : stk500v1
Overriding Baud Rate : 57600
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

avrdude done. Thank you.

Any clue how to fix this ?


Tags: ,

New release of lekhonee-gnome

Tuesday, April 6th, 2010 | Community, FOSS | 6 Comments

I just released lekhonee-gnome ( desktop client for Wordpress ) v0.9. You can download the source from here or look for the rpm F-12 or F-13

This is a complete rewrite of lekhonee-gnome in Vala. So, it is not anymore a gtk frondend to the previous python based one. 
Around 2 weeks back mether pointed me to Vala and I started porting lekhonee-gnome. The developers from IRC room #vala helped me a lot to learn and understand the basics of this new language and solving issues while I was working on it. Later siddesh , rakesh and paragn helped me to do the autoconf/autotool things fixed.
Changes/Features:
  • By default it will open WYSIWYG editor mode , people can still edit raw HTML by clicking the “Edit HTML” button in the right hand corner.
  • Added option for of extra HTML tags (HTML Tags menu) if one is editing HTML
  • Save/Open blog posts in the local computer in plain xml format , so that you can edit them in any editor
  • the configuration file is now a keyfile
  • In the WYSIWYG editor one can do Spell check by right clicking into  ”Spelling and Grammar” submenu
  • While editing HTML one can use Spell Check box
  • There is a progress bar in the statusbar area which will give visual feedback to the user whenever it will connect to server for any task
  • The “Add Category” button is disabled in this release, will come back in the next release :)

We need more testing and please file bug reports according to that. 

The post is brought to you by lekhonee-gnome v0.9

Tags: , ,

How I can plot a chart like this ?

Tuesday, March 30th, 2010 | Uncategorized | 15 Comments

I want to plot charts like above (using gnuplot/ matplotlib / anything). I have my data in a text file. Can someone please point me to an example ?

The post is brought to you by lekhonee v0.8

Error after yum update

Friday, March 26th, 2010 | Fedora | 2 Comments

After doing a huge yum update on my F12 box, I found

Running DKMS auto installation service for kernel 2.6.32.9-70.fc12.i686.PAE

usb-storage (1.0): Installing module.
…….(bad exit status: 10)
Build failed. Installation skipped.
Failed.

The post is brought to you by lekhonee v0.8

Tags: ,

How to do XMLRPC calls in Vala using libsoup (tutorial)

Monday, March 22nd, 2010 | FOSS, Tutorial | No Comments

This is small tutorial showing how one can do XMLRPC in Vala using libsoup.
We will call a default demo.sayHello method in Wordpress, this will just return a string “Hello!”.

The code:


using Soup;

public void main(string[] args) {
var message = xmlrpc_request_new("http://kushaldas.wordpress.com/xmlrpc.php","demo.sayHello");
var session = new SessionSync();
session.send_message(message);

string data = message.response_body.flatten().data;
Value v = Value(typeof(string));
try {
xmlrpc_parse_method_response(data, -1,v);
}
catch(Error e) {
debug("Error while processing the response");
}
string msg = v.get_string();
debug("Got: %s\n", msg);

}

At the very first line we mention that we are using the libsoup, then using xmlrpc_request_new method we create a message. It requires the URL and method name strings. It also takes optional arguments to the method (which we will see in the next example). Then in the next few lines we are creating a SessionSync object and call the method using send_message method. The response stays in the same message object we created before. We get the response as string in the variable data.

xmlrpc_parse_method_response takes the response as a string in the first argument, next is the length(size) of the response (Note: I used -1 so that it will take the size of data, it comes handy when the response contains unicode chars) and 3rd argument is the Value where it will store the parsed result. string msg = v.get_string() gives us the final result , which we print using debug.

Now to compile the code I gave the following command

$ valac --pkg libsoup-2.4 --thread xmlrpc-test.vala

The output

$ ./xmlrpc-test
** (process:28319): DEBUG: xmlrpc-test.vala:17: Got: Hello!

In the next example we will try to add two numbers using another demo method given by wordpress. The code is given below


using Soup;

public void main(string[] args) {
var message = xmlrpc_request_new("http://kushaldas.wordpress.com/xmlrpc.php","demo.addTwoNumbers",typeof(int),20,typeof(int),30);
var session = new SessionSync();
session.send_message(message);

string data = message.response_body.flatten().data;
Value v = Value(typeof(int));
try {
xmlrpc_parse_method_response(data, -1,v);
}
catch(Error e) {
debug("Error while processing the response");
}
int msg = v.get_int();
debug("Got: %d\n", msg);

}

Here while creating the message, we passed the required arguments to the method demo.addTwoNumbers, it goes as type and value pair, so we wrote typeof(int) and then the integer value.

Compilation and result


[kdas@d80 vala]$ valac --pkg libsoup-2.4 xmlrpc-test2.vala --thread
[kdas@d80 vala]$ ./xmlrpc-test2
** (process:28565): DEBUG: xmlrpc-test2.vala:17: Got: 50

A small tip: If you don’t know the return type , use type_name() to find out.
Thanks to the people in #vala who are continuously helping me to understand more of it.

The post is brought to you by lekhonee v0.8

Tags: , ,

Search

Archives

Categories