1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
How to get the CLI of gPodder running on Android
================================================
Install Android Scripting (http://code.google.com/p/android-scripting/)
Install Python 2.6
cd /path/to/gpodder/
adb push src/gpodder/ /sdcard/com.googlecode.pythonforandroid/extras/python/gpodder/
cd /path/to/mygpoclient/
adb push mygpoclient/ /sdcard/com.googlecode.pythonforandroid/extras/python/mygpoclient/
adb push /path/to/feedparser.py /sdcard/com.googlecode.pythonforandroid/extras/python/
Apply the following patch to bin/gpo:
==============================================
diff --git a/bin/gpo b/bin/gpo
index fd57ab6..7075491 100755
--- a/bin/gpo
+++ b/bin/gpo
@@ -57,6 +57,9 @@ import os
import re
import inspect
+os.environ['GPODDER_HOME'] = os.environ['EXTERNAL_STORAGE'] + '/gpodder/'
+os.environ['GPODDER_DOWNLOAD_DIR'] = os.environ['EXTERNAL_STORAGE'] + '/gpodder/podcasts/'
+
gpodder_script = sys.argv[0]
if os.path.islink(gpodder_script):
gpodder_script = os.readlink(gpodder_script)
@@ -334,6 +337,13 @@ def stylize(s):
if __name__ == '__main__':
cli = gPodderCli()
- cli._parse(sys.argv[1:]) or sys.stderr.write(stylize(__doc__))
+ while True:
+ line = raw_input('gpo> ')
+ if line == 'help':
+ sys.stderr.write(stylize(__doc__))
+ elif line == 'quit':
+ break
+
+ cli._parse(line.split())
==============================================
adb push bin/gpo /sdcard/sl4a/scripts/gpo-app.py
Then start SL4A and start the "gpo-app.py" script. There, type "help" to
get a list of possible commands. Example usage:
gpo> help
gpo> subscribe lugradio.org/episodes.rss
gpo> update
gpo> pending
gpo> download
gpo> quit
-- thp, 2010-11-29
|