Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-06-2012, 10:39 AM   #46
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by twobob View Post
yep. let me go look at those services. one sec

http://qikpad.co.uk/p/e76lAkUNwc
Oh, thank you for your Soundcloud API client/secret id

BTW, it works without kitchen here. But I was required to add source code encoding mark:
Code:
# encoding: utf-8
eureka is offline   Reply With Quote
Old 12-06-2012, 10:45 AM   #47
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,586
Karma: 6299991
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
Quote:
Originally Posted by eureka View Post
Oh, thank you for your Soundcloud API client/secret id

BTW, it works without kitchen here. But I was required to add source code encoding mark:
Code:
# encoding: utf-8
Ah: Thanks. Yeah I am ruminating over guis... any thoughts?

EDIT: Did you try to search for the term "happy" (this returns helpful testing results)
even with # encoding: utf-8 (as second line)

Quote:
Traceback (most recent call last):
File "./soundkloud.py", line 18, in <module>
print '[{2}] Title: {0}\n ID: {1}'.format(track.title, track.id, i)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb4' in position 39: ordinal not in range(128)
-----------------------------

Re the secret. Oh Noes!!!
Please don't maliciously develop anything on our behalf!!

^_____^

Last edited by twobob; 12-06-2012 at 10:54 AM.
twobob is offline   Reply With Quote
Old 12-06-2012, 10:55 AM   #48
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by qlob View Post
Gah... Looks like SoundClouds sends titles as unicode, while the strings I'm using are defaulting to ascii type, so I'm getting errors... time for
Code:
import kitchen
Unicode to ASCII conversion could be made with str.encode, described at the end of this section of Python Unicode HOWTO. And kitchen conversion is based on this method too.

Useful slides about Uncode handling in Python 2.x.
eureka is offline   Reply With Quote
Old 12-06-2012, 11:00 AM   #49
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by twobob View Post
EDIT: Did you try to search for the term "happy" (this returns helpful testing results)
even with # encoding: utf-8 (as second line)
Now I see...

Instead of
Code:
to_bytes(track.title)
use
Code:
track.title.encode('utf-8')
It's built-in method of any Python string.
eureka is offline   Reply With Quote
Old 12-06-2012, 11:00 AM   #50
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by qlob View Post
gimme a second, and I'll check...

err maybe not... I'm limited to just the Kindle and 3G right now...

would you be so kind as to put soundkloud.py up on qikpad.co.uk or piqd, so that i can view it with the Kindle?
@qlob ; twobob -
Don't you two have a WebDAV directory in common?

PM each other - I think you do - if not, I'll stir up the usernames/passwords with a big stick.
knc1 is offline   Reply With Quote
Old 12-06-2012, 12:53 PM   #51
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,586
Karma: 6299991
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
@knc1 oh yeah : ) - but i think he is on kindle at mo. dunno if he has it setup on there...

@Eureka

Quote:
[Cut back to Shifu and the Furious Five who wince and look away as we hear fire burning and Po screaming. He slumps over next to Shifu, burnt and charred.]
Po: How did I do?
Shifu: There is now a Level Zero.
[He snuffs out a flame on top of Po's head.]
Thanks. I will go update stuff
twobob is offline   Reply With Quote
Old 12-06-2012, 02:06 PM   #52
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,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Oh yeah, forgot about that being in there....
@knc1: good ides. but as I switch between computers alot during the week, i prefer something like http://c9.io
@twobob: How do you feel about using c9 for this kind of stuff?
qlob is offline   Reply With Quote
Old 12-06-2012, 02:15 PM   #53
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,586
Karma: 6299991
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 fine. I don't mind either way.

TBH I am still banging my head against "what would be best for the gui"
twobob is offline   Reply With Quote
Old 12-06-2012, 02:18 PM   #54
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,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Quote:
Originally Posted by twobob View Post
yeah fine. I don't mind either way.

TBH I am still banging my head against "what would be best for the gui"
Maybe hack something together like K3MusicManager? It's already got a decent selection dialog and whatnot...
qlob is offline   Reply With Quote
Old 12-06-2012, 02:20 PM   #55
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,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
I'm at c9 right now, if you want to work on something.... Right now, I'm just trying to prettify the commandline interface...
qlob is offline   Reply With Quote
Old 12-06-2012, 03:02 PM   #56
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,586
Karma: 6299991
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
I will be there in an hour
twobob is offline   Reply With Quote
Old 12-06-2012, 03:05 PM   #57
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,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Quote:
Originally Posted by twobob View Post
I will be there in an hour
I might not be home in an hour... would an hour and a half work?

BTW, i added some fanciness to the program, in c9 but I'm running into errors with git... maybe I can fix it later... I'm still getting used to git...
qlob is offline   Reply With Quote
Old 12-06-2012, 04:03 PM   #58
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,586
Karma: 6299991
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
okay mate. I am no git ninja either

I will hang around for a while anyways : )

30 mins

Last edited by twobob; 12-06-2012 at 04:57 PM.
twobob is offline   Reply With Quote
Old 12-06-2012, 04:59 PM   #59
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,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Quote:
Originally Posted by twobob View Post
okay mate. I am no git ninja either

I will hang around for a while anyways : )

30 mins
just got on... had some unexpected things i needed to deal with...
qlob is offline   Reply With Quote
Old 12-06-2012, 07:16 PM   #60
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,586
Karma: 6299991
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
meh no worries.
Life takes precedence.


Quote:
[root@kindle us]# python ./soundkloud.py
hi `TW0B0B` you have access token 1-8889-99999-yada
What do you want to search for? fuckmylife
Spoiler:
[1] Title: Closer
ID: 37859436
[2] Title: Untrust
ID: 55492490
[3] Title: Arcadia
ID: 68234477
[4] Title: derp
ID: 10685216
[5] Title: Zzz
ID: 39612909
[6] Title: Sunspot
ID: 39596270
[7] Title: yay veldt!
ID: 53872812
[8] Title: suckfest2000
ID: 67194101
[9] Title: Cthulhu2
ID: 33575156
[10] Title: failbait rmx!
ID: 40000303

Which track would you like to play? 9
Artist: fuckmylife
Duration (in milliseconds): 107377
MPlayer 1.0rc4-4.2.1 (C) 2000-2010 MPlayer Team

Playing //ec-media.soundcloud.com/V5SE0iku1VeI.128.mp3?ff6118yadayada
Spoiler:
Resolving ec-media.soundcloud.com for AF_INET...
Connecting to server ec-media.soundcloud.com[93.184.221.96]: 80...
Cache size set to 320 KBytes
Cache fill: 0.00% (0 bytes)
Resolving ec-media.soundcloud.com for AF_INET...
Connecting to server ec-media.soundcloud.com[93.184.221.96]: 80...
Resolving ec-media.soundcloud.com for AF_INET...
Connecting to server ec-media.soundcloud.com[93.184.221.96]: 80...
Audio only file format detected.
===========================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
===========================================

AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 149.6 (02:29.6) of 252.0 (04:12.0) 9.3% 46%

*nice tunes*

Exiting... (Quit)
twobob is offline   Reply With Quote
Reply


Forum Jump


All times are GMT -4. The time now is 05:47 PM.


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