Jump to content
dmrsunz

Using Automator as Cleanitol

15 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Has anybody with modest "programming" skills tried to mimic the functionality of the handy Cleanitol Windows app using Automator? I just cut each of a long list of items from a cleanitol .txt file one-by-one into an Automator script which looked for the file then put it in the Trash. Now if I could just figure out how to get Automator to read the .txt for itself, and automatically enter each line in Automator's search text, then run the search and trash steps we'd be home free. I'm not too bright about this type of thing but it certainly seems doable. Anybody know of any reason it couldn't be done? Better yet, anybody want to create the script and make it available to the STEX Mac community?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Well, tell me. What does the cleanitol file do. What is it. And why is it important.

I was trying to make an Automator application that could be used as an installer, like the windows installer, so it can be used for things like the NAM ect.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

A Cleanitol file is simply a text document with a list of names of files that the Cleanitol finds in your plugins folders (both of them) and then moves into a back-up folder. It's nothing more than a list of files.

The one that cleans the plugins of unnecessary files (like pictures and readmes) is simply a list of file types (.jpg, .txt, etc.).

Of course, cleaning out your plugins folder isn't the only thing that the Cleanitol does...

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Right. Thanks for that explination.

So what would needs to be done in automator is make it find any file that contains .jpg ect.

Ok, just tested a method of cleaning out your plugins folder.

What is needed is to create a workflow starting with:

1 "Get Specified Finder Items"

2 "Get Folder Contents" and check "repeat for each subfolder found"

3 "Filter Finder Items" in the first option file click "File Type" then in the next one "Is" then what types of files you want to get rid of.

4 "Move To Trash"

Then save as application and test it. Although it does not run off the information in a txt file. But it is getting out un-wanted files.

So some more testing of this method will be required, then of course the txt file intergrations.

I used this method and was able to remove some .jpgs and .txt files from a folder and move them to the trash. I think I might find out more information on how this works and try and get a cleanitol type application going through this method. I think it could be done.

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    The main thing the Cleanitol app does (as far as I know) is to find and remove old files that are now part of, say, a MEGA Prop or Texture pack. That's the thing I wanted to do and now have done with Automator. The Cleanitol file that comes with a download is merely a text file that lists files that should be removed. The PC Cleanitol app finds and trashes those files. The Automator file I now have (thanks to red_menace at the Apple forums) does just that. If anybody else would find this useful let me know and I'll make it available. As for jpegs and text files associated with readmes, and general plugin maintenance, I have found an app called zsCompare (Lite Edition) to be very useful. I now have what I call a Plugin "Warehouse" that stores all files associated with a plugin including optional and readme files, then I have my Plugins folder. I run zsCompare before I load SC4 and use it to copy just the required files into the Plugins folder. Of course that means I have copies of lots of files, but these days a few hundred meg not a big deal and it makes it easy to swap plugin sets. For instance, if I want to play a rural city I can load my Rural Set, and remove my Urban Set and keep my menus free of stuff I won't be needing.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I read the topic at apples forum.

    I have made an application out of it. Two versions, One for PowerPC users and a universal application, or it could be one for 10.4 downwards and one for 10.5 and upwards. They seem to have different needs for the different operating systems.

    So I will ask now...

    Would many mac users want this?

    If so, would we need to talk to the cleanitol creators before/if we release this.

    I'll attach the files onto this post for you to test them out yourselves. Ok, I'm having trouble trying to attach them as a file. I'll try again latter

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    This is crucial and useful especially with ballooning prop packs/dependencies out there. Am a mac sc4 player and I need it!!! =) I am sure many will be keen too. Thanks to those who made it and cross my fingers for public availability.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    If so, would we need to talk to the Cleanitol creators before/if we release this.quote>

    Why? We are using the text file that the artist's generate and making no use whatsoever of any "intellectual property" of the Cleanitol crew. I wouldn't want to call it "Cleanitol for Mac" so as to avoid creating the illusion of an association between us and the BSC Cleanitol team. However, maybe hamish's version is slicker and maybe speaking to the BSC Team is not a bad idea, so I'll defer to him. In the interim, if anybody wants my version—or rather, red_menace's version—they can PM me.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Oh, well my version is basically the same as yours. I have just added a few more windows to explain what will happen.

    I am going to find out about making proper applications. I have the essential script that is needed, thanks to dmrsunz's "reconnaissance" mission. And I have found some tutorials about application making and will give it a go soon.

    So fingers crossed that I figure something out about making applications.

    If I don't then the automator one dose exactly what we need it to do as well, so we do have a back up.

    And yes, I will talk with the cleanitol creators before we release this, but I don't think we name it cleanitol, of course some recognition would be of them would be good, but lets wait until we have something to show.

    EDIT: ok following some tutorials I was able to make a very simple calculator, it adds and subtracts three from any number. Now I will try and have a look at making a "cleanitol" for mac.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Thanks, hamish. I look forward to your results.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    kevinh456 I am going through the process of seeing if I am able to make it called "Cleanitol". However the member that I need to speak to is on holiday. It shouldn't be too long now.

    Everyone else, I think the automator way is the best and easiest. For a few reasons, you can easily customize it your self; it is not too hard to make; it is made using a native system, ect. Not to long now, I hope.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections