Skip to content

Instantly share code, notes, and snippets.

View balasankarc's full-sized avatar

Balasankar "Balu" C balasankarc

View GitHub Profile
archiver () {
name=$1
original=$2
result=$(curl "http://web.archive.org/save/"$original | grep "var redirUrl" | awk '{print $4}' | sed -e 's/";//g' | sed -e 's/"/http:\/\/web.archive.org/g')
echo "[$name]($original),[Archived]($result)"
}
alias archiveit=archiver
@balasankarc
balasankarc / odftest
Last active January 29, 2024 17:19
Basic stuff with odfpy
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from odf.opendocument import OpenDocumentText
from odf.style import (Style, TextProperties, ParagraphProperties,
ListLevelProperties, TabStop, TabStops)
from odf.text import (H, P, List, ListItem, ListStyle, ListLevelStyleNumber,
ListLevelStyleBullet)
from odf import teletype