Page 1 of 2

updated "resize pupsave" in Xdialog

Posted: Sun 06 Mar 2011, 04:13
by big_bass
I updated the retro look of the resizing of pupsave

*I placed this in programming to have an example using Xdialog

resizepfile.sh in /usr/sbin

it was originally written in xmessage
I updated it to Xdialog

I kept it about 98% the same in the menu messages to keep things familiar
the coding with Xdialog is very different though
I didnt go crazy with a total re write just an update


I added 1GB and a 2 GB options and removed the very small 16M and 32MB ones

testers and feed back /hacking welcomed
Joe

Posted: Sun 06 Mar 2011, 07:03
by ttuuxxx
very nice Joe :) excellent job
ttuuxxx

Posted: Sun 06 Mar 2011, 08:47
by Lobster
Hope ttuuxxx is preparing a pet for us quiche eaters . . .
I hope the feature freeze in Lucid 5.2.2 can be de-iced . . .

I regularly go for the max 1 gig and will be glad to go up to 2 Gig as standard.
Thanks Joe look forward to using this . . .

Posted: Sun 06 Mar 2011, 09:28
by ttuuxxx
here ya go lobster :)
Usually I make a 16GB pupsave, and copy it, so I can quickly start fresh for compiling :)
ttuuxxx

Posted: Sun 06 Mar 2011, 11:19
by Jasper
Hi,

This is interesting in that it seems that the reported possible 1.8 GB size limit for a save file must be obsolete, but:

(a) is there a new upper limit?
(b) can the pet be be used in any Puppy?
(c) if an existing save file of say, size 1 GB with 512 MB (50%) used is increased to 2 GB (with still only 512 MB used) - how (if at all) is that likely to affect boot time?

My regards

Posted: Sun 06 Mar 2011, 11:28
by ttuuxxx
Jasper wrote:Hi,

This is interesting in that it seems that the reported possible 1.8 GB size limit for a save file must be obsolete, but:

(a) is there a new upper limit?
(b) can the pet be be used in any Puppy?
(c) if an existing save file of say, size 1 GB with 512 MB (50%) used is increased to 2 GB (with still only 512 MB used) - how (if at all) is that likely to affect boot time?

My regards
I've been doing it for years, actually I did make larger selection using the older xmessage in early 4 series, but some people acted like it was a bad thing, I never had an issue, The largest pupsave I've made was 35GB. Some people had said make sure your only doing this to ext3 & ext4. I only have made them in ext3. Its worked from 2 series and up. Never tried it on 1 series :)
I guess way back when, one person made a negative report on it and it spread like wildfire. I would say before 2006, and the idea was dropped, around 2008 I was bored and went nuts of the pupsave size. Never looked back and never had an issue with it.
ttuuxxx

Posted: Sun 06 Mar 2011, 11:33
by ttuuxxx
Jasper wrote:Hi,

This is interesting in that it seems that the reported possible 1.8 GB size limit for a save file must be obsolete, but:

(a) is there a new upper limit? I usually just set an aditional 512mb then go to the directory and you'll see a pupsave document with size in it, I usually add a 10 infront of the number so on next reboot I get a 10.5GB pupsave :)
(b) can the pet be be used in any Puppy? I would say Yes
(c) if an existing save file of say, size 1 GB with 512 MB (50%) used is increased to 2 GB (with still only 512 MB used) - how (if at all) is that likely to affect boot time? the larger the pupsave the slower the boot, but from 512mb to 2 gb, is just a few seconds extra.

My regards

Posted: Sun 06 Mar 2011, 22:50
by big_bass
Hey Jeff this one is made just for you



ttuuxxx
The largest pupsave I've made was 35GB
I do believe thats a worlds record that will last a long time



Joe

Posted: Mon 07 Mar 2011, 07:58
by amigo
Why not have a selection: 'Input custom size', which would open an inputbox to let the user input any size?

Posted: Mon 07 Mar 2011, 08:37
by ttuuxxx
Thanks joe, I'll use :)
ttuuxxx

Posted: Tue 08 Mar 2011, 01:26
by nitehawk
...thanks! Bigger save file works great with Quirky 1.4!

Posted: Fri 11 Mar 2011, 16:54
by big_bass
if you want a packaged version with a new menu icon 8GB version
http://www.puppy2.org/slaxer/resizepfile-1-4_SLXR.tgz

Posted: Mon 04 Jul 2011, 14:06
by stu90
Hello,
Here is a Yad version of rezisepfile.sh - i rearranged the main GUI a little bit and bumped max save file size to 3GB.

Image

thanks.

Posted: Sun 10 Jul 2011, 16:57
by big_bass
stu90
thanks for the yad example
I didnt comment earlier because
I had a gtk2 problem compiling yad to test this

thanks for another code example using yad
Joe

