Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 30 Aug 2014, 16:32
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How to scrape rxvt screen for text ?
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Sat 06 Feb 2010, 03:24    Post_subject:  How to scrape rxvt screen for text ?  

I think 8-bit also asked this Q...
How to get rxvt`s screen output while it`s running a CLI app.

Need last line of the rxvt screen output while it`s running vobcopy.
Sometimes the movie size is stated wrong ( how do they do that ? ).
But once vobcopy is running the movie size is stated correctly.
This will help automate the ripping process.
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4347

PostPosted: Sat 06 Feb 2010, 03:38    Post_subject:  

I don't have a dvd handy but
vobcopy -I <something.vob> |tail -1

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Sat 06 Feb 2010, 15:34    Post_subject:  

Thanks technosaurus, I`ll give it a try and let you know...
Back to top
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11031
Location: Arizona USA

PostPosted: Sat 06 Feb 2010, 22:32    Post_subject:  

The way to copy and paste in rxvt is known only to the guy who wrote rxvt and a few of his closest friends. You'd think it would be in rxvt's help menu, but nooooo. Evil or Very Mad

I seem to remember once highlighting some text in rxvt and using something like ctrl-s to copy and ctrl-v to paste.
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4347

PostPosted: Sun 07 Feb 2010, 01:25    Post_subject:  

middle click to cut/paste in rxvt, but it sounded like sunburnt needed the text in a script... perhaps I misinterpreted
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11031
Location: Arizona USA

PostPosted: Sun 07 Feb 2010, 09:14    Post_subject:  

I copied this from a rxvt window, then pasted it into the forum compose window by simultaneously clicking the left- and right- click buttons after highlighting the text in rxvt, and clicking them again in the empty compose window:
Code:
# growisofs -M /dev/dvd -D -R -l -new-dir-mode 0755 -graft-points dotPets=/tmp/dotPets
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Sun 07 Feb 2010, 13:57    Post_subject:  

Flash; You use the middle button ( scroll button ) to paste in rxvt and xterm.
BUT... The copy text HAS to be highlighted... Not copied...
You can paste into rxvt, from rxvt, and within rxvt this way.
Why it behaves this why is beyond comprehension.

technosaurus is correct though...
I need a script to be able to read the text being displayed in rxvt,
so in the usual Linux fashion redirecting to a file is probably needed.
technosaurus; I tried these: ( "-I" gives info )
Code:
vobcopy -f -o /mnt/sda6/v/bicentennialMan.vob |tail -1 > /tmp/vobTEST

rxvt -e vobcopy -f -o /mnt/sda6/v/bicentennialMan.vob |tail -1 > /tmp/vobTEST

rxvt -e vobcopy -f -o /mnt/sda6/v/bicentennialMan.vob |tail -1 2> /tmp/vobTEST

rxvt -e vobcopy -f -o /mnt/sda6/v/bicentennialMan.vob > /tmp/vobTEST

rxvt runs vobcopy and creates the file: /tmp/vobTEST but the file is empty.
I tried it without "|tail -1" just to simplify it and it did the same thing.

I don`t recall this ever being done, there`s lots of uses for it though...

Edited_times_total
Back to top
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11031
Location: Arizona USA

PostPosted: Sun 07 Feb 2010, 14:16    Post_subject:  

sunburnt wrote:
Flash; You use the middle button ( scroll button ) to paste in rxvt and xterm.

But I don't have a middle button. Smile (Simultaneously clicking both the left and right mouse buttons does the same thing as clicking a middle button, if you have one.)

Anyway, I finally understood what you meant. As usual, I was way off target. Laughing
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4347

PostPosted: Thu 11 Feb 2010, 10:11    Post_subject:  

if you could post the output you want to get at, it would be easier to help
just do

vobcopy ... >output 2>errors

There is an example in woo-ff for grepping the resolution using ffmpeg

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0556s ][ Queries: 12 (0.0051s) ][ GZIP on ]