コード例 #1
0
ファイル: main.py プロジェクト: incruder1/voice-assistant_
def run_alexa():
    command = take_command()
    print(command)
    if 'play' in command:
        song = command.replace('play', '')
        talk('playing ' + song)
        pywhatkit.playonyt(song)
    elif 'time' in command:
        time = datetime.datetime.now().strftime('%I:%M %p')
        talk('Current time is ' + time)
    elif 'who is' in command:
        person = command.replace('who the heck is', '')
        info = wikipedia.summary(person, 1)
        print(info)
        talk(info)
    elif 'date' in command:
        talk('okay where u wanna go')
    elif 'are you single' in command:
        talk('I am in a relationship with You only')
    elif 'joke' in command:
        talk(pyjokes.get_joke())
    elif 'send message' in command:
        pywhatkit.sendwhatmsg("+91 6265 526 545 ",
                              "Hello from  Dev johri",
                              18, 26)
        print("Successfully Sent!")
    else:
        talk('Please say the command again.')
コード例 #2
0
def daily_status_report():
    load_dotenv()
    num = os.getenv("contact_number")
    msg = os.getenv("message")

    # print(f"User: {num}\nPassword: {msg}")
    kit.sendwhatmsg(num, msg, 5, 35)
コード例 #3
0
def run_siri():
    ok = 1
    command = take_command()

    if 'play' in command:
        song = command.replace('play', '')
        talk('playing ' + song)
        pywhatkit.playonyt(song)
    elif 'time' in command:
        time = datetime.datetime.now().strftime('%H:%M')
        print(time)
        talk('Current time is ' + time)
    elif 'who is ' in command:
        person = command.replace('how is', '')
        info = wikipedia.summary(person, 1)
        print(info)
        talk(info)
    elif 'are you ok' in command:
        talk('sorry, I have a headache')
    elif 'joke' in command:
        joke = pyjokes.get_joke()
        print(joke)
        talk(joke)
    elif 'send' in command:
        #pywhatkit.sendwhatmsg('+40758670653','Buna gorge!',21,56)
        pywhatkit.sendwhatmsg(
            '+40733571633',
            'Buna cyuc! trimit asta cu siri facuta de mine in python', 22, 10)
        #pywhatkit.sendwhatmsg('+40748050600','Buna iubire', 22, 0o6)
    elif 'bye' in command:
        talk('Bye Alexandra!See you soon..')
        ok = 0
    else:
        talk('PLease say the command again.')
    return ok
コード例 #4
0
def send_whatsapp_message(message):  # You must be logged in WhatsApp Web of your computer
    speak("Please now enter the details as they appear on your screen and please be very sincere in doing so")
    while True:
        to = int(input("Pls enter the receiver's mobile number[No need to enter the country code]: "))
        if len(str(to)) != 10:
            raise Exception('How is your receiver\'s phone number more than 10 digits!!')
        else:
            break

    while True:
        time_minute = int(input("At what minute do you want to send the message?: "))
        if time_minute not in range(60):
            raise IndexError('Minutes cannot be more than 59!! To denote 60, type 00 and the next hour!')
        else:
            break

    while True:
        time_hour = int(input('At what hour [in 24-hour format] do you want to send the message?: '))
        if time_hour not in range(25):
            raise KeyError("What the fork man! How is your hour more than 24!")
        else:
            break
        
    if time_hour == 24 and time_minute != 00:
        raise BaseException("What crazy world do you live in! How is your time more than 12 AM in the morning!")
    else:
        pass

    pywhatkit.sendwhatmsg(phone_no=to, message=message, time_hour=time_hour, time_min=time_minute, wait_time=2)
