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 Sun 25 Aug 2019, 07:26
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
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 [12 Posts]  
Author Message
trapster


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

PostPosted: 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"
Parchive-.0.2.pet
Description 
pet

 Download 
Filename  Parchive-.0.2.pet 
Filesize  5 KB 
Downloaded  228 Time(s) 

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

Last edited by trapster on Sun 18 Dec 2011, 09:41; edited 6 times in total
Back to top
View user's profile Send private message Visit poster's website 
Dingo


Joined: 11 Dec 2007
Posts: 1439
Location: somewhere at the end of rainbow...

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

_________________
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux
Back to top
View user's profile Send private message Visit poster's website 
maddox

Joined: 28 Sep 2007
Posts: 456
Location: sometimes 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: 2119
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: Slacko
Currently using full install: DebianDog
Back to top
View user's profile Send private message Visit poster's website 
maddox

Joined: 28 Sep 2007
Posts: 456
Location: sometimes 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: 2119
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: Slacko
Currently using full install: DebianDog
Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15463
Location: Paradox Realm

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

_________________
Raspberry Pi 4 to run Puppi
NEW Slackware Current ScPup 32 and 64bit
Back to top
View user's profile Send private message Visit poster's website 
trapster


Joined: 28 Nov 2005
Posts: 2119
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: Slacko
Currently using full install: DebianDog
Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15463
Location: Paradox Realm

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   1383 Time(s)

zip.jpg


_________________
Raspberry Pi 4 to run Puppi
NEW Slackware Current ScPup 32 and 64bit
Back to top
View user's profile Send private message Visit poster's website 
trapster


Joined: 28 Nov 2005
Posts: 2119
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: Slacko
Currently using full install: DebianDog
Back to top
View user's profile Send private message Visit poster's website 
maddox

Joined: 28 Sep 2007
Posts: 456
Location: sometimes 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: 2119
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: Slacko
Currently using full install: DebianDog
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [12 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
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.0498s ][ Queries: 12 (0.0073s) ][ GZIP on ]