Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python3
#
# apt-get install libimobiledevice-utils ifuse libheif-examples
#
# fill these variable in main function to make it to works
# raw_phone_directory = "/my/destination/backup/"
# converted_phone_directory = "/my/directory/where/jpg/are/located/"
# phone_mount_dir = "/directory/where/directory/is/monted"
@mrbidon
mrbidon / renew_dyndns
Created November 14, 2023 20:42
Script renouvellement de dyndns
#!/usr/bin/python3
# this script aim renew an ovh dyndns
# it musts be executed in cron,
# first it check if DNS is update
# and then if necessary update the IP
#
# it needs two python packages requests and dnspython
@mrbidon
mrbidon / copy_photo_from_a_tag.py
Created December 4, 2017 06:50
Shotwell export from a given tag
# -*- coding: utf-8 -*-
import sqlite3
import sys
#
# Shotwell export from a tag
#
# This script read the shotwell db to generate an export script of all the files
# associated to a following tag in a specified directory
@mrbidon
mrbidon / jsonlz4ToHtml.py
Created November 18, 2017 13:32
Convert a Firefox jsonlz4 bookmark file to a Mozilla HTML bookmark format
# -*- coding: utf-8 -*-
# this little script convert a Firefox jsonlz4 bookmark file to a Mozilla HTML bookmark format
import json
import sys
def parse(dic, title):
result = ""
result += '<DT><H3 FOLDED ADD_DATE="">{title}</H3>'.format(title=title)
result += '<DL>'
@mrbidon
mrbidon / pygame-vlc.py
Created August 11, 2016 22:13 — forked from smathot/pygame-vlc.py
Use VLC to play videos on a PyGame surface
import os
import sys
import vlc
import pygame
def callback(self, player):
print
print 'FPS =', player.get_fps()
print 'time =', player.get_time(), '(ms)'