Skip to content

Instantly share code, notes, and snippets.

View kvgc's full-sized avatar

Keerthi Vasan GC kvgc

View GitHub Profile
@kvgc
kvgc / zoteroCSVtoTW5.py
Created March 11, 2023 00:46
Convert the zotero's exported csv to TW5 compatible json file. Run the following code and drag-and-drop the json files to Tiddlywiki to import them as separate tiddlers.
import pandas as pd
import json
zoteroExportFile = "zoteroExport.csv" ## Contains the csv exported from zotero
folder = "zoteroExport/"
t = pd.read_csv(zoteroExportFile)
for i in range(len(t["Title"])):
with open(folder+t["Key"][i] +".json", "w") as outfile:
### pytho exportAnnotations.py test.pdf
### Outputs notes and highlights in the pdf as html
### Requires: markdown2, PyPDF2, pdfannots
from PyPDF2 import PdfFileReader
import subprocess
from pathlib import Path
import markdown2
import sys
@kvgc
kvgc / Promnesia-sidebar.css
Created March 17, 2022 23:34
Custom css to style the sidebar in promnesia (https://github.com/karlicoss/promnesia)
#promnesia-sidebar {
--right: 1;
--size: 30%;
background-color: #ffffff;
opacity: 95%;
font-family: 'math';
font-size: 18px;
}
@kvgc
kvgc / run-web-summarizer.sh
Last active August 1, 2021 05:03
When a url is copied to the clipboard, the following command runs the sumy summarizer script and copies the output back to the clipboard
### Usage: Copy a web url and run this script
### Optional: Create a keyboard shortcut
### Dependencies: xclip(apt install xclip), sumy(pip install sumy)
sumy lex-rank –length=10 –url="$(xclip -o)" | xclip -selection c && notify-send "copied to clipboard"