Skip to content

Instantly share code, notes, and snippets.

View clement-moulin-frier's full-sized avatar

Clément Moulin-Frier clement-moulin-frier

View GitHub Profile
@clement-moulin-frier
clement-moulin-frier / google_doc_opener.py
Last active October 2, 2024 15:26
Given the path of a google document stored locally (with extension .gdoc, .gsheets ...), the script will open it in the default web browser. Useful if you stop using Google Drive as your cloud service, but still want to be able to open google documents from your file explorer.
import sys
import json
import webbrowser
from pathlib import Path
def open_google_doc(file_path):
# Read the file
with open(file_path, 'r') as file:
data = json.load(file)
@clement-moulin-frier
clement-moulin-frier / zotselect-link-markdown.js
Last active June 17, 2020 14:13
Zotero to Markdown link translator, adapted from https://gist.github.com/nschneid/3134386 // Place this file in the directory “translators” in your Zotero data folder. // Restart Zotero // Zotero Preferences -> Export -> Default Output Format -> ZotSelect Mardown Link // Now you can also use the shortcut for “Copy Selected Items – ctrl+alt+c on …