コード例 #5
0
ファイル: Asistant.py プロジェクト: anthuand/AsistenteVirtual
def llamar_comando(comand, valor):
    if comand == 'saludo':
        saludo()
    elif comand == 'hora':
        hora = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
        decir(hora)
    elif comand == 'wikipedia_search':
        if valor:
            decir(wikiSearch(valor))
    elif comand == 'traducir':
        if valor:
            traducir(valor)
    elif comand == 'google_search':
        if valor:
            pywhatkit.search(valor)
    elif comand == 'buscar_musica':
        if valor:
            buscar_musica(valor)
    elif comand == 'mensaje':
        if valor:
            hora = time.strftime('%H', time.localtime())
            min = time.strftime('%M', time.localtime())
            seg = time.strftime('%S', time.localtime())
            m = int(min) + 1
            decir("que quieres poner en el mensaje")
            texto = escuchar()
            pywhatkit.sendwhatmsg("+55555555555", texto, int(hora), m)
    elif comand == 'youtube_search':
        if valor:
            pywhatkit.playonyt(valor)
コード例 #6
0
def whatsapp():
    contacts = {
        "<name1>": "+91<number>",
        "<name2>": "+91<number>",
        "<name3>": "+91<number>"
    }
    speak("Whom do you want to send message")
    query = takeCommand().lower()
    if query in contacts:
        sendto = contacts.get(query)
        person_name = query
        hrs = int(datetime.datetime.now().strftime("%H"))
        d = datetime.datetime.now() + timedelta(minutes=2)
        mins = int(d.strftime("Z%M").replace('Z0', 'Z').replace('Z', ''))
        speak("whats the message.")
        query = takeCommand().lower()
        message = query
        speak(
            f" So, that's the message {person_name} saying {message}. Are you ready to send it"
        )
        query = takeCommand().lower()
        if query == 'yes':
            kit.sendwhatmsg(sendto, message, hrs, mins)
            speak("message sent successfully")
        elif query == 'no' or query == 'cancel':
            speak("okay no problem. Message cancelled")
        else:
            speak(
                "since i am having trouble, i won't send that message. You might want to try again later."
            )
    else:
        speak("No contact found of this name")
コード例 #7
0
ファイル: pilot.py プロジェクト: Olamide643/Auto
def notification():
    number = {"Yomola": "+2349020327517", "Dele": "+2347036836302"}

    url_list = {
        "Blue processmaker":
        "https://processmaker.gtbank.com/sysworkflow/en/gtbank_pro/login/login",
        "BVNPM": "https://bvnpms.gtbank.com/sys/en/neoclassic/login/login",
        "CIS PM":
        "https://cispm.gtbank.com/sysworkflow/en/neoclassic/login/login",
        "Video Banking": "https://vbanking.gtbank.com/videochat",
        "SAP": "https://sts.gtbank.com/adfs/ls/idpinitiatedsignon.aspx"
    }
    for name, url in url_list.items():

        if (urllib.request.urlopen(url).getcode() == 200):
            print(urllib.request.urlopen(url).getcode())
            for nam_mob, mobile in number.items():
                hour, minute = int(
                    time.strftime("%H")), int(time.strftime("%M")) + 1
                pywhatkit.sendwhatmsg(
                    mobile, 'Hi ' + str(nam_mob) + ", \n\n" + str(name) +
                    " was down at " + str(hour) + str(minute - 1), hour,
                    minute)
        else:
            pass
