| Author |
Message |
trapster

Joined: 28 Nov 2005 Posts: 1543 Location: Maine, USA
|
Posted: Sun 17 Feb 2008, 14:30 Post subject:
Parchive-.0.2 Subject description: A directory compression utility |
|
Because I wanted something simple and also trying to learn some of this stuff, I made this little directory compression utility.
Parchive:
Choose a file name.
Choose which directory to compress.
Choose where to save it.
This will add the date and .tar.gz to the file name you choose.
Example: filename021608.tar.gz
enjoy.
Fullsize
EDIT: Updated to include suggestion from maddox to make it "idiot-proof".
EDIT: 2/23/08.
It should now be "idiot proof"
| Description |
|

Download |
| Filename |
Parchive-.0.2.pet |
| Filesize |
5.01 KB |
| Downloaded |
121 Time(s) |
_________________ trapster
Maine, USA
HP N5250
Booting:
Frugal install:Puppy2.16, Puppy3.0 Retro, Puppy4.00, Puppy4.10 + WindowsMe
Currently using Puppy4.10 w/ Fluxbox
Last edited by trapster on Sat 23 Feb 2008, 08:17; edited 4 times in total
|
|
Back to top
|
|
 |
Dingo

Joined: 11 Dec 2007 Posts: 809
|
Posted: Sun 17 Feb 2008, 15:14 Post subject:
|
|
good job! very very good and useful! I have mirrored also on dokupuppy
http://puppylover.netsons.org/dokupuppy/doku.php/programs:archiver
_________________ OpenOffice for Puppy Linux - puppy linux packages wiki
|
|
Back to top
|
|
 |
