Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 10-30-2009, 04:39 PM   #1
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Lightbulb Iliad Toolbox: some tools for your device

EDIT: new version 1.2

Main new features:
- new file browser
- system operations: reboot and power-off
- readme

Screenshots have been updated as well.

Please, read the documentation, as some features have changed a bit. Look at the readme file.



Hello,

I'm pleased to announce the first public version of Iliad Toolbox, v1.1.

Iliad Toolbox is a set of some useful small applications for your Iliad.


Tools:
- File Browser. (not implemented yet).
- System Information. Shows information about: cpu, memory, battery, uptime, load, disks, processes
- Recent Files. It lets you to delete some old entries in Recent Files that may pollute the list.
- Power-off. I need it because the switch-off handle of my old Iliad doesn't work well.

Better take a look at the screenshots to get an idea.


Code:
Iliad Toolbox has been written in Lua language and uses lgob (gtk+ bindings for lua), both compiled and packaged for Iliad by Great Hansel. Display refresh is handled by Hansel's xx, a small program based on Antartica's xepdmgr.
You don't need to install them separately because they are included with the package (and in fact that's the reason it's so big).


Installation:
To install, uncompress, copy on your Iliad and run the installer from the ContentLister.
To upgrade, delete the old version and proceed to install again.
Btw, the install method has been created by Hansel as well.


Using Iliad Toolbox:
You need to use the stylus to click.
The X on top-left is to close each window.


Of course, all feedback, ideas and suggestions are welcome.

Iņigo
Attached Thumbnails
Click image for larger version

Name:	toolbox-ss.png
Views:	856
Size:	75.6 KB
ID:	39779   Click image for larger version

Name:	toolbox-about-ss.png
Views:	759
Size:	58.5 KB
ID:	39780   Click image for larger version

Name:	toolbox-help-ss.png
Views:	756
Size:	84.9 KB
ID:	39781   Click image for larger version

Name:	toolbox-sysinfo-ss1.png
Views:	748
Size:	106.9 KB
ID:	39782   Click image for larger version

Name:	toolbox-sysinfo-ss2.png
Views:	861
Size:	151.8 KB
ID:	39783   Click image for larger version

Name:	toolbox-sysoperations-ss.png
Views:	737
Size:	79.5 KB
ID:	39784   Click image for larger version

Name:	toolbox-recentfiles-ss.png
Views:	687
Size:	51.6 KB
ID:	39785   Click image for larger version

Name:	toolbox-filebrowser-ss1.png
Views:	695
Size:	44.9 KB
ID:	39786   Click image for larger version

Name:	toolbox-filebrowser-ss2.png
Views:	709
Size:	98.8 KB
ID:	39787   Click image for larger version

Name:	toolbox-filebrowser-ss3.png
Views:	690
Size:	85.9 KB
ID:	39788   Click image for larger version

Name:	toolbox-filebrowser-ss4.png
Views:	704
Size:	80.5 KB
ID:	39789  
Attached Files
File Type: gz Toolbox-1.2.tar.gz (783.7 KB, 466 views)

Last edited by Iņigo; 11-22-2009 at 05:05 PM.
Iņigo is offline   Reply With Quote
Old 10-31-2009, 03:13 AM   #2
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
looks professional! And beautiful icons! Will you add a network page?

You may want to grab xx from the latest MiniPad. (Some) earlier versions had a problem when the xserver was not tcp enabled.

A Lua tip: when you need multi-line strings, you can just say

Code:
text = [[
line 1
line 2
line 2]]

Last edited by hansel; 10-31-2009 at 03:35 AM.
hansel is offline   Reply With Quote
Advert
Old 10-31-2009, 04:10 AM   #3
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Iņigo,
since you have a shutdown function, why not add a reboot function?
ericshliao is offline   Reply With Quote
Old 10-31-2009, 04:36 AM   #4
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by ericshliao View Post
Iņigo,
since you have a shutdown function, why not add a reboot function?
I added shutdown because it's useful for me (the switch-off button doesn't work well, I'm read on mobileread that other people has the same issue with old Iliads), but I can't understand the need for a reboot function... would it be useful for you?

My idea is to have only common utilities here; for instance, after thinking about it I've dicarded some posible features like registry explorer or network activation cause they are not generally useful.

Anyway, please provide ideas.

Iņigo
Iņigo is offline   Reply With Quote
Old 10-31-2009, 04:46 AM   #5
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by hansel View Post
looks professional! And beautiful icons!
Icons are from BlackSecret: http://gnome-look.org/content/show.p...content=112261

Quote:
You may want to grab xx from the latest MiniPad. (Some) earlier versions had a problem when the xserver was not tcp enabled.
Ok, thanks for the tip. I'll include in next version, after I have a working file browser, not too far.

