ads

Horoscope

 

import random from datetime import date # Zodiac signs zodiac_signs = [ "Aries (மேஷம்)", "Taurus (ரிஷபம்)", "Gemini (மிதுனம்)", "Cancer (கடகம்)", "Leo (சிம்மம்)", "Virgo (கன்னி)", "Libra (துலாம்)", "Scorpio (விருச்சிகம்)", "Sagittarius (தனுசு)", "Capricorn (மகரம்)", "Aquarius (கும்பம்)", "Pisces (மீனம்)" ] # Horoscope messages horoscope_messages_en = [ "Today is a good day to focus on your goals.", "You may face challenges, but perseverance will pay off.", "Spend time with family to strengthen relationships.", "A financial opportunity may come your way.", "Take care of your health and avoid stress.", "Good news in your career is on the horizon.", "A chance encounter could lead to new friendships.", "Patience is key today; don't rush decisions.", "Creativity will be your strength today.", "Avoid conflicts and focus on positivity.", "Trust your instincts and take bold steps.", "Balance work and personal life for better outcomes." ] horoscope_messages_ta = [ "இன்று உங்கள் இலக்குகளை நோக்கி கவனம் செலுத்த நல்ல நாள்.", "சிரமங்களை எதிர்கொள்கிறீர்கள், ஆனால் மனவலிமை வெற்றி அளிக்கும்.", "குடும்பத்துடன் நேரம் செலவிட்டு உறவுகளை வலுப்படுத்தவும்.", "நிதி வாய்ப்பு இன்று உங்களைச் சந்திக்கலாம்.", "உங்கள் உடல்நலனைக் கவனித்து மன அழுத்தத்திலிருந்து தப்பிக்கவும்.", "உங்கள் தொழிலில் நல்ல செய்தி வரும்.", "ஒரு திடீர் சந்திப்பு புதிய நட்புகளை உருவாக்கலாம்.", "இன்று பொறுமை முக்கியம்; முடிவுகளை சிதைவடையாதீர்கள்.", "இன்றைய நாள் உங்களுக்கு படைப்பாற்றலுடன் இருக்கும்.", "சண்டைகளை தவிர்த்து நேர்மறையாக இருக்கவும்.", "உங்கள் உள்ளுணர்வை நம்பி துணிவுடன் செயல்படுங்கள்.", "வேலை மற்றும் தனிப்பட்ட வாழ்க்கையை சமநிலைப்படுத்துங்கள்." ] # Generate horoscopes def generate_horoscopes(): today = date.today().strftime("%B %d, %Y") horoscopes = [] for i, sign in enumerate(zodiac_signs): horoscope_en = random.choice(horoscope_messages_en) horoscope_ta = random.choice(horoscope_messages_ta) horoscopes.append({ "sign": sign, "date": today, "english": horoscope_en, "tamil": horoscope_ta }) return horoscopes # Generate HTML for blogger page def generate_html(horoscopes): html_content = f"Daily Horoscope - {date.today()}" html_content += f"

Daily Horoscope for {date.today()}

" for h in horoscopes: html_content += f"""

{h['sign']}

Date: {h['date']}

English: {h['english']}

Tamil: {h['tamil']}


""" html_content += "" return html_content # Main function if __name__ == "__main__": horoscopes = generate_horoscopes() html_content = generate_html(horoscopes) # Save to file with open("horoscope.html", "w", encoding="utf-8") as file: file.write(html_content) print("Horoscope HTML file generated: horoscope.html")

Post a Comment

0 Comments