Finding Family-tree of images

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Finding Family-tree of images

HwaJong Oh
I have a hibbit of saving new version of images when i feed unsecure about something. So i end up a lot of disk space taken by them. I felt it is time for me to clean up the redundance in my disk. I wanted to have a sense of family tree of the images.

l := (FileStream fileNamed:'Squeak4.0-basic-pocketcube-morphic.changes') contents lines.

s := l select: [:each| each beginsWith: '----SNAPSHOT----'].

i := OrderedCollection new.
(s collect: [:ea| ea substrings at: 7 ]) do: [:e|
        (i includes: e) ifFalse: [i addLast: e.].
        ].
i

Now i have images names in time order. But still i need to run this code on every images not listed in evaluated result.

How do you handle this problem?

Best regards
HwaJong Oh
Reply | Threaded
Open this post in threaded view
|

Re: Finding Family-tree of images

Igor Stasenko
On 11 November 2010 02:01, HwaJong Oh <[hidden email]> wrote:

>
> I have a hibbit of saving new version of images when i feed unsecure about
> something. So i end up a lot of disk space taken by them. I felt it is time
> for me to clean up the redundance in my disk. I wanted to have a sense of
> family tree of the images.
>
> l := (FileStream fileNamed:'Squeak4.0-basic-pocketcube-morphic.changes')
> contents lines.
>
> s := l select: [:each| each beginsWith: '----SNAPSHOT----'].
>
> i := OrderedCollection new.
> (s collect: [:ea| ea substrings at: 7 ]) do: [:e|
>        (i includes: e) ifFalse: [i addLast: e.].
>        ].
> i
>
> Now i have images names in time order. But still i need to run this code on
> every images not listed in evaluated result.
>
> How do you handle this problem?
>
you could use a file directory to find all .changes files
and then simply scan them like above.

> Best regards
> HwaJong Oh
> --
> View this message in context: http://forum.world.st/Finding-Family-tree-of-images-tp3037106p3037106.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
>



--
Best regards,
Igor Stasenko AKA sig.