Re: My new possession: Lyrics and vocabulary learning with intone

2009-09-05 Thread c_c

Hi,

Laszlo KREKACS wrote:
> 
> If nobody else will step up, I can do it for some new features in
> intone in exchange;))
> I have many small improvements suggestion;)
> 
> Lets wait a week...
> 
  Sure. np. But lets not wait for the improvements to intone. You're welcome
anytime :-D

-- 
View this message in context: 
http://n2.nabble.com/My-new-possession-Lyrics-and-vocabulary-learning-with-intone-tp3580449p3584531.html
Sent from the Openmoko Community mailing list archive at Nabble.com.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: My new possession: Lyrics and vocabulary learning with intone

2009-09-05 Thread Laszlo KREKACS
On Sat, Sep 5, 2009 at 6:43 AM, c_c wrote:
>  Now for some (of the many ;-) python coders on these ML's to show some
> love! Frankly, my python is quite bad - but if no one else does this I will.

If nobody else will step up, I can do it for some new features in
intone in exchange;))
I have many small improvements suggestion;)

Lets wait a week...

Best regards,
 Laszlo

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: My new possession: Lyrics and vocabulary learning with intone

2009-09-04 Thread c_c

Hi,
  Thanks for taking the effort to bring out another interesting usage for
the FR.

Laszlo KREKACS wrote:
> 
> In the exaile music player in plugins/amazoncovers directory
> there  is a good and simple downloader written in python.
> 
  Interesting. I saw that rhythmbox has a similar solution - and there are
some php scripts floatng around too. A standalone script ought to be ideal
for something that might change often (links, service, names etc). 
  Now for some (of the many ;-) python coders on these ML's to show some
love! Frankly, my python is quite bad - but if no one else does this I will.
-- 
View this message in context: 
http://n2.nabble.com/My-new-possession-Lyrics-and-vocabulary-learning-with-intone-tp3580449p3583916.html
Sent from the Openmoko Community mailing list archive at Nabble.com.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: My new possession: Lyrics and vocabulary learning with intone

2009-09-04 Thread Laszlo KREKACS
On Fri, Sep 4, 2009 at 4:50 PM, Laszlo
KREKACS wrote:
> I thought I share my newest hobby using the Freerunner.
> I downloaded lyrics to my musics automatically[1]

I also searched for a solution how to download cover art
automatically from the web.

In the exaile music player in plugins/amazoncovers directory
there  is a good and simple downloader written in python.

It autodownloads covers from amazon.com. I think with a
work like 2-3 hours, it could be adapted to our
needs.

Anybody brave enough to try?

Laszlo

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


My new possession: Lyrics and vocabulary learning with intone

2009-09-04 Thread Laszlo KREKACS
Dear list,

I thought I share my newest hobby using the Freerunner.
I downloaded lyrics to my musics automatically[1], and when I
listen to the music, I mark the words, which I dont know,
and later I download them from wiktionary.com with the
pronounced .ogg file. And I put them into a 'dict'
directory like:
-rw-r--r--1 root root15122 Sep  3 18:41 assured.ogg
-rw-r--r--1 root root  368 Sep  3 18:44 assured.txt
-rw-r--r--1 root root12086 Sep  3 18:41 hound.ogg
-rw-r--r--1 root root 1464 Sep  3 18:41 hound.txt
-rw-r--r--1 root root12443 Sep  3 18:41 possession.ogg
-rw-r--r--1 root root  316 Sep  3 18:41 possession.txt


For learning the vocabulary, I select the 'dict' folder from
the folders/playlist, and I hear again, and again the
words until I memorized enough.
In the lyrics view I have the definition of all words.

Later, when I learned more or less the words, I
put newlines into the definition, so I only
see the word (what is pronounced), but I
need to scroll for the definition. Thats way
I only check the words, which I forgot.

I think Freerunner became an ideal language learning platform.

c_c wrote:
> Can you send me a link - or put up the script on Intone's wiki page. Th
> should help people.

Ok, here is my quick&dirty script. Feel free to contribute, and make
the script better. It works for me(TM).
It has problems, if the lyrics contain utf8 char (example: dash), it fails
to download.
It happened 12 times from 500 music files. So I didnt care to fix it.


1. Download lyric: http://pypi.python.org/pypi/lyricwiki/0.1.9
2. Put into a dir and make the 'lyrics_downloader' variable
accordingly.
3. Save the script into the same dir as your downloadable
music files are. call the script with no argument.

Hope it is useful to someone.

Best regards,
 Laszlo

#! /usr/bin/python

import os
import subprocess

lyrics_downloader = '/home/looser/Desktop/down/lyrics'

def extract_keywords(filename):
keywords = filename.replace('0', '')
keywords = keywords.replace('1', '')
keywords = keywords.replace('2', '')
keywords = keywords.replace('3', '')
keywords = keywords.replace('4', '')
keywords = keywords.replace('5', '')
keywords = keywords.replace('6', '')
keywords = keywords.replace('7', '')
keywords = keywords.replace('8', '')
keywords = keywords.replace('9', '')
keywords = keywords.replace('&', '')
keywords = keywords.replace(' - ', ' ')
keywords = keywords.strip()
return keywords

def dump_to_file(keywords, filename):
global lyrics_downloader
res = subprocess.Popen([lyrics_downloader, keywords], stdout =
subprocess.PIPE)
result = res.stdout.read()
fd = open(filename+'.txt', 'w')
fd.write(result)
fd.close()
return


for root, dirs, files in os.walk('.'):
for file in files:
j = file.rfind('.mp3')
filename = file[:j]
keywords = extract_keywords(filename)
print filename, ":", keywords
dump_to_file(keywords, filename)

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community