Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-06-2013, 09:34 AM   #166
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,048
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Either one sounds fine, a release would be cool. I do think that being able to login with their account would be cool, but that would require implementing all of the social stuff...
qlob is offline   Reply With Quote
Old 01-06-2013, 10:46 AM   #167
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
yeah.

I am no python head.

A full release of the horror-story code (meh, sue me) would at least allow others to further the work.
twobob is offline   Reply With Quote
Old 01-07-2013, 02:21 AM   #168
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Todays work. replaced all the headachey python module install details with a shell script.

[root@kindle root]# /mnt/us/soundkloud/prep.sh
Spoiler:
Quote:
Internet Connection tests as okay... Continuing
Connecting to pypi.python.org (140.211.10.73:80)
wget: can't open 'setuptools-0.6c11-py2.7.egg': File exists

Processing setuptools-0.6c11-py2.7.egg
Removing /mnt/us/python/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg
Copying setuptools-0.6c11-py2.7.egg to /mnt/us/python/usr/local/lib/python2.7/dist-packages
setuptools 0.6c11 is already the active version in easy-install.pth
Installing easy_install script to /mnt/us/python/usr/local/bin
Installing easy_install-2.7 script to /mnt/us/python/usr/local/bin

Installed /mnt/us/python/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11

Searching for pip
Best match: pip 1.2.1
Processing pip-1.2.1-py2.7.egg
pip 1.2.1 is already the active version in easy-install.pth
Installing pip script to /mnt/us/python/usr/local/bin
Installing pip-2.7 script to /mnt/us/python/usr/local/bin

Using /mnt/us/python/usr/local/lib/python2.7/dist-packages/pip-1.2.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

Requirement already satisfied (use --upgrade to upgrade): soundcloud in /mnt/us/python/usr/local/lib/python2.7/dist-packages/soundcloud-0.3.5-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): fudge==1.0.3 in /mnt/us/python/usr/local/lib/python2.7/dist-packages/fudge-1.0.3-py2.7.egg (from soundcloud)
Requirement already satisfied (use --upgrade to upgrade): requests>=0.14.0 in /mnt/us/python/usr/local/lib/python2.7/dist-packages (from soundcloud)
Requirement already satisfied (use --upgrade to upgrade): simplejson>=2.0 in /mnt/us/python/usr/local/lib/python2.7/dist-packages (from soundcloud)
Cleaning up...

Downloading/unpacking requests==0.14.2
Downloading requests-0.14.2.tar.gz (361kB): 361kB downloaded
Running setup.py egg_info for package requests

warning: no files found matching 'tests/*.'
Installing collected packages: requests
Found existing installation: requests 0.14.2
Uninstalling requests:
Successfully uninstalled requests
Running setup.py install for requests

warning: no files found matching 'tests/*.'
Successfully installed requests
Cleaning up...


EDIT: Updated version will try to check for non-standard installs...

