Wary 1.0.2 (102) feedback

Please post any bugs you have found
Message
Author
Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#121 Post by Shep »

Most puppies have mimencode for base64 encoding. Wary gets around a missing mimencode by allowing uuencode to take the -m option to handle base64 encoding. Fair enough.

But how to decode base64 in Wary? Busybox's uudecode does not know about a -m option.

Code: Select all

# uudecode --help
BusyBox v1.17.2 (2010-09-28 21:52:28 GMT-8) multi-call binary.

Usage: uudecode [-o OUTFILE] [INFILE]

Uudecode a file
Finds outfile name in uuencoded source unless -o is given

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#122 Post by npierce »

Shep wrote:But how to decode base64 in Wary? Busybox's uudecode does not know about a -m option.
If the file was encoded by uuencode -m, uudecode will recognize that it is base64, because uuencode indicates that it is base64 in the first line of the encoded file.

If the file was encoded by mimencode, things are not as simple, since mimencode doesn't indicate the type of encoding in the file.

If you have such a file, you can supply that information by using the following one-line command (although it might get wrapped to two lines in your browser window) to give uudecode something that it recognizes:

Code: Select all

echo -e "begin-base64 644 decoded_file\n`cat encoded_file`\n====" | uudecode
The above command decodes a file named "encoded_file" to a file named "decoded_file", and gives it permissions 644.

If you do this a lot, you may want to write a short script -- something like this:

Code: Select all

#!/bin/bash

if [ -f "$1" ] && [ -r "$1" ] && [ -n "$2" ] ; then

echo -e "begin-base64 `stat --printf %a "$1"` $2\n`cat "$1"`\n====" | uudecode

elif [ -e "$1" ] && [ -r "$1" ] && [ -n "$2" ] ; then

echo "$1: not a regular file"

elif [ -e "$1" ] && [ -n "$2" ] ; then

echo "$1: Read permission denied"

elif [ -n "$2" ] ; then

echo "$1: file not found"

else

echo -e "Usage:\n\t$0 <encoded_file> <decoded_file>"

fi
I've double-spaced to make clear the individual lines, despite how they might wrap in your browser window.

The script decodes the file named in the first argument to the file named in the second argument, and gives the decoded file the same read, write, and execute permissions as the encoded file.

Of course it might be easier to install mimencode, and would be easier still if it was included with the distro.

Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#123 Post by Shep »

npierce wrote:
Shep wrote:But how to decode base64 in Wary? Busybox's uudecode does not know about a -m option.
If the file was encoded by uuencode -m, uudecode will recognize that it is base64, because uuencode indicates that it is base64 in the first line of the encoded file.
Thank you for the trouble you went to in answering my question. A week after posting I remembered I should just copy the binary from another puppy (TXZ) and it runs just fine in Wary. I now store it outside the save file so I can call it from whatever puppy is lacking that binary.

The most logical solution would be for uudecode to accept the -m argument. Or couldn't it simply interpret the differing line lengths as indicative of UU or base64?

Most often I copy the block of base64 stuff out of an email, without headers, and need to decode it.

Again, thanks.

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#124 Post by npierce »

Shep,

You're welcome.

I'm glad to hear that you now have a mimencode binary that your Puppies can share -- a good solution.

I would think that the need to decode base64 e-mail attachments would be common enough to justify the little 9 kB footprint that mimencode would require in Wary. Although I enjoyed looking into finding a way to do it with uudecode, many users won't want to go to that length.

Of course, if uudecode had an option for this, as you suggested, that would be a space-saving alternative.

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#125 Post by ttuuxxx »

Hi Barry I also spent 2 days on trying to get the wxgtk email client going and well its a no go, lol
So I went on a hunt for another email, client for your repo.
Well I found one its a Gnome email client called Balsa, I made just about all the deps static, lol only esmtp needed to be shared, It needed Gconf,Orbit, Dbus, etc. I manually removed Dbus from Gconf, what a pain that was, I'll post the sources for Gconf-No-Dbus later. I managed to get them to compile statically. Anyways here's a package its not 100% complete yet, I need to workout which gnome icons it needs, But it would be good to get it tested by users. Spellcheck works, I statically compiled gtkspell, Pop3 works for Gmail, I need to figure out what's being called when you click a url in a message, because It doesn't find the handler, probably yelp or ghelp.
I'll keep working on it.
ttuuxxx
Attachments
balsa.jpg
(95.64 KiB) Downloaded 1009 times
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

yosi666
Posts: 111
Joined: Tue 13 May 2008, 14:41

Couldn´t download Wary

#126 Post by yosi666 »

Hi Barry
I tried to download Wary 1.0.2 from your blog but the download is unavailable. Is there anywhere else from where I can download it to try this new version?
Thank you very much for ur job

User avatar
James C
Posts: 6618
Joined: Thu 26 Mar 2009, 05:12
Location: Kentucky

Re: Couldn´t download Wary

#127 Post by James C »

yosi666 wrote:Hi Barry
I tried to download Wary 1.0.2 from your blog but the download is unavailable. Is there anywhere else from where I can download it to try this new version?
Thank you very much for ur job
This is an old test release.For the latest, Wary 5.0 see here
http://bkhome.org/blog/?viewDetailed=02057

yosi666
Posts: 111
Joined: Tue 13 May 2008, 14:41

thanks

#128 Post by yosi666 »

Yep, realized after I posted
Thanks for the reply
Liked the Wary 5.0 very much. Recognised my zte mf 110 usb modem in a minute after installing the zzz_scripts_simple pet in Barry's blog
Nice work!

User avatar
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

#129 Post by abushcrafter »

npierce wrote:
Shep wrote:But how to decode base64 in Wary? Busybox's uudecode does not know about a -m option.
If the file was encoded by uuencode -m, uudecode will recognize that it is base64, because uuencode indicates that it is base64 in the first line of the encoded file.

If the file was encoded by mimencode, things are not as simple, since mimencode doesn't indicate the type of encoding in the file.

If you have such a file, you can supply that information by using the following one-line command (although it might get wrapped to two lines in your browser window) to give uudecode something that it recognizes:

Code: Select all

echo -e "begin-base64 644 decoded_file\n`cat encoded_file`\n====" | uudecode
The above command decodes a file named "encoded_file" to a file named "decoded_file", and gives it permissions 644.

If you do this a lot, you may want to write a short script -- something like this:

Code: Select all

#!/bin/bash

if [ -f "$1" ] && [ -r "$1" ] && [ -n "$2" ] ; then

echo -e "begin-base64 `stat --printf %a "$1"` $2\n`cat "$1"`\n====" | uudecode

elif [ -e "$1" ] && [ -r "$1" ] && [ -n "$2" ] ; then

echo "$1: not a regular file"

elif [ -e "$1" ] && [ -n "$2" ] ; then

echo "$1: Read permission denied"

elif [ -n "$2" ] ; then

echo "$1: file not found"

else

echo -e "Usage:\n\t$0 <encoded_file> <decoded_file>"

fi
I've double-spaced to make clear the individual lines, despite how they might wrap in your browser window.

The script decodes the file named in the first argument to the file named in the second argument, and gives the decoded file the same read, write, and execute permissions as the encoded file.

Of course it might be easier to install mimencode, and would be easier still if it was included with the distro.
Hmm, could you have a look at my Improving The Wrappers From Xarchive thread at test out the "uu-wrap.sh" wrapper please?
[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/

Post Reply