(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 26 Feb 2021, 18:10
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to automate extracting Puppy wallpapers?
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 2 [19 Posts]   Goto page: 1, 2 Next
Author Message
ally


Joined: 19 May 2012
Posts: 1983
Location: lincoln, uk

PostPosted: Sat 07 Feb 2015, 23:21    Post subject:  How to automate extracting Puppy wallpapers?
Subject description: Extract them from Puppy iso/sfs, then put them in archive.org
 

OK boys and girls

Had an idea to put puppy wallpapers up on archive.org for sharing and posterity

Trouble is I have over 2850 puppys and would rather not do it all manually if I can avoid it.....!

I'm sadly completely unable to code but wondered if the process could be automated to chug through my collection expand the iso, copy the wallpapers and place them in a folder consisting of the iso name

If anybody can help I'd be grateful

Smile
Back to top
View user's profile Send private message Visit poster's website 
Semme


Joined: 07 Aug 2011
Posts: 8427
Location: World_Hub

PostPosted: Sun 08 Feb 2015, 15:47    Post subject:  

Although I think your post should outline your desires in greater detail.. PING >> Cool SFR! Hang in there Ally..
_________________
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<
Back to top
View user's profile Send private message 
ally


Joined: 19 May 2012
Posts: 1983
Location: lincoln, uk

PostPosted: Sun 08 Feb 2015, 19:48    Post subject:  

thanks semme

I have the puppy iso's (and img.xz) files on a 1Tb ext4 hdd

I would like to retrieve the wallpaper files from the iso's. I have done this manually by clicking the iso to expand the file system, finding the wallpaper locations and copy them, clicking the iso again to close it

so I can catalogue the files I would like to collected wallpaper images placed into a folder of the iso names (ie slacko-5.3.3)

then repeat for the rest of the iso's on the drive

Smile
Back to top
View user's profile Send private message Visit poster's website 
ebisu

Joined: 25 Sep 2013
Posts: 176

PostPosted: Mon 09 Feb 2015, 03:16    Post subject: Re: archiving puppy wallpapers
Subject description: help needed
 

ally wrote:
Trouble is I have over 2850 puppys
Shocked
Back to top
View user's profile Send private message 
ally


Joined: 19 May 2012
Posts: 1983
Location: lincoln, uk

PostPosted: Mon 09 Feb 2015, 03:18    Post subject:  

I know!!

There is some lovely artwork buried away in these. Will do it manually if I have to. It took over a year to upload the bulk of the puppy builds doing some every day

Smile
Back to top
View user's profile Send private message Visit poster's website 
SFR


Joined: 26 Oct 2011
Posts: 1802

PostPosted: Mon 09 Feb 2015, 05:31    Post subject:  

This is only for ISO/SFS pair and won't work with img.xz or e.g. FatDog, which has .sfs inside of initrd.

Works simple - finds all the ISOs in defined path, mounts them one by one and extracts /usr/share/backgrounds/ dir from all found SFSes.

Code:
#!/bin/sh

# Customize these variables:
OUTDIR="/root/Wallpapers_from_ISOs"
ISODIR="/path/to/your/ISO/collection"

# -----------------------------------------------------------------------------

ISOMNTPT="/tmp/iso_mntpt_${$}"
mkdir -p "$OUTDIR"
mkdir -p "$ISOMNTPT"

trap 'umount "$ISOMNTPT" 2>/dev/null; rmdir "$ISOMNTPT"' EXIT

# -----------------------------------------------------------------------------

find "$ISODIR" -type f -iname "*.iso" | while read -r ISO; do
  mount -o,ro "$ISO" "$ISOMNTPT"
  mkdir -p "$OUTDIR/$(basename "${ISO%.*}")"
  find "$ISOMNTPT" -type f -iname "*.sfs" | while read -r SFS; do
    unsquashfs -f -d "$OUTDIR/$(basename "${ISO%.*}")" "$SFS" "/usr/share/backgrounds"
  done
  umount "$ISOMNTPT"
done

# Uncomment this if you want to delete empty subdirectories in OUTDIR:
#find "$OUTDIR" -type d -empty -delete

exit

HTH
Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
ally


Joined: 19 May 2012
Posts: 1983
Location: lincoln, uk

PostPosted: Mon 09 Feb 2015, 05:33    Post subject:  

Sweet. Many thanks

Will report back soon

Smile
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Mon 09 Feb 2015, 05:38    Post subject:  

SFR beat me to it, but since i did it, here it is. I use filemnt to have some visuall info that things are going on as it may take some time for 3000 isos!
(BTW SFR's looks fine to me)

Code:
#!/bin/sh

ISOFOLDER= # Type full path to where your ISOs are ie /mnt/home/Puppy_ISOs
ARTFOLDER= # Type full path to where you want the backgrounds saved

mkdir -p /tmp/ISO_SFS

for I in $(ls $ISOFOLDER/*.iso)
do
   filemnt $I
   ISO=$(echo "$I"|rev| cut -f1 -d '/'| rev)
   IPATH=$(df | grep "$ISO"| awk '{print $6}')
   SFS=$(ls "$IPATH"/*puppy*.sfs)
   # If the puppy SFS does not have 'puppy' in its name, the above will fail
   mount -o loop  "$SFS" /tmp/ISO_SFS
    cp -afR /tmp/ISO_SFS/usr/share/backgrounds $ARTFOLDER/"$ISO"_backgrounds
    # Remove ' "$ISO"_ ' part in the line above if you want all backgrounds in the same folder. Same names will be overwriten
    sync
    umount /tmp/ISO_SFS
   filemnt $I   
done

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Mon 09 Feb 2015, 08:27    Post subject:  

SFR wrote:
This is only for ISO/SFS pair and won't work with img.xz or e.g. FatDog, which has .sfs inside of initrd.
But it works even with old Puppies, which would normally spoil my day with a "NOTICE: This is an older version 3.x squashfs file, not usable...bla...bla". I just extracted wallpapers from a Puppy 2.14 Laughing Works perfectly!

The only thing I would wish is to have all extracted images at the root of each individual output directory and not in individual /usr/share/backgrounds directories, so I amended the code slightly.
Quote:
#!/bin/sh

# Customize these variables:
OUTDIR="/root/Wallpapers_from_ISOs"
ISODIR="/path/to/your/ISO/collection"

# -----------------------------------------------------------------------------

ISOMNTPT="/tmp/iso_mntpt_${$}"
mkdir -p "$OUTDIR"
mkdir -p "$ISOMNTPT"

trap 'umount "$ISOMNTPT" 2>/dev/null; rmdir "$ISOMNTPT"' EXIT

# -----------------------------------------------------------------------------

find "$ISODIR" -type f -iname "*.iso" | while read -r ISO; do
mount -o,ro "$ISO" "$ISOMNTPT"
OUTSUBDIR="$OUTDIR/$(basename "${ISO%.*}")"
mkdir -p "$OUTSUBDIR"
find "$ISOMNTPT" -type f -iname "*.sfs" | while read -r SFS; do
unsquashfs -f -d "$OUTSUBDIR" "$SFS" "/usr/share/backgrounds"
mv "$OUTSUBDIR"/usr/share/backgrounds/* "$OUTSUBDIR" 2>/dev/null
done
umount "$ISOMNTPT"
done
find "$OUTDIR" -type d -empty -delete
exit


.

Last edited by MochiMoppel on Tue 10 Feb 2015, 03:46; edited 1 time in total
Back to top
View user's profile Send private message 
dejan555


Joined: 30 Nov 2008
Posts: 2817
Location: Montenegro

PostPosted: Mon 09 Feb 2015, 08:42    Post subject:  

I can zip all the wallpapers and artwork from my site and put them up somewhere as one archive if you want to, up to some point I was following the puppy wallpapers thread and some other artwork threads and made a gallery here

http://puppy.b0x.me/gallery/

EDIT: Or, wget them all from http://puppy.b0x.me/gallery/pictures/

_________________
puppy.b0x.me stuff mirrored HERE or HERE
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ally


Joined: 19 May 2012
Posts: 1983
Location: lincoln, uk

PostPosted: Tue 10 Feb 2015, 06:34    Post subject:  

sorry for the delay, not well yesterday

currently running SFR's script (mavrothal, many ISOs just have pup_*** as sfs names)

it's been running about 5 mins and half way through - NICE!

deejan

I have been unable to wget your files (wget -nd -r --no-parent -A.jpg your url)?

thanks all

Smile
Back to top
View user's profile Send private message Visit poster's website 
ally


Joined: 19 May 2012
Posts: 1983
Location: lincoln, uk

PostPosted: Tue 10 Feb 2015, 06:58    Post subject:  

sorry, me again.....

the script worked very well with 2238/2994 files opened, tbh I had forgotten I have some deltas in there for building ISOs where they have not been published yet, the early early puppy builds and the non-ISO pups so chuffed

I am considering one archive with all the images in ~3gig and also uploading to each of the puppy directories

however each puppy has a 'default' image so when copying in to one directory it's get lost as there is already a default in there so I have started manually copying the ISO name and adding it to the default name

ie ISO_default (4.3.2.V3_default.jpg)

it's script wanting time again please (sorry for the lack of skills again - it is a source of constant embarrassment....)

Smile
Back to top
View user's profile Send private message Visit poster's website 
ally


Joined: 19 May 2012
Posts: 1983
Location: lincoln, uk

PostPosted: Tue 10 Feb 2015, 07:01    Post subject:  

@deejan

solved the wget using http://puppy.b0x.me/gallery/pictures

cheers

Smile
Back to top
View user's profile Send private message Visit poster's website 
dejan555


Joined: 30 Nov 2008
Posts: 2817
Location: Montenegro

PostPosted: Tue 10 Feb 2015, 10:02    Post subject:  

Be sure to include -A.png in wget too, there might be some gifs too...
_________________
puppy.b0x.me stuff mirrored HERE or HERE
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ally


Joined: 19 May 2012
Posts: 1983
Location: lincoln, uk

PostPosted: Tue 10 Feb 2015, 10:06    Post subject:  

thanks deejan I did

this is fun, just found some on deviant art including puppy 4 cloud for phone wallpaper - feakin cool

http://th03.deviantart.net/fs70/200H/f/2011/043/0/1/puppy_iphone_wallpaper_by_lostprophetslaw-d39ds9h.png

Smile
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [19 Posts]   Goto page: 1, 2 Next
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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.1035s ][ Queries: 11 (0.0553s) ][ GZIP on ]