]> git.phdru.name Git - dotfiles.git/blob - bin/decode-URLs.py
Fix(bin/cp_recode_fname): Fix misspelled message
[dotfiles.git] / bin / decode-URLs.py
1 #! /usr/bin/env python3
2
3 try:
4     from urllib.parse import unquote
5 except ImportError:
6     from urllib import unquote
7 import sys
8
9 while True:
10    url = sys.stdin.readline()
11    if not url:
12       break
13    unqoted = unquote(url.strip())
14    if unqoted.startswith('file://'):
15        unqoted = unqoted[len('file://'):]
16    print(unqoted)