Posted: Sat 23 Jul 2011, 10:27
by ASRI éducation
big_bass wrote:Hey Jeff this one is made just for you
I think Jeff will not alone to use your script.
Thanks Joe.

Posted: Wed 12 Sep 2012, 17:02
by Argolance
Hello,
All these scripts are very interesting and useful indeed...
The original one was internationalized by rodin.s and it is really a pity that none of them were "gettexted" according to the existing mo files...

Please feel sorry for poor guys who don't speak English: don't forget them!

Cordialement.

resizepfile-0.1.2

Posted: Mon 24 Jun 2013, 19:32
by ASRI éducation
I propose a new version of resizepfile script.
I based the new script on big_bass release (http://www.murga-linux.com/puppy/viewto ... 398#501398) and changes proposed by Don570 (http://murga-linux.com/puppy/viewtopic.php?p=640850).

Changes/new features :
- Added two files: 'version-author' and 'settings'. This allows you to change information/preferences without changing the main script.
- Modification/simplification of main script 'resizepfile.sh'.
- Changing the main GUI (and adding a 'Help' GUI).
- Translation: I used Zigbert method to simplify the development of the script. If necessary, we can use files .mo in future versions. Currently, I have only integrated the local 'en', I will add other local when the script has been tested/approved by users and contributors.

To do
- Check/test/improve the current script.
- Check/test/improve translation 'en'.
- Help me solve a small bug (see next post).

Sincerely,

Posted: Mon 24 Jun 2013, 19:39
by ASRI éducation
resizepfile-0.1.2
I added to the main GUI information in GB.
Currently, this simple division gives the result that integers.
I would like to figure a comma (two decimal places).
I tried to add a scale=2. I also tested bc. But I it does not work.
If anyone can help me...

Code: Select all

"$Size01" "$LOC317     ($(($Size01/1024)) $LOC322)" \

Posted: Mon 24 Jun 2013, 20:30
by SFR
Hey ASRI, bc works ok for me:

Code: Select all

# bc <<< "scale=2; 128/1024"
.12
#
# bc -l <<< "128/1024"
.12500000000000000000
#
Also, bc+printf:

Code: Select all

# printf '%.2f\n' $(bc -l <<< "128/1024")
0.12
#

Code: Select all

"$Size01" "$LOC317     ($(printf '%.2f' $(bc -l <<< "$Size01/1024")) $LOC322)" \
HTH
Greetings!

Posted: Mon 24 Jun 2013, 20:54
by ASRI éducation
Hello SFR and thank you for your help.

I just tried with a base Lucid528

Code: Select all

#### Main GUI
echo "Main GUI"
Xdialog --title "$AppTitle $AppVersion" --left --wrap --help "$HelpMsg"  \
--menu "$LOC250" 0 85 9 \
"$Size01" "$LOC317     ($(printf '%.2f' $(bc -l <<< "$Size01/1024")) $LOC322)" \
"$Size02" "$LOC317     ($(printf '%.2f' $(bc -l <<< "$Size02/1024")) $LOC322)" \
"$Size03" "$LOC317     ($(printf '%.2f' $(bc -l <<< "$Size03/1024")) $LOC322)" \
"$Size04" "$LOC317     ($(printf '%.2f' $(bc -l <<< "$Size04/1024")) $LOC322)" \
"$Size05" "$LOC317     ($(printf '%.2f' $(bc -l <<< "$Size05/1024")) $LOC322)" \
"$Size06" "$LOC317     ($(printf '%.2f' $(bc -l <<< "$Size06/1024")) $LOC322)" \
"$Size07" "$LOC317     ($(printf '%.2f' $(bc -l <<< "$Size07/1024")) $LOC322)" \
"$Size08" "$LOC317     ($(printf '%.2f' $(bc -l <<< "$Size08/1024")) $LOC322)"  2> /tmp/reply2
In terminal :

Code: Select all

Get Language Settings

Check pupmode
Check if undetected pupsave
Definition of variables
HelpMsg
Main GUI
/usr/local/resizepfile/resizepfile.sh: line 95: printf: .06250000000000000000: invalid number
/usr/local/resizepfile/resizepfile.sh: line 95: printf: .12500000000000000000: invalid number
/usr/local/resizepfile/resizepfile.sh: line 95: printf: .25000000000000000000: invalid number
/usr/local/resizepfile/resizepfile.sh: line 95: printf: .50000000000000000000: invalid number
/usr/local/resizepfile/resizepfile.sh: line 95: printf: 1.00000000000000000000: invalid number
/usr/local/resizepfile/resizepfile.sh: line 95: printf: 2.00000000000000000000: invalid number
/usr/local/resizepfile/resizepfile.sh: line 95: printf: 4.00000000000000000000: invalid number
/usr/local/resizepfile/resizepfile.sh: line 95: printf: 8.00000000000000000000: invalid number
invalide number = false information in GUI :(
If you have an idea...
:D