changeset 631:d87a17e1abac

-> http://k0s.org/hg/TextShaper/rev/e6f680d25d63
author Jeff Hammel <k0scist@gmail.com>
date Sun, 23 Feb 2014 00:49:18 -0800
parents 6e6a2adaa9f6
children 1aca90a263e8
files python/url2txt.py
diffstat 1 files changed, 0 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/python/url2txt.py	Thu Feb 20 12:11:17 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-
-# TODO: add url2txt as pluggable thingy for smartopen
-
-# xclip -o | sed 's/_//' | sed 's/.html//'
-
-def url2txt(url):
-    """gets the text equivalent of a URL"""
-    url = url.rstrip('/')
-    if '/' in url:
-        url = url.rsplit('/')[-1]
-    if '.' in url:
-        url = url.split('.', 1)[0]
-    url = url.replace('_', ' ')
-    return url
-
-if __name__ == '__main__':
-    import sys
-    print url2txt(' '.join(sys.argv[1:]))