From 14b74e7e65e2a8f343f485600acee60380c13623 Mon Sep 17 00:00:00 2001
From: Chris Pomeroy <chris.pomeroy@hotmail.com>
Date: Mon, 07 Aug 2017 21:35:54 +0000
Subject: [PATCH] Initial commit

---
 .authcode     |    1 +
 .gitignore    |    3 +++
 aaxConvert.py |   25 +++++++++++++++++++++++++
 3 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/.authcode b/.authcode
new file mode 100755
index 0000000..bd41cba
--- /dev/null
+++ b/.authcode
@@ -0,0 +1 @@
+12345
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 087029a..9616a17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,3 +42,6 @@
 
 # Sphinx documentation
 docs/_build/
+
+.idea
+.idea/*
diff --git a/aaxConvert.py b/aaxConvert.py
new file mode 100755
index 0000000..8234770
--- /dev/null
+++ b/aaxConvert.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+import argparse
+import os
+
+# arguments
+# activation_key, file name, codec(default to mp3)
+parser = argparse.ArgumentParser()
+parser.add_argument("--code", help="Activation Code from audible to decrypt files")
+parser.add_argument("filename", help="Filename to convert")
+
+args = parser.parse_args()
+
+act_byte = ""
+if args.code:
+    act_byte = args.code
+elif os.path.isfile('./.authcode'):
+    act_byte = open('./.authcode').readline()
+
+if act_byte == "":
+    print "Please provide an activation code from audible. Either at the command line or the .authcode file"
+else:
+    print act_byte
+
+if os.path.isfile(args.filename):
+    print os.path.abspath(args.filename)

--
Gitblit v1.10.0