Skip to content

YelloNox/Target-MyTime-To-Email

Repository files navigation

Target MyTime To Email

Share mytime.target.com schedule by email

Note: This script is buggy, and as I no longer work at target, I will not be maintaning it 🥲

📃 Prerequisites

📒 Notes

⬇️ Installation

  1. Clone the repository or download the script.
git clone https://github.com/YelloNox/Target-MyTime-To-Email
  1. Run setup.bat or install the script with the following commands:
conda create --prefix ./conda-env python=3.10.11
conda activate ./conda-env
pip install -r requirements.txt
  1. Clone example.env to .env.

  2. Edit the .env and update the following variables:

    Login Credentials for MyTime

    target_username = "target_user_username"
    target_password = "target_user_password"
    

    Email Details

    receiver_emails = "["email_1", "email_2"]"
    subject = "Target Schedule"
    

    SMTP Mail

    smtp_username = "enter_email"
    smtp_password = "enter_password"
    

🪴 Usage

  1. Run the script with run.bat or:
conda activate ./conda-env
python run.py
  1. The script will perform the following steps:
    • Check the last modification date of a file.
    • Prompt the user to continue or exit based on the file's modification date.
    • Initialize a Chrome driver and open a specified URL.
    • Perform login and verification steps if necessary.
    • Scrape the web page and save the schedule to a file.
    • Send the saved schedule via email.
  2. Follow the prompts in the terminal to proceed or exit.

📧 Obtaining Google Email SMTP Server Details

To obtain the SMTP server details for Google email, follow these steps:

  1. Go to your Google Account settings.
  2. Navigate to the "Security" tab.
  3. Scroll down and enable "Less secure app access".
  4. Go back to the main settings page and click on "Account info".
  5. Scroll down to the "Sign-in & security" section and click on "App passwords".
  6. Select the app you want to generate an app password for (e.g., "Mail" or "Other (Custom name)").
  7. Follow the instructions to generate an app password.
  8. Use your personal email as the smtp_user in the .env file
  9. Use the generated app password as the smtp_password in the .env file.
  10. Obtain the SMTP Server Port Number:
    • The SMTP server port number is specific to your email service provider. Here are some common port numbers:
      • Gmail: Port 587 or 465 (TLS/SSL)
      • Outlook.com/Hotmail.com: Port 587 or 25
      • Yahoo Mail: Port 587 or 465 (SSL)
      • AOL Mail: Port 587 or 465 (SSL)
      • Office 365: Port 587 or 25
    • To find the SMTP server port number for your email provider, you can refer to their documentation or support resources.
    • Once you have the port number, update the smtp_port variable in the .env file, replacing ### with the appropriate port number.

🪪 License

Target MyTime To Email by Alec Murphy is licensed under CC BY-NC 4.0

About

Share mytime.target.com timesheet by email

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published