Python create Daily Planets Epheremis, Email & Automate

Опубликовано: 01 Апрель 2023
на канале: Max Drake
345
11

After creating a visualisation of planets orbiting in the solar system I wanted to see if I could create a daily Epheremis of planetary bodies for my particular location with Altitude & Azimuth locations at hourly intervals and then send it to myself via an email so that I could access it on my mobile phone if I was outside.
In producing the Ephemeris (a table showing the positions of a heavenly body on a number of dates in a regular sequence) the script produces the data in a CSV format. That format is not that useful to view on a small screen, so I wanted a different format.
So an extra bit of learning was to convert the CSV output into a PDF table. A PDF is better than an image as it does not pixilate when you zoom in on a part of the image, so it is useful on small screens.
The PyEphem library was great and produced the tables very quickly in the format that I wanted (Alt/Az instead of RA & Dec) and I checked a couple of the results with Stellarium, just to see that I was in the right ballpark.
So I had the content that I wanted, I just needed it in the format that I wanted and then I had to look at a delivery process, in this case via email.
The email process threw me a bit as I'd only used CSV attachments to emails and that automation reads the attched file before sending it, so I needed to reconfigure the email code to be able to add a PDF attachment.
PyEphem: https://rhodesmill.org/pyephem/
Stellarium : https://stellarium-web.org/
Python FPDF2: https://pypi.org/project/fpdf2/
Create PDF Tables with Python FPDF2:    • Create PDF Tables with Python FPDF2  
Github repo for code for video above: https://github.com/bvalgard/create-pd...
Sending Emails With Python Including Attachments (New Method for GMail - 2022):
   • Sending Emails With Python Including ...  
LINK to Python Script Files: https://drive.google.com/drive/folder...
The last part of the procedure was to automate the task.
Use Task Scheduler - setup new task
You need to know that that PC will be on at that time, so will always activate. If not then you may need to manually activate.

I hope this is of help to you, if so, can you please give a thumbs up for the video. Muchas Gracias Please visit my blog for similar topics: https://cr8ive.tk

Kind regards, Max Drake


Смотрите видео Python create Daily Planets Epheremis, Email & Automate онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Max Drake 01 Апрель 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 34 раз и оно понравилось 1 людям.