Skip to content

Instantly share code, notes, and snippets.

View florian-glombik's full-sized avatar

Florian Glombik florian-glombik

View GitHub Profile
@florian-glombik
florian-glombik / upload_file_to_wordpress.py
Last active October 2, 2024 23:28
Upload file to Wordpress using REST API (python)
import base64, requests, logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s: %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
# This solution was inspired by an existing script https://gist.github.com/openroomxyz/f32021d077d1be5235ceb1a716d1e37a
# This script includes further documentation and explanation than the solution by @openroomxyz
### -------- VALUES TO BE MODIFIED (start) -------- ###
URL = "https://mydomain.com"
@florian-glombik
florian-glombik / rename_mov_files_to_mp4.py
Last active October 2, 2024 23:28
This python script renames .mov files to .mp4 files, which can be useful when exporting videos from the iOS photos app. You will need to adjust the path variable to the path where your pictures are stored.
import os
import glob
import logging
path_to_mov_files_to_be_renamed = '/path/to/your/movFiles'
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s: %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
def rename_mov_files_to_mp4(path):