Initially when I started, I was facing the problem with the PDF file being written to NFS with the below statement.
To achieve this requirement I have used Custom adapter module to create password protected pdf file.īounc圜astle – Encrypting the PDF( iText internally uses library to encrypt the PDF files). The Password protected PDF file needs to be zipped and sent to customer location. Requirement: Pick the sample file from source ftp and pass the file as WinZip with password protected PDF file to target FTP through SAP PI.
We finally reached the end of this article and I hope you find some new and interesting to make your Daily tasks automated.In this Document I would like to share how to create a password protected PDF file in SAP PI using Custom Adapter Module.
# Video Watermark with Python # pip install moviepy from moviepy.editor import * clip = VideoFileClip("myvideo.mp4", audio=True) width,height = clip.size text = TextClip("WaterMark", font='Arial', color='white', fontsize=28) set_color = text.on_color(size=(clip.w + text.w, text.h-10), color=(0,0,0), pos=(6,'center'), col_opacity=0.6) set_textPos = set_t_pos( lambda pos: (max(width/30,int(width-0.5* width* pos)),max(5*height/6,int(100* pos))) ) Output = CompositeVideoClip() Output.duration = clip.duration Output.write_videofile("output.mp4", fps=30, codec='libx264') ?Final Thoughts In the below script, you can see how you can watermark and you are free to use it. # Upload Photos and Video on Insta # pip install instabot from instabot import Bot def Upload_Photo(img): robot = Bot() robot.login(username="user", password="pass") robot.upload_photo(img, caption="Medium Article") print("Photo Uploaded") def Upload_Video(video): robot = Bot() robot.login(username="user", password="pass") robot.upload_video(video, caption="Medium Article") print("Video Uploaded") def Upload_Story(img): robot = Bot() robot.login(username="user", password="pass") robot.upload_story(img, caption="Medium Article") print("Story Photos Uploaded") Upload_Photo("img.jpg") Upload_Video("video.mp4") ? Video WatermarkerĪdd watermark to your videos by using this automation script which uses Moviepy which is a handy module for video editing.
You can do it programmatically by using the below script. Instagram is a well famous social media platform and you know you don’t need to upload your photos or video through your smartphone now. # Get CPU/GPU Temperature # pip install pythonnet import clr clr.AddReference("OpenHardwareMonitorLib") from OpenHardwareMonitorLib import * spec = Computer() spec.GPUEnabled = True spec.CPUEnabled = True spec.Open() # Get CPU Temp def Cpu_Temp(): while True: for cpu in range(0, len()): if "/temperature" in str(): print(str()) # Get GPU Temp def Gpu_Temp() while True: for gpu in range(0, len()): if "/temperature" in str(): print(str()) ? Instagram Uploader Bot You can use it to notify yourself when a certain amount of temperature reaches or you can use it in your Python project to make your daily life easy. Well, this script uses the Pythonnet and OpenhardwareMonitor that help you to monitor your current Cpu and Gpu Temperature.
You Probably use CPU-Z or any specs monitoring software to capture your Cpu and Gpu temperature but you know you can do that programmatically too. # Parse and Extract HTML # pip install gazpacho import gazpacho # Extract HTML from URL url = ' ' html = gazpacho.get(url) print(html) # Extract HTML with Headers headers = '.format(file_name) return main_adb(cmd) # Take a screenshot def screenshot(): cmd = 'adb shell screencap -p' return main_adb(cmd) # Power On and Off def power_off(): cmd = '"adb shell input keyevent 26"' return main_adb(cmd) ? Monitor CPU/GPU Temp This awesome script is a great treat for web scrapers and for those who want to Parse HTML for important data. This automation script will help you to extract the HTML from the webpage URL and then also provide you function that you can use to Parse the HTML for data.
This may be the age of automation, but love is still being made by hand.
So no more repetitive tasks put this article on your list, and let's get started. Well in this article I present to you 10 Python Automation scripts for making your life automated and easier. Think about this boring stuff that you no longer need to do again and again just make it automated and make your life easier. In this age of automation where we have a lot of repeated boring work to do.