maddox
Joined: 28 Sep 2007 Posts: 421 Location: France
|
Posted: Sun 17 Feb 2008, 19:29 Post subject:
|
|
Hi trapster,
tried your prog, neat, small & simple
Could you add a basic (idiot-proof) error check,
example -> you don't fill in any boxes and click OK
- tar runs in the background.. (it's waiting for input, no directory specified).
you have to run "top" then kill tar...
only then you see an error box saying -> directory not found
thanks for your prog...
|
|
Back to top
|
|
 |
trapster

Joined: 28 Nov 2005 Posts: 1543 Location: Maine, USA
|
Posted: Sun 17 Feb 2008, 21:08 Post subject:
|
|
| Quote: | | Could you add a basic (idiot-proof) error check |
We might have to make this one for non-idiots only...LOL
I have no clue (at the moment) how to do that. Am willing for suggestions.
_________________ trapster
Maine, USA
HP N5250
Booting:
Frugal install:Puppy2.16, Puppy3.0 Retro, Puppy4.00, Puppy4.10 + WindowsMe
Currently using Puppy4.10 w/ Fluxbox
|
|
Back to top
|
|
 |
maddox
Joined: 28 Sep 2007 Posts: 421 Location: France
|
Posted: Mon 18 Feb 2008, 15:41 Post subject:
|
|
Hi trapster,
here's a little (idiot-proof) check, I'm digging as well into this Xdialog stuff
I inserted this code at line 51 of Parchive.
| Code: | #check if any or one of the source, dest, saveto variables are empty
#and opens an error box, after okay, quits the prog.
#box background color (-bg "#f0c0c0") is in hex RGB, gives a light pink
#
if [ $SOURCE = ""];then
xmessage -bg lightpink -center -title "Parchive" "
ERROR: no File Name was specified
"
exit
fi
if [ $DEST = ""];then
xmessage -bg "#f0c0c0" -center -title "Parchive" "
ERROR: no Dir. to compress was specified
"
exit
fi
if [ $SAVETO = ""];then
xmessage -bg "#f0c0c0" -center -title "Parchive" "
ERROR: no Dir. to Save to was specified
"
exit
fi
#end of check for empty variables |
it works, and displays an error box of which variable was forgotton.
with an empty line before and after the message, made for easier reading.
after you ckick "okay" the box closes, but then you have to run Parchive again.
hope it helps..
btw, why are there 2 copies of Parchive in the pet ?
1st in -> /usr/local/bin
2nd in -> /usr/local/Parchive
.
maddox
|
|
Back to top
|
|
 |
trapster

Joined: 28 Nov 2005 Posts: 1543 Location: Maine, USA
|
Posted: Tue 19 Feb 2008, 07:55 Post subject:
|
|
I was also playing with the same thing. I don't like the way the window closes and you have to start over again. It would be nice if a message would come up to tell you a field is empty and also let you continue without shutting it down.
Thank you for your input.
Why are there 2 parchives???
Most likely because I don't quite know what I'm doing....yet.
_________________ trapster
Maine, USA
HP N5250
Booting:
Frugal install:Puppy2.16, Puppy3.0 Retro, Puppy4.00, Puppy4.10 + WindowsMe
Currently using Puppy4.10 w/ Fluxbox
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 10610
|
Posted: Tue 19 Feb 2008, 09:29 Post subject:
|
|
Well done nice clean code
Useful for doing backups (I am told this is something one should do)
You can also I believe, just drag directories to the zip icon
Do you feel your code has any advantages?
How long did it take you to code? Do you have any future code plans?
_________________ "Woofy" Puppy 4.4 the next release . . . in development read all about it 
|
|
Back to top
|
|
 |
trapster

Joined: 28 Nov 2005 Posts: 1543 Location: Maine, USA
|
Posted: Tue 19 Feb 2008, 10:40 Post subject:
|
|
Lobster wrote:
| Quote: | You can also I believe, just drag directories to the zip icon
Do you feel your code has any advantages?
How long did it take you to code? Do you have any future code plans? Smile |
What zip icon???
I have several directories that I occasionally backup and store on another hd. This is something that I was playing with after I looked at your Pwget.
I actually tried Pbackup the other day and got real confused, so I just wanted something simple. It worked for me so I thought I'd share.
No plans on coding at all, I just get curious on how things work.
I also finally figured out how to add an option to the right click menu and now I can right click files and have them uploaded to my website via curl. Quick and simple
_________________ trapster
Maine, USA
HP N5250
Booting:
Frugal install:Puppy2.16, Puppy3.0 Retro, Puppy4.00, Puppy4.10 + WindowsMe
Currently using Puppy4.10 w/ Fluxbox
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 10610
|
Posted: Tue 19 Feb 2008, 12:49 Post subject:
|
|
| trapster wrote: |
What zip icon???
|
I am in Lassie and maybe has a different name in some Puppys
but is usually on the right of the screen . . .
| Description |
|
| Filesize |
2.81 KB |
| Viewed |
435 Time(s) |

|
_________________ "Woofy" Puppy 4.4 the next release . . . in development read all about it 
|
|
Back to top
|
|
 |
trapster

Joined: 28 Nov 2005 Posts: 1543 Location: Maine, USA
|
Posted: Tue 19 Feb 2008, 20:03 Post subject:
|
|
Updated to Parchive-.0.1
See first post
_________________ trapster
Maine, USA
HP N5250
Booting:
Frugal install:Puppy2.16, Puppy3.0 Retro, Puppy4.00, Puppy4.10 + WindowsMe
Currently using Puppy4.10 w/ Fluxbox
|
|
Back to top
|
|
 |
maddox
Joined: 28 Sep 2007 Posts: 421 Location: France
|
Posted: Wed 20 Feb 2008, 19:17 Post subject:
|
|
Hi trapster,
am I on the right track.. with the loop ?
Thanks for your work
|
|
Back to top
|
|
 |
trapster

Joined: 28 Nov 2005 Posts: 1543 Location: Maine, USA
|
Posted: Sat 23 Feb 2008, 13:51 Post subject:
|
|
Updated to Parchive.0.2
_________________ trapster
Maine, USA
HP N5250
Booting:
Frugal install:Puppy2.16, Puppy3.0 Retro, Puppy4.00, Puppy4.10 + WindowsMe
Currently using Puppy4.10 w/ Fluxbox
|
|
Back to top
|
|
 |
|