How to automate extracting Puppy wallpapers?
How to automate extracting Puppy wallpapers?
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
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
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
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
Re: archiving puppy wallpapers
ally wrote:Trouble is I have over 2850 puppys
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.
HTH
Greetings!
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: Select all
#!/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
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]
[b][color=green]Omnia mea mecum porto.[/color][/b]
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)
(BTW SFR's looks fine to me)
Code: Select all
#!/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
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
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 Works perfectly!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.
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.
.#!/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, 07:46, edited 1 time in total.
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/
http://puppy.b0x.me/gallery/
EDIT: Or, wget them all from http://puppy.b0x.me/gallery/pictures/
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]
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....)
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....)
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/ ... 39ds9h.png
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/ ... 39ds9h.png
Here's some code, but I'm not sure if this is exactly what you want...ally wrote:ie ISO_default (4.3.2.V3_default.jpg)
Just define (WALLDIR=) where all previously extracted wallpapers are and (OUTDIR=) where all default.* ones should be copied.
For example: default.gif from 214X-top10 subdirectory will be copied to OUTDIR as 214X-top10_default.gif.
Code: Select all
#!/bin/sh
# Customize these:
WALLDIR="/root/Wallpapers_from_ISOs"
OUTDIR="/root/All_Default_Wallpapers"
# -----------------------------------------------------------------------------
cd "$WALLDIR" || return 1
mkdir -p "$OUTDIR" || return 1
for SUBDIR in *; do
find "$SUBDIR" -type f -iname "default.*" | while read DEFAULT; do
NAMEONLY="$(basename "$DEFAULT")"
cp -v "${DEFAULT}" "${OUTDIR}/${SUBDIR}_${NAMEONLY}"
done
done
[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]
[b][color=green]Omnia mea mecum porto.[/color][/b]