(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 20 Sep 2020, 01:23
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
grabc, a CLI onscreen color grabber
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [13 Posts]  
Author Message
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Thu 07 Mar 2019, 23:40    Post subject:  grabc, a CLI onscreen color grabber
Subject description: A rare find
 

Hello all.

I finally found it. This is a rare find, and it took me days to find it. First you have to
suspect such a thing exists, then find its name, Which is not obviously descriptve.
"Grab C" what? The C language? If you see what I mean. No, grab "c", "c" as in
"color"... Sure it was in a Debian repo all this time. But if nobody knows it's there...

In any case, this color picker works from terminal and returns the RGB number in
terminal. Big deal, you'll say: there are dozens of GUI color pickers at sourceforge,
at github, at the pinetools site, etc., etc. Plus Gimp and Mtpaint have one. -- You're
absolutely right.

Except with a console-based color picker like this grabc, you can readily control it with
say, xdotool, and incorporate the result in a script. And then if the background at that
place on the desktop is dark, you chose a contrasting light-colored icon for your utility,
on the fly.

Something like this, maybe:
Code:
grabc 2> /dev/null | xsel -i
You drag the mouse on the desktop where your interesting color is, and click.
Then you issue this command:
Code:
A="`xsel -o`";echo $A
Result:
Quote:
#6c878e
Or similar use.

With the GUI-based color pickers, you can't do that. Or perhaps an expert dev could,
but it would be a complication.

So here you go: "grabc". A rare find for Puppyists. Please treasure it!

BFN.
grabc_1.1-2+b2_i386.pet
Description 
pet

 Download 
Filename  grabc_1.1-2+b2_i386.pet 
Filesize  5.33 KB 
Downloaded  290 Time(s) 

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
jplt3


Joined: 08 Apr 2019
Posts: 118
Location: Planet Earth

PostPosted: Tue 24 Dec 2019, 15:13    Post subject:  

hello musher0,

i want to try this cli color grabber but 2 problems :
- the pet is not well named so it won't install
and this error , tested in bionicpup64

Code:
grabc: error while loading shared libraries: libX11.so.6: wrong ELF class: ELFCLASS64


I reuploaded renamed.
grabc_1.1-2+b2_i386.pet
Description 
pet

 Download 
Filename  grabc_1.1-2+b2_i386.pet 
Filesize  5.33 KB 
Downloaded  156 Time(s) 

_________________
JpLt
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Tue 24 Dec 2019, 15:45    Post subject:  

Hello, jplt2.

The above is a 32-bit executable; it cannot run on a 64-bit system.
I think the source cannot be found anymore (to re-compile).

As to the packaging problem, I'll double-check. Thanks for mentioning it.

BFN.

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Tue 24 Dec 2019, 16:01    Post subject:  

Rebonjour jplt3.

About my packaging:
There is a quirk, it does not install as usual.

But I found the package in /root with the ending xz.
I was able to open it with Xarchiver.
Simply create a sub-directory to receive it and it will unpack there properly.

BFN.

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Last edited by musher0 on Tue 24 Dec 2019, 16:10; edited 1 time in total
Back to top
View user's profile Send private message 
jplt3


Joined: 08 Apr 2019
Posts: 118
Location: Planet Earth

PostPosted: Tue 24 Dec 2019, 16:02    Post subject:  

Ok i will test on a 32bit puppy...
_________________
JpLt
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Tue 24 Dec 2019, 16:07    Post subject:  

Re-re-bonjour.

Hehe. I had to rename your package to grabc_1.1-2+b2_i386.pet locally to get it to install!

I think the down-loader on this forum is quirky. It changes some letters in the file names to
fit its understanding of things. Could it be based on WhineDose? Noooo! Wink

Flash? Do you have an idea about this?

BFN.

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Tue 24 Dec 2019, 16:21    Post subject:  

I just PM'd the followiing to moderator Flash:
Quote:
Hi, Flash.

Would you please have a look here?

Member jplt3 had problems downloading the pet file in that thread.
It seems the board's downloader re-interprets some characters in the file names wrongly.

Now since after download the name of the pet archive is not the same as the name of the
sub-dir in the archive itself, petget says it can't install it.

Any suggestion to users for correcting this forum behavior will be welcome.

TIA.

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
OscarTalks


Joined: 05 Feb 2012
Posts: 2202
Location: London, England

PostPosted: Tue 24 Dec 2019, 17:35    Post subject:  

Source can be found here
https://github.com/muquit/grabc
Note that version 1.0.2 is more recent than the 1.1 "orig" archived package held by Debian. I think perhaps they may have added some patches/modifications of their own and renumbered 1.0 as 1.1

_________________
Oscar in England

Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Tue 24 Dec 2019, 17:56    Post subject:  

Many thanks for that info, Oscar_Talks.

@jplt3: If you know how to do compilations, perhaps do one for the 64-bit Puppy?
As for me, I do not have a 64-bit machine any more.

Season's Greetings to all !

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


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

PostPosted: Tue 24 Dec 2019, 21:55    Post subject:  

As far as I know, the forum software doesn't change filenames. If it doesn't like something in a post, it simply won't show anything. The whole post is blank. Maybe it's different for attachments. This would be the first time anyone has said anything about filenames being changed by the forum.

As for the PM musher0 sent me, he didn't include any specifics as to what was changed, so there's not much I can do with it.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Wed 25 Dec 2019, 00:22    Post subject:  

Flash wrote:
As far as I know, the forum software doesn't change filenames. If it doesn't like something in a post, it simply won't show anything. The whole post is blank. Maybe it's different for attachments. This would be the first time anyone has said anything about filenames being changed by the forum.

As for the PM musher0 sent me, he didn't include any specifics as to what was changed, so there's not much I can do with it.

Hi Flash.

Thanks for responding.

Specifics:
The "+" character in the file name above becomes "%2" when saved as a download.
The user has to rename the file after download to what is displayed on the forum
to get the petget utility to install the pet archive properly.

IHTH.

Season's Greetings, BTW!

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Wed 25 Dec 2019, 03:02    Post subject:  

musher0 wrote:
The "+" character in the file name above becomes "%2"
becomes "%2B", which is the hex value of '+', same as the better known "%20", which would be the hex value of 'space'.

Quote:
The user has to rename the file after download to what is displayed on the forum
to get the petget utility to install the pet archive properly.
...which is an annoying and useless petget restriction. In principle a pet should install just fine even if the package name has been changed (by the user or as here by the server), but this is not permitted. It's a "security feature" I was told. Heaven only knows why.

I extracted only the binary grabc from the pet and it works fine in slacko5.6.
I still can't think of a scenario where this tool can be useful. There must be some.

I attach a text file (fake .gz extension) with almost all possible non-alphanumeric ASCII characters in its name.
You can check which of those get encoded when downloaded and which remain unchanged.
Original name: FILE !#$%&'()+,-[]^_`{|}~.txt.gz
Server delivers: FILE%20%21%23%24%25%26%27%28%29%2B%2C-%5B%5D%5E_%60.gz
Which is the encoded equivalent of FILE !#$%&'()+,-[]^_`.gz - Not exactly what I uploaded Surprised
Bottomline: Use only alphanumeric names. Underbars '_' are also safe.
FILE !#$%&'()+,-[]^_`.gz
Description 
gz

 Download 
Filename  FILE !#$%&'()+,-[]^_`.gz 
Filesize  54 Bytes 
Downloaded  137 Time(s) 
Back to top
View user's profile Send private message 
jplt3


Joined: 08 Apr 2019
Posts: 118
Location: Planet Earth

PostPosted: Wed 25 Dec 2019, 12:26    Post subject:  

Thanks @OscarTalks for the github repo link.
_________________
JpLt
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [13 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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