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