Need help with Automator so I can keep my J-O-B!

Joined
Jul 19, 2008
Messages
4
Reaction score
0
I want to use Automator to streamline the sequence I go through while working.

My job involves:

1. Searching our website with an ID # obtained from a text file
2. Downloading the relevant page (text file) from FTP server
3. Searching the page for ID #
4. Editing the page with script copied from a text file, saving
5. Uploading page to server
6. Verifying the upload was successful and business name and address match by opening that URL (and scrolling down or searching the page)

I repeat this over and over, all day long and they won't give me a new project (or keep me on for that matter) unless I upload at least 40 items per hour. I don't know where the time goes, I guess switching between windows and scanning and double checking... There's gotta be a way I can automate this or at least get specified programs to open after certain actions and make some shortcuts with clipboard items.

I would be so very grateful if someone could assist me with applying Automator! The Mac Geniuses of San Diego hadn't a clue.

Thanks so much
*Babs
 

karazelle

Moderator
Joined
Mar 10, 2006
Messages
238
Reaction score
10
I need to know:
What does that text file typically look like inside? Do you want the text retrieval automated or are you open to dragging and dropping the text file in question on an icon or be prompted to enter it manually?

The downloaded file is available at an URL that is constant in file name and adress and is just a plain text file?

What do you mean with "script copied from a file?"

Some or a lot of this is certainly automatiable, but for the entire workflow you might need 3rd party extensions to Automator or a pure Applescript.

If I am to begin looking at it, I need more details, like content of a typical text file containing ID, what an ID# looks like, content of a typical downloaded file (4-5 lines are good, where the ID is represented). Feel free to create dummy content as long as it reflects the kinds of stuff you need to find/do.

More info on how you typically use to upload to server manually.
 
Joined
Jul 19, 2008
Messages
4
Reaction score
0
Yay! Thanks for your response :)

I'm so ready to simplify and figure this out -- I hope I can be clear enough:

I use:

BBedit for text/html editing
Transmit for FTP uploading/downloading
Safari for web browsing

------------------------------------------------
1) BBedit (Document 1 - heather_ready_2_upload_0806grs_2237-2500.txt)

I have a text file (.txt) open in BBedit with hundreds of listings like this:

2432. AR - Conway - Ramada Inn and Suites - I-40 & US 64 - 10209161 - (e-mail address removed)

<div class=gr><b>Guest review:</b> 4 - Plenty of room to move about
nice hosts lots of room in the bathroom.. not squishy at all.. plenty of room to move and close to food =D
can't think of anything right now - May 08</div>
it was easy


<div class=gr><b>Guest review:</b> Close to restaurants - bathroom was spacious - nice staff - May 2008</div>


I copy the ID # 10209161 and....
------------------------------

2) Safari

paste it into the search field on the website search page -- the address is similar to:

http://motel-finder.com/z-hid-search/search.php

The results page (http://motel-finder.com/z-hid-search/search.php?hid=10209161) gives me this link:

arkansas/conway-ar-hotels.html - (links to page: http://motel-finder.com/arkansas/conway-ar-hotels.html)

-------------------------------------------------

3) Transmit

I go to the "arkansas" folder and then search for the document "conway-ar-hotels.html"

I double-click to download this file to my computer and and control+select it from my list of files (in Transmit) and choose "Edit with BBedit"

------------------------------------------
4) BBedit (Document 2 - conway-ar-hotels.html)

I use the "find" tool and again paste the ID # 10209161 which takes me to the listing I will be working on:

<li class=hl><a href="http://reservations.motel-finder.com/hotel/10006044-10209161O.html" class=hn>Ramada Inn</a> - <span class=cc>$$</span><br>
I-40 & US 64, Conway, AR 72032<br>
Hotel - single-story<br>
Free airport shuttle<br>
No swimming pool - restaurant<br>
<a href=/pet-friendly-hotels.html>Pet friendly hotel - click & read</a> - $20 per stay pet fee - updated Feb 2008<br>
<div class=gr><b>Guest review:</b> Clean, well-run motel - rooms were spacious, had everything I needed - Aug 2006</div>
<div class=gr><b>Guest review:</b> Next to highway on-ramp; I wore earplugs to block out truck noise - clean room had good bed, hair dryer, microwave, and fridge - service was good - continental breakfast was very basic and limited - Mar 2006</div>
<p>

--------------------------------

5) BBedit (Document 1 - heather_ready_2_upload_0806grs_2237-2500.txt)