コード例 #8
0
def Itclass():
    print("working")
    webbrowser.open(
        "https://us05web.zoom.us/j/3574392189?pwd=eWhsNHBtb2srQU9Ka2xzM3kwL1gwQT09",
        new=1)
    time.sleep(3)

    joinbtn = pyautogui.locateCenterOnScreen("sq.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)

    joinbtn = pyautogui.locateCenterOnScreen("launch.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)

    joinbtn = pyautogui.locateCenterOnScreen("chat.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)
    pyautogui.hotkey('alt', 'h')
    joinbtn = pyautogui.locateCenterOnScreen("type.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(3 * 60)
    pyautogui.write("Parth Ghumatkar 12 th C")
    pyautogui.press('Enter')
    time.sleep(1)

    pywhatkit.sendwhatmsg(
        "+91XXXXXXXXX", "Parth's class of Chemistry at 10:10am has started!",
        7, 40)
コード例 #9
0
def physicsclass():
    print("working")
    webbrowser.open(
        "https://us04web.zoom.us/j/5157443831?pwd=MTdiNldDWnV4VU8zY2tLNTQ5MVZadz09",
        new=1)
    time.sleep(3)

    joinbtn = pyautogui.locateCenterOnScreen("sq.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)

    joinbtn = pyautogui.locateCenterOnScreen("launch.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)

    joinbtn = pyautogui.locateCenterOnScreen("chat.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)
    pyautogui.hotkey('alt', 'h')
    joinbtn = pyautogui.locateCenterOnScreen("type.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(3 * 60)
    pyautogui.write("Parth Ghumatkar 12 th C")
    pyautogui.press('Enter')
    time.sleep(1)

    pywhatkit.sendwhatmsg("+91XXXXXXXXXX",
                          "Parth's class of 7:40 has started!", 7, 40)
コード例 #10
0
ファイル: PA.py プロジェクト: Umesh-01/Python-Assistant
            def send_whtmsg():
                fun_talk('To whom you want to send message on WhatsApp')
                recepient = get_command()
                check_recep = phno_list[recepient]
                print(check_recep)
                fun_talk('Tell me the text in your message')
                msg = get_command()
                fun_talk('Do you want to send it immediately?')
                act_msg = get_command()
                if 'yes' in act_msg:
                    hr = datetime.datetime.now().time().hour
                    min = datetime.datetime.now().time().minute
                    pywhatkit.sendwhatmsg(check_recep, msg, hr, min + 2)
                    print(
                        'Hey lazy person. Your message is sent successfully.')
                else:
                    fun_talk(
                        'At what time you want to send this message. For example, 11:21 PM'
                    )
                    msg_time = get_command()

                    hr = 12
                    min = 52
                    pywhatkit.sendwhatmsg(check_recep, msg, hr, min)
                    print(
                        'Hey lazy person. Your message is sent successfully.')
                fun_talk('Do you want to send more WhatsApp messages?')
                more_msg = get_command()
                if 'yes' in more_msg:
                    send_whtmsg()
コード例 #11
0
ファイル: operacoes.py プロジェクト: Garthu/VoiceAssistant
    def send_message(command):
        whatsmessage = command.replace('Sending Message', '')
        pywhatkit.sendwhatmsg('+5548991640472', whatsmessage[14:],
                              dt.datetime.now().hour,
                              (dt.datetime.now().minute) + 1)

        return whatsmessage[14:]
コード例 #12
0
def send_invitation_whatsapp(party: Party):
    if not settings.DEBUG:
        return
    guest: Guest
    print(party)
    for guest in party.guest_set.all():
        # If already sent invitation skip
        print(guest)
        if guest.invitation_sent:
            continue
        if guest.phone_number:
            now = datetime.now()
            message = f"""
Olet kutsuttu hääjuhlaamme 07.08.2021!
vp. 31.5.2021
Vastaa kutsuun osoitteessa: {settings.WEDDING_WEBSITE_URL}/invite/{party.name}
Lisäinformaatioa osoitteessa {settings.WEDDING_WEBSITE_URL}?invite_id={party.name}
Vastaathan myös tähän viestiin että viesti tuli varmasti perille ja oikeaan numeroon.
Ystävällisin terveisin: Aleksi ja Marika!
            """
            pywhatkit.sendwhatmsg(guest.phone_number, message, now.hour,
                                  now.minute + 1)
            guest.invitation_sent = datetime.now()
            guest.save()
        else:
            return False
    return True
コード例 #13
0
def run():
    final_df = None
    for dist_inp in unique_districts[:10]:
        logging.info(dist_inp)
        DIST_ID = mapping_dict[dist_inp]
        for INP_DATE in date_str:
            URL = "https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/calendarByDistrict?district_id={}&date={}".format(
                DIST_ID, INP_DATE)
            response = requests.get(URL)
            if response.ok:
                resp_json = json.loads(response.text)['centers']
                df = pd.DataFrame(resp_json)
                final_df = deepcopy(df)
            if final_df:
                final_df.drop_duplicates(inplace=True)
                final_df.rename(columns=rename_mapping, inplace=True)
                age_inp = 18
                final_df = filter_column(final_df, "Minimum Age Limit",
                                         age_inp)
                # pay_inp = "Free"
                # final_df = filter_column(final_df, "Fees", pay_inp)
                table = deepcopy(final_df)
                table.reset_index(inplace=True, drop=True)
                for ind, row in table.iterrows():
                    if row["Available Capacity"] > 0:
                        return "Slots are available"
    pywhatkit.sendwhatmsg('+918959159066', "Slots not available", 21, 45)
コード例 #14
0
def mensaje_a_enviar(contactos:dict, contacto:str, mensaje:str, hora:int, minuto:int):
    try:
        print(f'El mensaje será enviado a las {hora}:{minuto}')
        kit.sendwhatmsg(contactos[contacto], mensaje, hora, minuto)
        print("Mensaje enviado con exito")
    except:
        print("Error al enviar el mensaje")
コード例 #15
0
def feeling_sad():
    msg = 'This is an automatically generated message .your friend is feeling lonely ,could you light up his mood?'
    x = datetime.datetime.now()
    y1 = x.strftime('%H')
    y2 = x.strftime('%M')
    y3 = int(y2) + 1
    pywhatkit.sendwhatmsg("Enter Number here", msg, int(y1), int(y3))
コード例 #16
0
def Screen_3_Process(txt, txt1, select_file_button, start_advt_button,
                     whatsapp_msg):
    global file_path
    txt.grid_forget()
    txt1.grid_forget()
    select_file_button.grid_forget()
    start_advt_button.grid_forget()

    wb = xlrd.open_workbook(file_path)
    sheet = wb.sheet_by_index(0)

    for i in range(1, sheet.nrows):
        now = datetime.now()
        current_time_hr = now.strftime("%H")
        current_time_min = now.strftime("%M")

        kit.sendwhatmsg(
            "+91" + str(int(sheet.cell_value(i, 1))),
            whatsapp_msg + " *GOOD MORNING " + sheet.cell_value(i, 2).upper() +
            "*..." + emoji.emojize(":grinning_face_with_big_eyes:"),
            int(current_time_hr),
            int(current_time_min) + 2)
        time.sleep(10)

        os.system("taskkill /im chrome.exe /f")

    showinfo("Message...", "Task Completed...")
    root.destroy()
コード例 #17
0
def go():
    messagebox.showinfo(
        "AutoWhatsappMessage",
        "Will open web.whatsapp.com at before 1 minute of Scheduled time and message \
    will be send Automatically at Scheduled time exactly Given")

    try:
        num = MobNum.get()
        msg = Entrymsg.get("1.0", "end-1c")
        hr = hour.get()
        mini = minutes.get()

        if (1 == 1):
            try:
                import pywhatkit
            except Exception as e:
                messagebox.showwarning("No Internet or Internet is Slow",
                                       "Check Internet Connection")
        else:
            messagebox.showwarning("No Internet or Internet is Slow",
                                   "Check Internet Connection")
        shut_timer()
        pywhatkit.sendwhatmsg(num, msg, hr, mini)
    except pywhatkit.CallTimeException:
        messagebox.showerror(
            "AutoWhatsAppMessage",
            "Set Schedule time More than 1 minute from Current Time")
    except pywhatkit.CountryCodeException:
        messagebox.showerror("AutoWhatsAppMessage",
                             "Please Ensure the mobile number & Coutry code.")
コード例 #18
0
def run_siri():
    command = take_command()
    if 'play' in command:
        talk('playing')
        print('playing')
        kit.playonyt(command)

    if 'send' in command:
        talk('sending')
        print('sending...')
        #sorry this number is random you can change the mobile number to whom ever you want to send the message!!
        kit.sendwhatmsg("+919452380123", command[4:], 23, 20, 1)

    if 'search' in command:
        talk('searching')
        print('searching')
        kit.search(command[6:])

    if 'find about' in command:
        talk('finding information about {}'.format(command[10:]))
        print("Finding")
        kit.info(command[10:], lines=5)

    else:
        talk("I don't know what are you talking about")
コード例 #19
0
def whatmsg(Reciever):                          # defining func to send whatsapp msgs
    contacts = {                                # using dict to store name and phone no. of the recievers
        "name": "phone no.",                    # more no. can be added with country code ex +91 for India
        "name": "phone no."
    }

    if Reciever in contacts:                    # checking reciever in contacts
        RECIEVER = contacts[Reciever]

    else:
        speak("reciever number not found")
        RECIEVER = str(input("please enter reciever's address manually"))

    speak("please tell the message to send")    # taking msg to send as voice input
    message = takecmd()

    strTime = datetime.datetime.now().strftime("%H:%M:%S")
    lst = strTime.split(":")
    conlst = [int(i) for i in lst]
    if conlst[1] >= 0 and conlst[1] < 58:
        conlst[1] += 2
    
    elif conlst[1] > 58:
        conlst[0] += 2
        
    kit.sendwhatmsg(RECIEVER,message,conlst[0],conlst[1])       # sending msg
    speak("message sent successfully")
コード例 #20
0
def sendingMessage():

    number = entryNumber.get()
    hour = entryHour.get()
    minute = entryMinute.get()
    message = entryMessage.get()
    kit.sendwhatmsg(str(number), str(message), int(hour), int(minute))
コード例 #21
0
def chemclass():
    print("working")
    webbrowser.open(
        "https://us04web.zoom.us/j/5080834026?pwd=QlpIRFVKNzF4cWtwU2ozellublJGUT09",
        new=1)
    time.sleep(3)

    joinbtn = pyautogui.locateCenterOnScreen("sq.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)

    joinbtn = pyautogui.locateCenterOnScreen("launch.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)

    joinbtn = pyautogui.locateCenterOnScreen("chat.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)
    pyautogui.hotkey('alt', 'h')
    joinbtn = pyautogui.locateCenterOnScreen("type.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(3 * 60)
    pyautogui.write("Parth Ghumatkar 12 th C")
    pyautogui.press('Enter')
    time.sleep(1)

    pywhatkit.sendwhatmsg(
        "+91XXXXXXXXXX", "Parth's class of Chemistry at 10:10am has started!",
        7, 40)
コード例 #22
0
def open_whatsapp(self):
    speak("tell number of reciver")
    if speak_is_on():
        reciver = take_input(self)
    else:
        reciver = take_input(self)    
    speak("say your context")
    if speak_is_on():
        context = take_input(self)
    else:
        context = take_input(self)

    try: 
        now = datetime.now()

        hour = int(now.strftime("%H"))
        minute = int(now.strftime("%M"))
        print(f"Reciver : {reciver}")
        print(f"Context : {context}")
        print(f"{hour}")
        print(f"{minute}")
        # sending message to reciever 
        # using pywhatkit 
        pywhatkit.sendwhatmsg(f"+91{reciver}", f"{context}", hour, minute+1)
        return("Successfully Sent!") 

    except: 
        
        # handling exception 
        # and printing error message 
        return("An Unexpected Error!")
コード例 #23
0
def engclass():
    print("working")
    webbrowser.open(
        "https://us04web.zoom.us/j/75427487673?pwd=ZEtwU25EbXdxZVpzQkdZeVBSbVlrdz09",
        new=1)
    time.sleep(3)

    joinbtn = pyautogui.locateCenterOnScreen("sq.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)

    joinbtn = pyautogui.locateCenterOnScreen("launch.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)

    joinbtn = pyautogui.locateCenterOnScreen("chat.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)
    pyautogui.hotkey('alt', 'h')
    joinbtn = pyautogui.locateCenterOnScreen("type.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(3 * 60)
    pyautogui.write("Parth Ghumatkar 12 th C")
    pyautogui.press('Enter')
    time.sleep(1)

    pywhatkit.sendwhatmsg("+91XXXXXXXXXX",
                          "Parth's class of English at 8:30am has started!", 8,
                          30)
コード例 #24
0
ファイル: hero.py プロジェクト: Strata-Tech/AI
def run_jarvis():
    command=take_command()
    print(command)
    if 'play' in command:
        song=command.replace('play', '')
        talk('playing'+ song)
        pywhatkit.playonyt(song)

    elif 'google' in command:
        results=command.replace('google', '')
        talk('googling'+ results)
        pywhatkit.search(results)
        talk(results)

    elif 'time' in command:
        time=datetime.datetime.now().strftime('%I:%M %p')
        talk(' the time is ' + time)
        print(time)

    elif 'wikipedia' in command:
        query=command.replace('wikipedia', '')
        info=wikipedia.summary(query,2)
        print(info)
        talk(info)

    elif 'joke' in command:
        talk(pyjokes.get_joke())

    elif 'send' in command:
        message=command.replace('send', '')
        talk('sending' + message)
        pywhatkit.sendwhatmsg('+6591913519', message ,16,13)

    else:
        talk(' Please repeat your question or request')
コード例 #25
0
def mathsclass():
    print("working")
    webbrowser.open(
        "https://us04web.zoom.us/j/2942235217?pwd=WmxnYUZDSGxIelRIbnhzNTNZZzVlZz09",
        new=1)
    time.sleep(3)

    joinbtn = pyautogui.locateCenterOnScreen("sq.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)

    joinbtn = pyautogui.locateCenterOnScreen("launch.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)

    joinbtn = pyautogui.locateCenterOnScreen("chat.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(1)
    pyautogui.hotkey('alt', 'h')
    joinbtn = pyautogui.locateCenterOnScreen("type.png")
    pyautogui.moveTo(joinbtn)
    pyautogui.click()
    time.sleep(3 * 60)
    pyautogui.write("Parth Ghumatkar 12 th C")
    pyautogui.press('Enter')
    time.sleep(1)

    pywhatkit.sendwhatmsg("+91XXXXXXXXXX",
                          "Parth's class of Maths at 9:20 has started!", 9, 20)
コード例 #26
0
def sendPersonAutomated(ContactTo, message, timeHour, timeMin):
    pywhatkit.sendwhatmsg(ContactTo,
                          message,
                          timeHour,
                          timeMin,
                          wait_time=10,
                          print_waitTime=True)
コード例 #27
0
def Function():
    n = Entry1.get()
    m = Entry2.get()
    L = Entry3.get()
    I = Entry4.get()
    y = "+91"
    pywhatkit.sendwhatmsg(y + n, str(m), int(L), int(I))
コード例 #28
0
def whatsapp():
    number1 = "+91" + number.get()
    message1 = message.get()
    hrs1 = int(hrs.get())
    min2 = int(min1.get())

    pywhatkit.sendwhatmsg(number1, message1, hrs1, min2)
コード例 #29
0
def whatsapp():
    speak("what you want to send boss")
    msg=takecommand().lower()
    speak("tell the hour time")
    hour=takecommand()
    speak("tellthe minutes")
    min=takecommand()
    kit.sendwhatmsg("+919629595614",str(msg),int(hour),int(min))
コード例 #30
0
def mandar(phone, msg):

    if date.datetime.now().minute == 59:
        py.sendwhatmsg("+34" + phone, msg,
                       date.datetime.now().hour + 1, 0, 20, True)
    else:
        py.sendwhatmsg("+34" + phone, msg,
                       date.datetime.now().hour,
                       date.datetime.now().minute + 1, 20, True)