Quote:
A Lua tip: when you need multi-line strings, you can just say
Code:
text = [[
line 1
line 2
line 2]]
The problem with this is that it looks ugly for my eyes...

Quote:
Will you add a network page?
Which info should appear? ifconfig output?
some buttons to start / stop networking?


Thanks a lot for the feedback,
Iņigo
Iņigo is offline   Reply With Quote
Advert
Old 10-31-2009, 05:22 AM   #6
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by Iņigo View Post
I added shutdown because it's useful for me (the switch-off button doesn't work well, I'm read on mobileread that other people has the same issue with old Iliads), but I can't understand the need for a reboot function... would it be useful for you?
I don't know if people really need the function. For me, I created several shell scripts, such as reboot, shutdown, enable netword, disable network, and I put them in "Main Memory" so that I can access them easily in Contentlister. I did a lot of experiements on iLiad, and when something went wrong, rebooting without using the power-off button is really convenient for me. But for most people, they don't need reboot as often as I do.

Last edited by ericshliao; 10-31-2009 at 05:41 AM.
ericshliao is offline   Reply With Quote
Old 10-31-2009, 12:12 PM   #7
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by Iņigo View Post
Which info should appear? ifconfig output?
some buttons to start / stop networking?
Exactly, and a button to stop/start sshd...

Another tool could be an graphical interface to ipkg, to instal and upgrade Lua and Lgob

Last edited by hansel; 10-31-2009 at 12:27 PM.
hansel is offline   Reply With Quote
Old 11-01-2009, 02:00 AM   #8
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Iņigo,
I see that there is a line in your code:
evbox:modify_bg(gtk.STATE_NORMAL, gdk.color_parse("black"))

