Skip to content

A robot that extracts a Shakespeare play - "Romeo & Juliet", saves to file and reads it out loud on your MacOS using Python & AppleScript

Notifications You must be signed in to change notification settings

teejayt/TextEdit-Automate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextEdit-Automate

Important Information: This is a Robocorp(open source RPA) project that works only on Macos.
Dependencies - Editor(TextEdit) app, Python, Robocorp, MacOS 🖥 💻
You don't need to install python separately as Robocorp does that for you during install.

What the code does

The code will open up https://www.nosweatshakespeare.com on your "Google Chrome" browser and navigate to a "Romeo and Juliet" play.
A transcript/summary of the "Romeo and Juliet" play will be extracted.
This transcript will then be saved on your desktop as a "TestXXXXX.rtf" using AppleScript & Python.

How the project is laid out

tasks.robot - Orchestrates the Python & robot script.
It calls a Python user defined library called TextEditScript.

libraries - A folder that contains 2 files; TE_AppleScript.scpt and TextEditScript.py
TextEditScript.py calls the scpt to perform some automations on TextEdit.

The automations on TextEdit will include writing line by line, saving the file to your desktop and also
reading out the text contained using the "Speech" functionality embedded in your 🖥 💻
Alternatively, you can use the "say command" if you prefer.

conda.yaml and robot.yaml - should be left as it is.

Changes that needs to be made so the code works for you

TextEditScript.py => Amend the scriptPath variable
TE_AppleScript.scpt => Amend the thisFilePath variable - put in the right path to your desktop

To learn more about AppleScript
https://gist.github.com/nayanseth/c18931e0777579467a12
http://downloads.techbarrack.com/books/programming/AppleScript/website/basics/say.html
https://github.com/unforswearing/applescript

Disclaimer: I'm not an expert in AppleScript but if you reach out to me, i will try my best to help you.
Contact me: https://www.linkedin.com/in/tolani-aka-rpa-jargon-buster-jaiye-tikolo/

About

A robot that extracts a Shakespeare play - "Romeo & Juliet", saves to file and reads it out loud on your MacOS using Python & AppleScript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published