Skip to content

Instantly share code, notes, and snippets.

@aoloe aoloe/
Created Sep 23, 2018

What would you like to do?
import os
import sys
import argparse
import re
from subprocess import call
parser = argparse.ArgumentParser(description='Convert a svn referenced in a markdown line into png.')
parser.add_argument('lines', nargs='?', type=argparse.FileType('r'), default=sys.stdin)
args = parser.parse_args()
# print(args.lines)
for l in args.lines:
m ='\((.+)\)', l)
svg =
if os.path.isfile('/tmp/scratchblocks.svg'):
os.rename('/tmp/scratchblocks.svg', svg)
call(['/home/ale/src/bin_etc/', svg])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.