I go back to my 1st doc and select and copy the guest review:

<div class=gr><b>Guest review:</b> Close to restaurants - bathroom was spacious - nice staff - May 2008</div>

--------------------------------------------
6) BBedit (Document 2 - conway-ar-hotels.html)

I paste the review just before the most recently posted review:

<li class=hl><a href="http://reservations.motel-finder.com/hotel/10006044-10209161O.html" class=hn>Ramada Inn</a> - <span class=cc>$$</span><br>
I-40 & US 64, Conway, AR 72032<br>
Hotel - single-story<br>
Free airport shuttle<br>
No swimming pool - restaurant<br>
<a href=/pet-friendly-hotels.html>Pet friendly hotel - click & read</a> - $20 per stay pet fee - updated Feb 2008<br>
<div class=gr><b>Guest review:</b> Close to restaurants - bathroom was spacious - nice staff - May 2008</div>
<div class=gr><b>Guest review:</b> Clean, well-run motel - rooms were spacious, had everything I needed - Aug 2006</div>
<div class=gr><b>Guest review:</b> Next to highway on-ramp; I wore earplugs to block out truck noise - clean room had good bed, hair dryer, microwave, and fridge - service was good - continental breakfast was very basic and limited - Mar 2006</div>
<p>


and save the html file to my computer.

-------------------------------------------
7) Transmit

I double click the updated conway-ar-hotels.html on my computer and upload the document on the server (in the arkansas file) so that it replaces the old page with my newly updated version

----------------------------------------------
8) Safari

I click on the link taking me to the page:

http://motel-finder.com/arkansas/conway-ar-hotels.html

I type command+f and search for "Ramada" or the address (whatever I remember from editing the document), verify that it uploaded successfully, scroll to the end of the page to verify the page is intact and go back to....

*************

1) BBedit (Document 1 - heather_ready_2_upload_0806grs_2237-2500.txt)

and do it all over again for another hotel...
 
Joined
Jul 19, 2008
Messages
4
Reaction score
0
p.s. I'm doing this all manually now, so whatever automation is possible I'm open to...

I don't know enough about Automator -- in my head I thought I could open a "workflow" sort of like a program that would know what steps come next so that after I complete each step I could hit a key and the next window I need would open automatically with the cursor where it needs to be (safari, in a -preferably blank- find field; or in Transmit, the recently saved file would be highlighted and I could upload it just by pressing return???)
 

karazelle

Moderator
Joined
Mar 10, 2006
Messages
238
Reaction score
10
I hope its ok if I look at this on sunday or monday, but this is the kind of information I need :)
 

karazelle

Moderator
Joined
Mar 10, 2006
Messages
238
Reaction score
10
Unfortunately, it does not seem that Automator will be able to automate the entire workflow.
I'm also not entirely sure how to implement all of it using Automator. Unfortunately, Automators strength resides with working on entire folders or files or documents.

In your situation, you are automating the contents of these files. You want to find strings inside text, and using that string reuse it in several other scenarios. Unfortunately, BBEdit doesn't expose the actions we would need, and I am not good enough in Applescript to accomplish it either.
You would need a dedicated Applescript to do all of this.


Things that can be done: Creating droplets (icon on desktop or other location even Dock) that uploads files you drop on it using Transmit for example.
 

karazelle

Moderator
Joined
Mar 10, 2006
Messages
238
Reaction score
10
Yay! Thanks for your response :)

I have a text file (.txt) open in BBedit with hundreds of listings like this:

2432. AR - Conway - Ramada Inn and Suites - I-40 & US 64 - 10209161 - (e-mail address removed)

<div class=gr><b>Guest review:</b> 4 - Plenty of room to move about
nice hosts lots of room in the bathroom.. not squishy at all.. plenty of room to move and close to food =D
can't think of anything right now - May 08</div>
it was easy


<div class=gr><b>Guest review:</b> Close to restaurants - bathroom was spacious - nice staff - May 2008</div>


I copy the ID # 10209161 and....
------------------------------

So the file is unstructured? It's just a kind of log file with lots of logbook entries?

2) Safari

paste it into the search field on the website search page -- the address is similar to:

http://motel-finder.com/z-hid-search/search.php

