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!
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!