Mac Help Forums


Reply
Thread Tools Display Modes

Replicate, Change and Save As

 
New Member
Join Date: Sep 2011
Posts: 1
 
      22nd September 2011
Hi all,
I'm kind of new to Automator and I think I've got a bit of a mountain to climb here. I seriously need help! Not even sure if Automator can do this or if it'll be AppleScript but here goes...
I have a website. This website needs to have different pages for every town in the UK. I have a template php page for this and inside this template page is a line of code ending with a bracketed number, like [0]. This bracketed number corresponds with a town name on a spreadsheet I have. The spreadsheet is simple. Column A has the town names. Column B has numbers, simply 1, 2, 3, etc. So, for example, Aberdeen = 1, Abergele = 2, and so on.
What I need to do is create a workflow which opens the template php page, finds the bracketed number, changes the number up one, then looks at the spreadsheet, finds the corresponding town name to that number and then saves the template with that town name as the filename and with a php extension.
So I will end up with a folder populated with a couple of thousand files, each with a unique filename of a town name and each with it's own unique bracketed number.
I need the option to browse to all variables (template file, spreadsheet, containing folder and destination folder) but only in the first instance. Not for every 'save as' action.
I'm not really sure of the best way forward. Would repeatedly using the template file for every 'save as' cause problems for replacing the number as there would be no trail of numbers to check against? Or would it be better to open the template to start and then use some kind of count function, building up each time from the last?
I'm pretty stumped!
 
Reply With Quote
 
 
 
 
Senior Member
Kaveman's Avatar
Join Date: Nov 2010
Location: Westland, NZ
Posts: 1,355
 
      22nd September 2011
Don't know much about php.
But this isn't a job for Automator.

I would start by exporting the spreadsheet into a CSV.
Then maybe AppleScript with TextEdit?

Wouldn't it be easier to mod the php to read the CSV???

this sounds trivial but it's not.

How often does this need doing?
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
when I change background to black with white letters - do I save energy on that ? Horst Krug iPad 3 6th November 2011 01:40 AM
Where's "Save" and "Save As" in iWork Pages under Lion? Null Apps 18 16th August 2011 04:25 PM
Why Doesn't "Change All" change them all? Dave Misc 3 4th July 2007 02:07 PM
Save vs Save As vs Reduce File Size for PDFs in Acrobat? AES Apps 2 3rd September 2006 09:03 AM
Printer Issues - Change AD Password - Can't Change Printer Settings onPanther Aaldkh Asdlklkh Printing 0 5th October 2004 01:30 AM


All times are GMT +1. The time now is 01:54 PM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
PDF Document
yura (1 Hour Ago, 12:13 PM)

Difficulties with internet speed (nothing to do with connection)
sammethh (7 Hours Ago, 06:36 AM)

Deleting a homepage/website form my mac book pro
rgandajg (15 Hours Ago, 10:30 PM)

MacBook
basil422 (19 Hours Ago, 06:01 PM)

Outlook reminders not popping up
WonderBot (20 Hours Ago, 05:03 PM)

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51