Migrate from .stow-rename to --dotfiles
This commit is contained in:
parent
e344a02c65
commit
c9c512486d
23 changed files with 0 additions and 2 deletions
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
import mf2py
|
||||
import sys
|
||||
|
||||
args = sys.argv[1:]
|
||||
if not args:
|
||||
args.append('-')
|
||||
|
||||
|
||||
def parse(**kwargs):
|
||||
return mf2py.Parser(html_parser='html5lib', **kwargs).to_json()
|
||||
|
||||
|
||||
for arg in args:
|
||||
if arg.startswith('//'):
|
||||
arg = 'https:' + arg
|
||||
if arg.startswith('http'):
|
||||
doc = parse(url=arg)
|
||||
elif arg == '-':
|
||||
doc = parse(doc=sys.stdin)
|
||||
else:
|
||||
with open(arg, 'r') as f:
|
||||
doc = parse(doc=f)
|
||||
print(doc)
|
Loading…
Add table
Add a link
Reference in a new issue