Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy home page: puppylinux.com
 
 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 Tue 09 Feb 2010, 08:36
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff)
Parchive-.0.2
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
trapster


Joined: 28 Nov 2005
Posts: 1650
Location: Maine, USA

PostPosted: Sun 17 Feb 2008, 14:30    Post_subject:  Parchive-.0.2
Sub_title: 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"
Parchive-.0.2.pet
Description 
pet

 Download 
Filename  Parchive-.0.2.pet 
Filesize  5.01 KB 
Downloaded  143 Time(s) 

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install:Puppeee4.31, Puppy3.0 Retro, Puppy4.10, Slitaz
Currently using Puppeee4.31 w/ wmii

Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
Dingo


Joined: 11 Dec 2007
Posts: 922

PostPosted: 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
View user's profile Send_private_message Send_email Visit_website 
maddox

Joined: 28 Sep 2007
Posts: 424
Location: in France

PostPosted: Sun 17 Feb 2008, 19:29    Post_subject:  

Hi trapster,
tried your prog, neat, small & simple Smile

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
View user's profile Send_private_message 
trapster


Joined: 28 Nov 2005
Posts: 1650
Location: Maine, USA

PostPosted: 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 Laughing Laughing Laughing Laughing Laughing

I have no clue (at the moment) how to do that. Am willing for suggestions.

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install:Puppeee4.31, Puppy3.0 Retro, Puppy4.10, Slitaz
Currently using Puppeee4.31 w/ wmii
Back to top
View user's profile Send_private_message Visit_website 
maddox

Joined: 28 Sep 2007
Posts: 424
Location: in France

PostPosted: 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
View user's profile Send_private_message 
trapster


Joined: 28 Nov 2005
Posts: 1650
Location: Maine, USA

PostPosted: 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.
Laughing Laughing Laughing Laughing Embarassed

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install:Puppeee4.31, Puppy3.0 Retro, Puppy4.10, Slitaz
Currently using Puppeee4.31 w/ wmii
Back to top
View user's profile Send_private_message Visit_website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 10943

PostPosted: Tue 19 Feb 2008, 09:29    Post_subject:  

Well done nice clean code Smile
Useful for doing backups (I am told this is something one should do) Wink

You can also I believe, just drag directories to the zip icon
Do you feel your code has any advantages? Smile

How long did it take you to code? Do you have any future code plans? Smile

_________________
Experimental Unofficial Puppy 4.3.2 Built by Barry Kauler Woof Powered test NOW
Back to top
View user's profile Send_private_message Send_email Visit_website 
trapster


Joined: 28 Nov 2005
Posts: 1650
Location: Maine, USA

PostPosted: 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??? Confused
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

Asus eeepc 1005HA PU1X-BK
Frugal install:Puppeee4.31, Puppy3.0 Retro, Puppy4.10, Slitaz
Currently using Puppeee4.31 w/ wmii
Back to top
View user's profile Send_private_message Visit_website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 10943

PostPosted: Tue 19 Feb 2008, 12:49    Post_subject:  

trapster wrote:

What zip icon??? Confused


Embarassed I am in Lassie and maybe has a different name in some Puppys
but is usually on the right of the screen . . .
zip.jpg
 Description   
 Filesize   2.81 KB
 Viewed   495 Time(s)

zip.jpg


_________________
Experimental Unofficial Puppy 4.3.2 Built by Barry Kauler Woof Powered test NOW
Back to top
View user's profile Send_private_message Send_email Visit_website 
trapster


Joined: 28 Nov 2005
Posts: 1650
Location: Maine, USA

PostPosted: Tue 19 Feb 2008, 20:03    Post_subject:  

Updated to Parchive-.0.1
See first post

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install:Puppeee4.31, Puppy3.0 Retro, Puppy4.10, Slitaz
Currently using Puppeee4.31 w/ wmii
Back to top
View user's profile Send_private_message Visit_website 
maddox

Joined: 28 Sep 2007
Posts: 424
Location: in France

PostPosted: 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
View user's profile Send_private_message 
trapster


Joined: 28 Nov 2005
Posts: 1650
Location: Maine, USA

PostPosted: Sat 23 Feb 2008, 13:51    Post_subject:  

Updated to Parchive.0.2
_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install:Puppeee4.31, Puppy3.0 Retro, Puppy4.10, Slitaz
Currently using Puppeee4.31 w/ wmii
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff)
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
hot copy
[ Time: 0.2629s ][ Queries: 9 (0.0058s) ][ Debug on ]