Are you sure "gdk.color_parse("black")" correct? By the ref (http://library.gnome.org/devel/gdk/2...nd-Colors.html), gdk_color_parse() does not return a GdkColor variable.

Gdk and Pango have some structs without a function to create it. For example, GdkColor, PangoMatrix. I can create these structs in C code without a creating-function, but I don't know how to create them in Lua. It is really frustrating.

Last edited by ericshliao; 11-01-2009 at 02:05 AM.
ericshliao is offline   Reply With Quote
Old 11-01-2009, 08:43 AM   #9
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by ericshliao View Post
Iņigo,
I see that there is a line in your code:
evbox:modify_bg(gtk.STATE_NORMAL, gdk.color_parse("black"))

Are you sure "gdk.color_parse("black")" correct? By the ref (http://library.gnome.org/devel/gdk/2...nd-Colors.html), gdk_color_parse() does not return a GdkColor variable.

Gdk and Pango have some structs without a function to create it. For example, GdkColor, PangoMatrix. I can create these structs in C code without a creating-function, but I don't know how to create them in Lua. It is really frustrating.
It works so it has must return a GdkColor

Code:
[inigo@inigo ~]$ lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require("lgob.gdk")
> =gdk.color_parse("black")
Boxed(GdkColor): 0x23ddbb0
In my experience, the Lua API is not exactly the same as the C API, sometimes you should expect the value you want in a var argument you pass to the function to be filled (like in C) but often you get it as the return value.

I think is this second case in gdk.color_parse(), the color is returned:

Code:
Lua:
    color = gdk.color_parse("black")
C:
    GdkColor *col = gdk_colormap_alloc_color();
    gdk_color_parse("black", col);
I spent some hours yesterday fighting with TreeView Iters... (well, and with pixbufs inside a treeview, but that's another story...)

[I needed the iter for a row in a treeview when I click on it]
Code:
local res, iterpath = view:get_path_at_pos(x, y)
local iter = gtk.TreeIter.new()
model:get_iter_from_string(iter, iterpath)
Here I first have to create an "iter", and then "model:get_iter_from_string()" method fills that iter with the value I want. Similar to C API.

But note that in previous "view:get_path_at_pos()" call the path I want is returned as the second value, first one being a true/false boolean saying if method was ok. Completely different from C API.

Coming from pygtk I find Lua API quite confusing, sometimes it's like C API but other times is like Python API. It's not predictive or at least I can't fully understand the logic behind it.

As there is no lgob documentation I often spend hours and hours trying to get the proper API for some functions and methods... read C and python API, look for some examples in google, check different approaches and use prints to check the results...

Anyway, coding in lua/lgob is funny, not so funny as in pygtk but much better than in C

Iņigo
Iņigo is offline   Reply With Quote
Old 11-01-2009, 11:22 AM   #10
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by Iņigo View Post
It works so it has must return a GdkColor.
You are right. I just can't understand why.
ericshliao is offline   Reply With Quote
Old 11-01-2009, 12:09 PM   #11
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by Iņigo View Post
In my experience, the Lua API is not exactly the same as the C API, sometimes you should expect the value you want in a var argument you pass to the function to be filled (like in C) but often you get it as the return value.
In Lgob 99% of the Lua API is generated automatically (iface.c in the src dir) from a description of the C API (xxx.def and xxx.ovr files in src). I you want to see what really happens, look at iface.c. The Lua API (specially what the function returns) depends on the types of the parameters defined in the def file. The magic happens in Lgob's code generator; more specifically in the file lgob-9.09/codegen/src/types.lua, which starts with
Code:
--[[
        Handles the conversions between C and Lua function calls.
--]]
What I like about Lua/Lgob is that you can add your own functions (in Lua) for functions that have an ugly auto-generated API. You can even replace them at run-time.

For example to delete the selected text in a text buffer you have to do:

Code:
  local b,e = gtk.TextIter:new(), gtk.TextIter:new()
  local sel = buffer:get_selection_bounds(b,e)
  if sel then buf:delete(b,e) end
If I add my own get_sel function to (the existing class defined in C by lgob) TextBuffer:

Code:
function gtk.TextBuffer:get_sel_bounds()
  local b,e = gtk.TextIter:new(), gtk.TextIter:new()
  local sel = self:get_selection_bounds(b,e)
  return sel, b, e
end
Then deleting the selection becomes the more elegant and more Lua:

Code:
 local sel, b, e = buf:get_sel_bounds()
  if sel then buf:delete(b,e) end

Last edited by hansel; 11-01-2009 at 12:29 PM.
hansel is offline   Reply With Quote
Old 11-01-2009, 12:20 PM   #12
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Post

Quote:
Originally Posted by ericshliao View Post
You are right. I just can't understand why.
For inspiration look in lgob-9.09/gdk/src/gdk.def:
Code:
defFunction('gdk_color_parse',
        {
                since = '0.1',
                args = {'char* none', 'struct* full'},
                ret = 'boolean none'
        }
)
This generates: lgob-9.09/gdk/src/iface.c where you can see that color_parse has a string as input and a color as output:

Code:
static int _wrap_gdk_color_parse(lua_State* L)
{
        GdkColor color;
        gdk_color_parse(lua_tostring(L, 1), &color);
        boxed_new(L, GDK_TYPE_COLOR, &color);
        return 1;
}
It takes some time to get used to this, but after a while it becomes quite readable. For me it is easier to parse than those Chinese glyphs ;-)

PS: shall we start a new thread for lgob discussions to avoid 'polluting' the software release threads?
hansel is offline   Reply With Quote
Old 11-01-2009, 01:42 PM   #13
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by hansel View Post
PS: shall we start a new thread for lgob discussions to avoid 'polluting' the software release threads?
Or use lua thread, as I usually use

Anyway, you're right, we should move to other thread.
Btw, what do you think about creating a lua+lgob+xx installer to not include inside each new program?

Iņigo
Iņigo is offline   Reply With Quote
Old 11-11-2009, 10:00 AM   #14
Tamo
Junior Member
Tamo began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2009
Device: Irex Iliad
I downloaded Software tools, unzipped and copied to CF card. I went to device manager then to CF card. There I could "Iliad Toolbox: Install it on your Iliad". When I click on it, the screen flashes once and then green LED blinks for a couple of seconds and then nothing happens.

Is the toolbox installed ? If yes then how do I run it ?


I Just received my Iliad. I have downloaded the developers package as explained here (https://www.mobileread.com/forums/showthread.php?t=17342) and also checked mrxvt runs fine.

Is there anything I am doing wrong ?
Tamo is offline   Reply With Quote
Old 11-12-2009, 10:00 AM   #15
Tamo
Junior Member
Tamo began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2009
Device: Irex Iliad
Got it working. I unzipped the tar.gz using winzip. That caused some LF/CR changes. I unzipped with WinRar and then transferred to SD card. Now the installation went through fine.

Great tool.
Thanks
Tamo is offline   Reply With Quote
Reply

Tags
lua, toolbox, tools

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Book (Kindle) - The Conflict Resolution Toolbox (UK only) koland Deals and Resources (No Self-Promotion or Affiliate Links) 0 08-14-2010 09:58 AM
iLiad Device Support DesiLinguist Calibre 11 08-06-2009 01:58 AM
PDF Toolbox on Mashable.com sic News 0 07-25-2007 12:29 PM
Photo of smashed iLiad device TadW iRex 13 01-24-2007 05:26 PM
Useful tools for the iLiad LittleTalker iRex 24 05-15-2006 08:28 AM


All times are GMT -4. The time now is 10:12 AM.


MobileRead.com is a privately owned, operated and funded community.