(this is on a 5 with a non standard installed python but a missing pythonenv for example)
[root@kindle soundkloud]# ./prep.sh
Quote:
Internet Connection tests as okay... Continuing
Non-Standard Python install maybe?... Searching /mnt/us/* (gimme a sec...)
python located, run AND greater than version 2.7: 1
Sorry it didn't work out... For more info on WHICH PYTHON TO RUN see http://bit.ly/soundkloud
okay so let see what would happen if we "fixed it"
Spoiler:
(NOTE: the pythonenv files EXPECTS to be in a directory named python to minimise false postives, and in the /mnt/us/* hierarchy)

So where are we gonna do this test?
[root@kindle python]# pwd
Quote:
/mnt/us/usr/share/python
[root@kindle python]# cat > ./pythonenv << EOF
Quote:
> export PYTHONPATH=/mnt/us/usr/lib/python2.7
> EOF
Now it works okay... Even with a non-standard location. ( fails on zero size files)

To hide library complaints one could....
[root@kindle soundkloud]# ./prep.sh 2> /dev/null

prep.sh
Spoiler:
PHP Code:
#!/bin/sh
#Check for python
skroot=/mnt/us/soundkloud/  # the default location...
REPORT=""  # error holder
MYPY=/mnt/us/python/usr/bin/python2.7 # the default location...
MYENV=/mnt/us/python/pythonenv # the default location...
TESTURL=google.com # meh you never know... someone might not be able to reach that...

## For if we fail
report ()
# spit it out...
eips -c
echo $REPORT
# Drop and roll...
eips -/mnt/us/soundkloud/prep.jpg
eips 0 1 
"$REPORT"
sleep 2
eips 
"      PRESS HOME KEY TO RETURN TO YOUR KINDLE     "
echo "Sorry it didn't work out... For more info on WHICH PYTHON TO RUN see http://bit.ly/soundkloud"
exit 1
}

## internet test
if ! ping -c 1 $TESTURL > /dev/null
then
REPORT
="    Please connect internet before proceeding    "
eips -c
eips 0 1 
"$REPORT"
sleep 2
eips 
"      PRESS HOME KEY TO RETURN TO YOUR KINDLE     "
exit 1
## we are good to go
else 
echo 
"Internet Connection tests as okay... Continuing"
fi

## python location and version test
if [ ! -e $MYPY ]
then
echo "Non-Standard Python install maybe?... Searching /mnt/us/* (gimme a sec...)"
MYPY=$(find /mnt/us/ -name '*'"python2.7"'*' grep "bin/python" )

## we failed
if [ -z $MYPY ]
then
REPORT
="   PY NOT FOUND. see http://bit.ly/soundkloud    "
report
fi
fi

# Make sure python is 2.7 or later
PYTHON_OK=`$MYPY -c 'import sys
print (sys.version_info >= (2, 7) and "1" or "0")'
`
echo 
"python located, run AND greater than version 2.7: $PYTHON_OK"
if [ "$PYTHON_OK'0' ]; then
REPORT
="   PY VERSION FAIL. see http://bit.ly/soundkloud  "
report
fi

## check we have an env to source - Or find one
if [ ! -e $MYENV ]
then
MYENV
=$(find /mnt/us/ -name '*'"pythonenv" grep "python/pythonenv" )
fi
## we failed
if [ -z $MYENV ]
then
REPORT
="      NO PY ENV?. see http://bit.ly/soundkloud    "
report
fi

## not 0 sized right?
if [ ! -s $MYENV ]
then
REPORT
="   ENV FILE 0 SIZE see http://bit.ly/soundkloud "
report
else
echo 
"using python environment file: $MYENV"
fi

## phew we made it...

cd $skroot
wget http
://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg

usleep 100
source $MYENV 

## hey, if you have a non standard install you could mess with this.
## But the above logic should do the work now...
## Let's hope that you have your python IN your PATH!! 
## meh no? add an extra splatter - just in case...

export PATH=`dirname $MYPY`:/mnt/us/python/usr/bin:/mnt/us/python/usr/local/bin:$PATH
sh 
./setuptools-0.6c11-py2.7.egg 

usleep 100
easy_install pip

usleep 100
pip install soundcloud

usleep 100
pip install 
-I requests==0.14.2

eips 
-c
eips 
-/mnt/us/soundkloud/post.jpg

usleep 500
eips 
"      PRESS HOME KEY TO RETURN TO YOUR KINDLE     " 


this makes a one shot installer a far closer reality.

Also fixed up the build scripts to be much shorter and simpler to read.

reworked the build so that the armv6l and the arm7l targets are chosen at run-time. Thus one release suits all..

more stuff i should note down but yeah progress.
Attached Thumbnails
Click image for larger version

Name:	Selection_102.png
Views:	62
Size:	29.4 KB
ID:	98943   Click image for larger version

Name:	ImageMagick: root.fb.pgm_101.png
Views:	64
Size:	26.7 KB
ID:	98944  

Last edited by twobob; 01-13-2013 at 11:53 PM. Reason: updated prep.sh, added a bunch of error handling, fixed dirname call issue.
twobob is offline   Reply With Quote
Old 01-07-2013, 07:25 PM   #169
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,048
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Just a hint --
Code:
s/"biy.ly/soundkloud"/"bit.ly/soundkloud"/
qlob is offline   Reply With Quote
Old 01-08-2013, 12:29 AM   #170
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,048
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
A present for the masses:
Attached Thumbnails
Click image for larger version

Name:	soundkloud.png
Views:	91
Size:	260.1 KB
ID:	99000  
qlob is offline   Reply With Quote
Old 01-08-2013, 05:12 AM   #171
DuckieTigger
Wizard
DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.
 
DuckieTigger's Avatar
 
Posts: 1,721
Karma: 30954084
Join Date: Dec 2011
Device: PW1, Galaxy S5, Galaxy Note 4, Nexus 7 (2013), Nexus 10
Quote:
Originally Posted by qlob View Post
A present for the masses:
consider a non-locking version. classic
DuckieTigger is online now   Reply With Quote
Old 01-08-2013, 11:54 AM   #172
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,830
Karma: 6314522
Join Date: Feb 2012
Device: Too many.
Dumb-Ass question from an Audio know-nothing

@qlob, @twobob -

Can I get http://www.shoutcast.com/ on this application?

Note their page banner.
If yes, change the splash screen and sell them a copy for Kindles.
Somebody really needs to be paying for all of this "Kindle community service" work.
knc1 is offline   Reply With Quote
Old 01-08-2013, 01:35 PM   #173
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by knc1 View Post
@qlob, @twobob -

Can I get http://www.shoutcast.com/ on this application?

Note their page banner.
If yes, change the splash screen and sell them a copy for Kindles.
Somebody really needs to be paying for all of this "Kindle community service" work.
I played shoutcast streams on my K3 within a week or so of getting my first kindle. Just pipe wget into aplay or something like that. No GUI though. It keeps playing when it goes into screensaver mode too, as long as the USB cable is plugged into the host PC for the internet feed.

For most people, a GUI like this would be a big help though. That nasty command line can be scary and dangerous.
geekmaster is offline   Reply With Quote
Old 01-08-2013, 02:52 PM   #174
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,048
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Quote:
Originally Posted by knc1 View Post
@qlob, @twobob -

Can I get http://www.shoutcast.com/ on this application?

Note their page banner.
If yes, change the splash screen and sell them a copy for Kindles.
Somebody really needs to be paying for all of this "Kindle community service" work.
This looks to be the Docs for their API:

http://wiki.winamp.com/wiki/SHOUTcas...otocol_Details

I'll take a look at it, but no promises

EDIT: no wait, nevermind, their API requires permissions from them to access http://www.shoutcast.com/partner_request_form

Last edited by qlob; 01-08-2013 at 02:56 PM.
qlob is offline   Reply With Quote
Old 01-08-2013, 03:16 PM   #175
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,830
Karma: 6314522
Join Date: Feb 2012
Device: Too many.
"Require Listen Auth" says: "not required"
But would be better to ask them about it first.
knc1 is offline   Reply With Quote
Old 01-19-2013, 01:21 PM   #176
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
So. We have the launcher for this now.

We have all the code.

All we need now if for the music to stop 403ing and this could launch.

but until then... meh.

Annoying really.

Perhaps another API would be the way to go... will look into it RSN then.

but ostensibly this is complete.
twobob is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 03:40 AM.


MobileRead.com is a privately owned, operated and funded community.