[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] Logtails 0.4 : the time saving release

Bauduin Raphael

1/29/2005 7:13:00 PM

Hi,

Logtails 0.4 has arrived ( http://rubyforge.org/frs/?gr... ), and
it now contains all functionalities I need and wanted to put in. The
most important addition of this release is that it is now possible to
save sessions. When you save the session to a file (YAML format), you
can reopen it later and have all your tails and their respective tabs
restored, including the regexps you specified for the tabs. This is
really time saving! When you have tabs already open, and you restore a
session, the tabs saved in the session are added to the already existing
tabs.

Sessions don't save the output displayed though. But you can manually
save each tab's content to a (local) file.

The interface to open a remote tab is now the same as the one used for
local tails. You can even browse the remote filesystem to choose the
file to watch (all thanks to KDE's kio slaves).

There's also an indicator for when a tab's content has changed, and you
can insert blank line to the tail's output, just as you can when you
press enter in a terminal running tail -f.

Here's the changelog:

-Save and reload sessions
-Local and remote tails are started through the same interface
-Open a file by browsing the file system (local and remote)
-Insert blank lines in the active tab by pressing enter
-Insert a blank line in all tabs with CTRL+ENTER
-Save the tab's content to a file
-Tab label of remote files don't show the whole path
-Star prepended to the tab label when changes occur. Star removed when
tab is activited

The only things I plan to add are:
- splitting, so you can display several tails side by side
- fixes and cleanups

links:
summary page: http://rubyforge.org/projects...
download page: http://rubyforge.org/frs/?gr...

Raph
14 Answers

Richard Dale

1/30/2005 12:55:00 AM

0

Bauduin Raphael wrote:

> Hi,
>
> Logtails 0.4 has arrived ( http://rubyforge.org/frs/?gr... ), and
> it now contains all functionalities I need and wanted to put in. The
> most important addition of this release is that it is now possible to
> save sessions. When you save the session to a file (YAML format), you
> can reopen it later and have all your tails and their respective tabs
> restored, including the regexps you specified for the tabs. This is
> really time saving! When you have tabs already open, and you restore a
> session, the tabs saved in the session are added to the already existing
> tabs.
>
> Sessions don't save the output displayed though. But you can manually
> save each tab's content to a (local) file.
>
> The interface to open a remote tab is now the same as the one used for
> local tails. You can even browse the remote filesystem to choose the
> file to watch (all thanks to KDE's kio slaves).
>
> There's also an indicator for when a tab's content has changed, and you
> can insert blank line to the tail's output, just as you can when you
> press enter in a terminal running tail -f.
>
> Here's the changelog:
>
> -Save and reload sessions
> -Local and remote tails are started through the same interface
> -Open a file by browsing the file system (local and remote)
> -Insert blank lines in the active tab by pressing enter
> -Insert a blank line in all tabs with CTRL+ENTER
> -Save the tab's content to a file
> -Tab label of remote files don't show the whole path
> -Star prepended to the tab label when changes occur. Star removed when
> tab is activited
>
> The only things I plan to add are:
> - splitting, so you can display several tails side by side
> - fixes and cleanups
>
> links:
> summary page: http://rubyforge.org/projects...
> download page: http://rubyforge.org/frs/?gr...
Good to see the app progressing rapidly - 4 releases with lots of extra
functionality added in a short time - it must be RAD. And I hope you can
tell people at FOSDEM about your experiences..

Maybe I can carry on tweaking the KDevelop based 'long winded release'
version that has the full KDE build system and so on, as it's a good
example app. For instance, KDE has its own mechanism for saving and
restoring session details and configuration settings, which you could use
instead of yaml.

-- Richard

Alexander Kellett

1/30/2005 1:11:00 AM

0

On Jan 30, 2005, at 2:00 AM, Richard Dale wrote:
> Maybe I can carry on tweaking the KDevelop based 'long winded release'
> version that has the full KDE build system and so on, as it's a good
> example app. For instance, KDE has its own mechanism for saving and
> restoring session details and configuration settings, which you could
> use
> instead of yaml.

richard i hope you don't mind me suggesting that you
switch to using a either a) pure ruby build solution,
or b) a cons (yeah python but hell its good from what
i've heard) solution? automake ain't really the nicest
way of packaging up stuff. the packages are bigger
than the source in most cases :/

Alex



Richard Dale

1/30/2005 1:36:00 AM

0

Alexander Kellett wrote:

> On Jan 30, 2005, at 2:00 AM, Richard Dale wrote:
>> Maybe I can carry on tweaking the KDevelop based 'long winded release'
>> version that has the full KDE build system and so on, as it's a good
>> example app. For instance, KDE has its own mechanism for saving and
>> restoring session details and configuration settings, which you could
>> use
>> instead of yaml.
>
> richard i hope you don't mind me suggesting that you
> switch to using a either a) pure ruby build solution,
> or b) a cons (yeah python but hell its good from what
> i've heard) solution? automake ain't really the nicest
> way of packaging up stuff. the packages are bigger
> than the source in most cases :/
I'd like to allow both sort of builds/releases. So it should be possible to
create a KDE project in KDevelop that can be either an automake, or a
mkmf.rb/cons style simpler one. At the moment the KDevelop project template
needs to use automake because it generates a C++ top level stub program to
start the ruby app once it's installed. That isn't needed during
development though, the ruby code can still be run directly.

You need some sort of makefile in the project to run the rbuic tool if a .ui
file changes (and more recently a rbkconfig_compiler rule for using KConfig
XT .kcfg files). And KDE expects to find .rc and .desktop files or icons in
certain places - there are quite a lot of resources apart from the ruby
code that need to be installed.

-- Richard

Joel VanderWerf

1/30/2005 1:39:00 AM

0

Bauduin Raphael wrote:
> Hi,
>
> Logtails 0.4 has arrived ( http://rubyforge.org/frs/?gr... ), and

This is the first qt ruby app I've tried to get working, and I'm having
some problems. I've got KDE 3.2.3 on Mandrake 10.1.

First, I tried qtruby-1.0.6:

$ make -f Makefile.cvs
$ ./configure --with-smoke="qt kde"
$ make
make all-recursive
make[1]: Entering directory `/home/vjoel/ruby/src/gui/qt/qtruby-1.0.6'
Making all in smoke
make[2]: Entering directory `/home/vjoel/ruby/src/gui/qt/qtruby-1.0.6/smoke'
Making all in qt
make[3]: Entering directory
`/home/vjoel/ruby/src/gui/qt/qtruby-1.0.6/smoke/qt'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/home/vjoel/ruby/src/gui/qt/qtruby-1.0.6/smoke/qt'
Making all in kde
/bin/sh: line 1: cd: kde: No such file or directory
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/vjoel/ruby/src/gui/qt/qtruby-1.0.6/smoke'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vjoel/ruby/src/gui/qt/qtruby-1.0.6'
make: *** [all] Error 2

Then I tried korundum-3.3.1:

$ make -f Makefile.cvs
$ ./configure --with-smoke="qt kde"
$ make
...
/bin/sh ../../libtool --silent --mode=link --tag=CXX g++
-Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W
-Wpointer-arith -Wwrite-strings -O2 -Wformat-security
-Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common
-o qtrubyinit -module -L/usr/X11R6/lib -L/usr/lib/qt3//lib -L/usr/lib
-version-info 0:0:0 -L../../smoke/qt/ -L/usr/local/lib qtrubyinit.o
-lqt-mt -lz -lpng -lz -lm -lXext -lX11 -lSM -lICE -lpthread -Wl,-R
-Wl,/usr/local/lib -L/usr/local/lib -L. ../../smoke/qt/libsmokeqt.la
../../qtruby/rubylib/qtruby/libqtrubyinternal.la
libtool: link: warning: `-version-info' is ignored for programs
qtrubyinit.o(.text+0xc): In function `main':
: undefined reference to `ruby_init'
qtrubyinit.o(.text+0x1a): In function `main':
: undefined reference to `ruby_script'
qtrubyinit.o(.text+0x29): In function `main':
: undefined reference to `ruby_options'
qtrubyinit.o(.text+0x2e): In function `main':
: undefined reference to `ruby_run'
collect2: ld returned 1 exit status
make[3]: *** [qtrubyinit] Error 1
make[3]: Leaving directory
`/home/vjoel/ruby/src/gui/qt/korundum-3.3.1/qtruby/bin'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/vjoel/ruby/src/gui/qt/korundum-3.3.1/qtruby'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vjoel/ruby/src/gui/qt/korundum-3.3.1'
make: *** [all] Error 2

Any suggestions?


Joel VanderWerf

1/30/2005 1:46:00 AM

0

Joel VanderWerf wrote:
> Then I tried korundum-3.3.1:
>
> $ make -f Makefile.cvs
> $ ./configure --with-smoke="qt kde"
> $ make

Oops. That was for qt. I tried to build korundum with:

$ make -f Makefile.cvs
$ ./configure
$ make

I get the impression that korundum includes qtruby. Is that right?


Richard Dale

1/30/2005 9:58:00 AM

0

Joel VanderWerf wrote:

> Joel VanderWerf wrote:
>> Then I tried korundum-3.3.1:
>>
>> $ make -f Makefile.cvs
>> $ ./configure --with-smoke="qt kde"
>> $ make
>
> Oops. That was for qt. I tried to build korundum with:
>
> $ make -f Makefile.cvs
> $ ./configure
> $ make
>
> I get the impression that korundum includes qtruby. Is that right?
Yes it does - you only need to download either qtruby or korundum, but not
both. I hope you managed to build korundum ok, the commands above should
work ok.

-- Richard

Bauduin Raphael

1/30/2005 11:47:00 AM

0

Richard Dale wrote:
> Bauduin Raphael wrote:
>
>
>>Hi,
>>
>>Logtails 0.4 has arrived ( http://rubyforge.org/frs/?gr... ), and
>>it now contains all functionalities I need and wanted to put in. The
>>most important addition of this release is that it is now possible to
>>save sessions. When you save the session to a file (YAML format), you
>>can reopen it later and have all your tails and their respective tabs
>>restored, including the regexps you specified for the tabs. This is
>>really time saving! When you have tabs already open, and you restore a
>>session, the tabs saved in the session are added to the already existing
>>tabs.
>>
>>Sessions don't save the output displayed though. But you can manually
>>save each tab's content to a (local) file.
>>
>>The interface to open a remote tab is now the same as the one used for
>>local tails. You can even browse the remote filesystem to choose the
>>file to watch (all thanks to KDE's kio slaves).
>>
>>There's also an indicator for when a tab's content has changed, and you
>>can insert blank line to the tail's output, just as you can when you
>>press enter in a terminal running tail -f.
>>
>>Here's the changelog:
>>
>>-Save and reload sessions
>>-Local and remote tails are started through the same interface
>>-Open a file by browsing the file system (local and remote)
>>-Insert blank lines in the active tab by pressing enter
>>-Insert a blank line in all tabs with CTRL+ENTER
>>-Save the tab's content to a file
>>-Tab label of remote files don't show the whole path
>>-Star prepended to the tab label when changes occur. Star removed when
>>tab is activited
>>
>>The only things I plan to add are:
>>- splitting, so you can display several tails side by side
>>- fixes and cleanups
>>
>>links:
>>summary page: http://rubyforge.org/projects...
>>download page: http://rubyforge.org/frs/?gr...
>
> Good to see the app progressing rapidly - 4 releases with lots of extra
> functionality added in a short time - it must be RAD. And I hope you can
> tell people at FOSDEM about your experiences..

Not sure I'll have much time, but it's clearly real fun to program with
Ruby+Korundum. I've obtained the useful too I aimed for in short time,
although I didn't know QT/KDE and Logtails is a low priority side
project, something I code for a change. Adding highlighting was done in
15 minutes (including 10 minutes to read documentation :-) , and session
saving+restoring was done in 1 hour.

>
> Maybe I can carry on tweaking the KDevelop based 'long winded release'
> version that has the full KDE build system and so on, as it's a good
> example app. For instance, KDE has its own mechanism for saving and
> restoring session details and configuration settings, which you could use
> instead of yaml.

Good idea.
I implemented sessions with yaml because it was easy, but also because
KDE's documentation is not that friendly when you are new to the API....
Having that implemented in Logtails could be a good example.


Raph

>
> -- Richard

Alexander Kellett

1/30/2005 12:27:00 PM

0

On Jan 30, 2005, at 2:40 AM, Richard Dale wrote:
> You need some sort of makefile in the project to run the rbuic tool if
> a .ui
> file changes (and more recently a rbkconfig_compiler rule for using
> KConfig
> XT .kcfg files). And KDE expects to find .rc and .desktop files or
> icons in
> certain places - there are quite a lot of resources apart from the ruby
> code that need to be installed.

there is a cons based kde specific script available. *somewhere* ;)
Alex



Cai Li

1/31/2005 12:39:00 PM

0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

My job is to split the following string which contains some chinese
chars(GB code) and make an array:

"sz000503,????,2005-01-31 15:01:01,<font
color=009933>11.780</font>,11.950,11.800,<font
color=009933>-0.170</font>,11.640,11.930,<font
color=009933>-1.42%</font>,61454,7231.56,11.770,11.790,<font
color=009933>-60.52%</font>,11.77 / 96,11.76 / 197,11.75 / 195,11.79
/ 177,11.80 / 611,11.81 / 424,11.73 / 85,11.72 / 70,11.82 / 528,11.83
/ 873"

my own script looks like this:
def make_array(orig_string)

rb_array = Array.new
elements = ''
orig_string.each_byte {|s|
if sprintf("%c",s) != ',' then
elements = elements + sprintf("%c",s)
else
rb_array.push(elements)
elements = ''
end
}
return rb_array
end

with the following results:
["sz000503", "\272\243\272\347\277\330\271\311", "2005-01-31
15:01:01", "<font c
olor=009933>11.780</font>", "11.950", "11.800", "<font
color=009933>-0.170</font
>", "11.640", "11.930", "<font color=009933>-1.42%</font>", "61454",
"7231.56",
"11.770", "11.790", "<font color=009933>-60.52%</font>", "11.77 /
96", "11.76 /
197", "11.75 / 195", "11.79 / 177", "11.80 / 611", "11.81 / 424",
"11.73 / 85",
"11.72 / 70", "11.82 / 528"]

Almost right except chinese chars.Then how to save chinese?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32) - WinPT 0.7.96rc1

iD8DBQFB/iZGVLC4xCNBi2kRAngyAJ4lJew59t3OpUYFeY3rdt7cW0C/wgCdFk8g
owog0jOeOyJq2OsvbfJlpvk=
=9Unz
-----END PGP SIGNATURE-----


Robert Klemme

1/31/2005 12:47:00 PM

0


"Cai Li" <caili@cdgwbn.com.cn> schrieb im Newsbeitrag
news:000901c50791$b54c8370$8caba2d3@lcai...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> My job is to split the following string which contains some chinese
> chars(GB code) and make an array:
>
> "sz000503,????,2005-01-31 15:01:01,<font
> color=009933>11.780</font>,11.950,11.800,<font
> color=009933>-0.170</font>,11.640,11.930,<font
> color=009933>-1.42%</font>,61454,7231.56,11.770,11.790,<font
> color=009933>-60.52%</font>,11.77 / 96,11.76 / 197,11.75 / 195,11.79
> / 177,11.80 / 611,11.81 / 424,11.73 / 85,11.72 / 70,11.82 / 528,11.83
> / 873"
>
> my own script looks like this:
> def make_array(orig_string)
>
> rb_array = Array.new
> elements = ''
> orig_string.each_byte {|s|
> if sprintf("%c",s) != ',' then
> elements = elements + sprintf("%c",s)
> else
> rb_array.push(elements)
> elements = ''
> end
> }
> return rb_array
> end

Btw, "str.split(/,/)" should do exactly the same and is more efficient.

> with the following results:
> ["sz000503", "\272\243\272\347\277\330\271\311", "2005-01-31
> 15:01:01", "<font c
> olor=009933>11.780</font>", "11.950", "11.800", "<font
> color=009933>-0.170</font
> >", "11.640", "11.930", "<font color=009933>-1.42%</font>", "61454",
> "7231.56",
> "11.770", "11.790", "<font color=009933>-60.52%</font>", "11.77 /
> 96", "11.76 /
> 197", "11.75 / 195", "11.79 / 177", "11.80 / 611", "11.81 / 424",
> "11.73 / 85",
> "11.72 / 70", "11.82 / 528"]
>
> Almost right except chinese chars.Then how to save chinese?

Err, what exactly is the problem? I don't see chinese characters, which
is probably doe to my installed encodings. But what result do you want to
get?

Kind regards

robert

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (MingW32) - WinPT 0.7.96rc1
>
> iD8DBQFB/iZGVLC4xCNBi2kRAngyAJ4lJew59t3OpUYFeY3rdt7cW0C/wgCdFk8g
> owog0jOeOyJq2OsvbfJlpvk=
> =9Unz
> -----END PGP SIGNATURE-----
>
>