updated "resize pupsave" in Xdialog

Under development: PCMCIA, wireless, etc.
Message
Author
big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

updated "resize pupsave" in Xdialog

#1 Post 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
Attachments
resizepfile.sh.tar.gz
(2.16 KiB) Downloaded 1419 times
new error message.png
(24.76 KiB) Downloaded 4491 times
old error message.png
(10.34 KiB) Downloaded 4367 times
new.png
(57.93 KiB) Downloaded 4717 times
old.png
(15.9 KiB) Downloaded 4191 times

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

#2 Post by ttuuxxx »

very nice Joe :) excellent job
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post 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 . . .
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

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

#4 Post by ttuuxxx »

here ya go lobster :)
Usually I make a 16GB pupsave, and copy it, so I can quickly start fresh for compiling :)
ttuuxxx
Attachments
resizepfile-0.01.pet
(2.36 KiB) Downloaded 1408 times
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

Jasper

#5 Post 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

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

#6 Post 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
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

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

#7 Post 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
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#8 Post 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
Attachments
resizepfile-bigger.tar.gz
(2.21 KiB) Downloaded 1318 times
bigger.png
(20.16 KiB) Downloaded 4259 times

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#9 Post by amigo »

Why not have a selection: 'Input custom size', which would open an inputbox to let the user input any size?

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

#10 Post by ttuuxxx »

Thanks joe, I'll use :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
nitehawk
Posts: 658
Joined: Sun 13 Apr 2008, 22:30
Location: West Central Florida

#11 Post by nitehawk »

...thanks! Bigger save file works great with Quirky 1.4!

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#12 Post 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

stu90

#13 Post 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.
Attachments
resizepfile.sh.gz
(1.61 KiB) Downloaded 1141 times

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#14 Post 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

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#15 Post 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.

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#16 Post 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.

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

resizepfile-0.1.2

#17 Post 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,
Attachments
resizepfile-0.1.2_20130624.pet
md5 fb3dd4644175a5be2d4c685b0fa14cd9
(8.29 KiB) Downloaded 624 times
resizepfile_help_gui.jpg
(37.66 KiB) Downloaded 816 times
resizepfile_main_gui.jpg
(27.47 KiB) Downloaded 884 times

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#18 Post 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)" \

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#19 Post 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!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#20 Post 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
Attachments
invalid number.jpg
(28.71 KiB) Downloaded 722 times

Post Reply