#!/usr/bin/env python
import subprocess
import sys
import os

if not os.path.exists('.pypt/gh-token'):
    print("To use this script, you must create a GitHub token first.")
    print("Get a token here: https://github.com/settings/tokens")
    print("Then, put it in a file named .pypt/gh-token")
    exit(1)

inpf = input if sys.version_info[0] == 3 else raw_input

FILE = inpf("Markdown file to use: ")
BASEDIR = os.getcwd()
REPO = 'getnikola/nikola'
TAG = inpf("Tag name (usually vX.Y.Z): ")

subprocess.call(['.pypt/ghrel', FILE, BASEDIR, REPO, TAG])

@@ -14,16 +14,17 @@
 v python
+3
 %0Aimport 
@@ -41,18 +41,17 @@
 %0Aimport 
-sy
+o
 s%0Aimport
@@ -51,18 +51,24 @@
 %0Aimport 
-os
+argparse
 %0A%0Aif not
@@ -313,102 +313,447 @@
 1)%0A%0A
-inpf = input if sys.version_info%5B0%5D == 3 else raw_input%0A%0AFILE = inpf(%22Markdown file to use: %22)
+parser = argparse.ArgumentParser(description=%22GitHub Release helper%22)%0Aparser.add_argument(%22FILE%22, nargs=1, help=%22Markdown file to use%22)%0Aparser.add_argument(%22TAG%22, nargs=1, help=%22Tag name (usually vX.Y.Z)%22)%0A%0Aargs = parser.parse_args()%0A%0Aif not args.TAG%5B0%5D.startswith(%22v%22):%0A    print(%22WARNING: tag should start with v%22)%0A    i = input(%22Add %60v%60 to tag? %5By/n%5D %22)%0A    if i.lower().strip().startswith('y'):%0A        args.TAG%5B0%5D = 'v' + args.TAG%5B0%5D%0A
 %0ABAS
@@ -800,50 +800,8 @@
 ola'
-%0ATAG = inpf(%22Tag name (usually vX.Y.Z): %22)
 %0A%0Asu
@@ -830,20 +830,28 @@
 ghrel', 
+args.
 FILE
+%5B0%5D
 , BASEDI
@@ -859,14 +859,22 @@
 , REPO, 
-TAG
+args.TAG%5B0%5D
 %5D)%0A

Make github-release.py friendlier