The results page (http://motel-finder.com/z-hid-search/search.php?hid=10209161) gives me this link:

arkansas/conway-ar-hotels.html - (links to page: http://motel-finder.com/arkansas/conway-ar-hotels.html)
-------------------------------------------------

This is where I'm uncertain. How do you "get" this link? Is that the only data returned?

3) Transmit

I go to the "arkansas" folder and then search for the document "conway-ar-hotels.html"

I double-click to download this file to my computer and and control+select it from my list of files (in Transmit) and choose "Edit with BBedit"

What exactly does "goes to" mean? Are those folder on your computer or on a remote server?

4) BBedit (Document 2 - conway-ar-hotels.html)

I use the "find" tool and again paste the ID # 10209161 which takes me to the listing I will be working on:

<li class=hl><a href="http://reservations.motel-finder.com/hotel/10006044-10209161O.html" class=hn>Ramada Inn</a> - <span class=cc>$$</span><br>
I-40 & US 64, Conway, AR 72032<br>
Hotel - single-story<br>
Free airport shuttle<br>
No swimming pool - restaurant<br>
<a href=/pet-friendly-hotels.html>Pet friendly hotel - click & read</a> - $20 per stay pet fee - updated Feb 2008<br>
<div class=gr><b>Guest review:</b> Clean, well-run motel - rooms were spacious, had everything I needed - Aug 2006</div>
<div class=gr><b>Guest review:</b> Next to highway on-ramp; I wore earplugs to block out truck noise - clean room had good bed, hair dryer, microwave, and fridge - service was good - continental breakfast was very basic and limited - Mar 2006</div>
<p>

--------------------------------

Ok, fair enough. You are searching for the number you got in the first text file?

5) BBedit (Document 1 - heather_ready_2_upload_0806grs_2237-2500.txt)

I go back to my 1st doc and select and copy the guest review:

<div class=gr><b>Guest review:</b> Close to restaurants - bathroom was spacious - nice staff - May 2008</div>

--------------------------------------------
This is a bit problematic. There are no direct actions in BBEdit to expose text search, select and manipulation through Automator. The developer of an application decides what Automator can do, and so far the library of Automator actions to BBEdit isn't so good. There are actually better and more advanced actions available to TextEdit.

6) BBedit (Document 2 - conway-ar-hotels.html)

I paste the review just before the most recently posted review:

<li class=hl><a href="http://reservations.motel-finder.com/hotel/10006044-10209161O.html" class=hn>Ramada Inn</a> - <span class=cc>$$</span><br>
I-40 & US 64, Conway, AR 72032<br>
Hotel - single-story<br>
Free airport shuttle<br>
No swimming pool - restaurant<br>
<a href=/pet-friendly-hotels.html>Pet friendly hotel - click & read</a> - $20 per stay pet fee - updated Feb 2008<br>
<div class=gr><b>Guest review:</b> Close to restaurants - bathroom was spacious - nice staff - May 2008</div>
<div class=gr><b>Guest review:</b> Clean, well-run motel - rooms were spacious, had everything I needed - Aug 2006</div>
<div class=gr><b>Guest review:</b> Next to highway on-ramp; I wore earplugs to block out truck noise - clean room had good bed, hair dryer, microwave, and fridge - service was good - continental breakfast was very basic and limited - Mar 2006</div>
<p>


and save the html file to my computer.
-------------------------------------------

As above.


7) Transmit

I double click the updated conway-ar-hotels.html on my computer and upload the document on the server (in the arkansas file) so that it replaces the old page with my newly updated version

----------------------------------------------

8) Safari

I click on the link taking me to the page:

http://motel-finder.com/arkansas/conway-ar-hotels.html

I type command+f and search for "Ramada" or the address (whatever I remember from editing the document), verify that it uploaded successfully, scroll to the end of the page to verify the page is intact and go back to....

*************

1) BBedit (Document 1 - heather_ready_2_upload_0806grs_2237-2500.txt)

and do it all over again for another hotel...

[/QUOTE]

Again, this is where you run into problems due to the lack of exposed actions from the applications involved to do these things unfortunately.

It also looks a bit like your entire modus operandi if you will seems a bit flawed. Apparently, the reason you do all of this is:
Data from guestbooks is in poor formatting (could have been in XML for example), making it hard to automate it as it is. It's also apparently not designed to work with the system you aggregate (collect) reviews into.

Data on motel-finder.com is stored in independant folders and documents, not retrieved from a database that could have exposed a webservice that you could easily feed data from guest book reviews from.

Unfortunately, if your employer did what I mentioned, you'd still not have a job, but that would be the ideal way for this all to work.. :p
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top