conTEXT

Amarok 1.x Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
5.0
Description:

This script looks for text or html files in the playing directory and (optionally) web reviews for the currently playing album. On success it inserts them in a new manageable box into the context browser.

To access the review search menu, move your mouse over the conTEXT icon in the lower right corner of the context browser. Here you can click a site name to start a single search, or select sites for auto-search (which will be triggered when the album changes or the script is restarted). Found reviews are stored in the file's directory by default.

Amarok 2 version: http://kde-apps.org/content/show.php?content=159427
Last changelog:

7 years ago

2010.11.17: 2q
2010.01.09: 2p
2010.01.01: 2o
2009.04.12: 2n
2008.01.02: 2m
2007.11.02: 2l
2007.08.17: 2k
2007.02.26: 2j
2007.02.19: 2i
2007.02.04: 2h
2006.12.28: 2g
2006.12.27: 2f
2006.09.14: 2e
2006.09.05: 2d
2006.08.21: 2c
2006.08.20: 2a, 2b

q: fixed allmusic, metacritic, pitchfork, rollingstone (but they seem to remove older reviews) and laut.de
p: fixed metacritic empty pages; more progressiveworld hits;
o: fixed metacritic, progressiveworld; removed broken searches: bbc,dis,nme,stylus; funny new experimental feature: mouseover cover will show the large version
n: fixed most review sites (e.g. bbc, cduniverse, dis, pitchfork, plattentests.de, punkbands, rollingstone,...search and/or display faults)
m: fixed nme, disabled playlouder; fixed some links inside reviews; improved allmusic, bbc, dis, guardian, laut, metacritic and stylus display (e.g. no site-specific fonts anymore)
l: added cduniverse.com; fixed punkbands.com; fixed pitchfork header display
k: fixed fast scrolling for new khtml versions; fixed playlouder.com; fixed rollingstone display; fixed plattentests.de referenzen
j: Added a button to search all (or all marked) sites manually (no need to restart the script anymore); Clicking the conTEXT icon now toggles the popup menu; Removed a popup warning which appeared when playback was stopped while searching;
i: Fix/workaround for the bug that prevented conTEXT from starting (when the name of the previously displayed text file contained a foreign character);
h: added icons to the search/popup menu for opening the currently loaded text file in KDE's default application (for editing) and for deleting (trashing)
g: added graphical scroll arrows with "jump to top/bottom" functionality, improved rollingstone.com interface
f: added metacritic.com, fixed bbc.co.uk
e: small fixes for allmusic, playlouder, stylus
d: added allmusic.com
d: fixed laut.de
d: improved drownedinsound hit rate
c: for txt files:
... wrap at context browser width
... don't use monospace font
... disable the "auto-shrink box" feature for short files when in scroll mode
b: removed a call to saveCurrentPlaylist (which makes Amarok hang for large playlists and was seemingly able to kill conTEXT)
b: set a timeout of 10 seconds for search requests
b: avoid temp files to be written to home directory when KDE session is quit with Amarok still running
a: quick fix to make it work (at least not exit) with last.fm streams (you can't have more than one review at a time yet)

2006.08.19: 2
manual or automatic album review search at various sites (11 english, 2 german)
remember scrolling position on song change
links are opened in external browser (which you set in amarok configuration)

2006.06.03: 1
initial release

C

camico

14 years ago

Auto-search will be triggered when the album changes or the script is restarted.
Do you see the search animation icon (I guess this should be improved). Move your mouse over it, hold still, and see if you get any status info. Maybe it just can't find anything for your album. Correct tags are important, of course.
However if it says "Found!" somewhere and, once all marked sites have been searched, you still don't see a review...set DEBUG = True in common.py, then try again and send my the log...

Report

mahen

14 years ago

Hi ! When trying to execute the script (Amarok 1.4.1, Kubuntu Dapper), I get the following error :)

ERROR:ContextBrowserUpdater: Something wrong in context browser monitor, process stopped 'utf8' codec can't decode bytes in position 212-214: invalid data ex
ceptions.UnicodeDecodeError
Traceback (most recent call last):
File "/home/mahen/.kde/share/apps/amarok/scripts/conTEXT/ContextBrowserUpdater.py", line 85, in run
try: self._run()
File "/home/mahen/.kde/share/apps/amarok/scripts/conTEXT/ContextBrowserUpdater.py", line 132, in _run
self.has_injected = self.performInjection()
File "/home/mahen/.kde/share/apps/amarok/scripts/conTEXT/ContextBrowserUpdater.py", line 276, in performInjection
filetexts = filetexts + tounicode(text).strip('\n\x0b\x0c\r').replace('\t',' ') + mark
File "/home/mahen/.kde/share/apps/amarok/scripts/conTEXT/common.py", line 21, in tounicode
return unicode(string,locale.getpreferredencoding())
File "/usr/lib/python2.4/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 212-214: invalid data

Report

C

camico

14 years ago

ah, in the meantime, please delete ~/.kde/share/apps/amarok/scripts-data/conTEXT.conf and try again

Report

C

camico

14 years ago

Argh, I hope this doesn't happen on every ubuntu system (they are using utf8 by default). I'll try to fix it some time.

Report

seb

14 years ago

hi there,
this is a very interesting script. could you please write a little on how it works to update the context browser, because afaik we don't provide a way to modify the contextbrowser!

Can you also email this to amarok@kde.org ?

cheers,
seb

Report

saladasalad

14 years ago

Good work! How about searching for reviews from http://www.allmusic.com/ they have loads of reviews. Or maybe even make it configurable like Konqueror's search bar.

Report

reggler

14 years ago

crashed here and a box came up, i should report the content of conTEXT.log to the developers. Here we go:
ERROR:root: An error occurred while starting up. PID: 27053
Traceback (most recent call last):
File "/home/reg/.kde/share/apps/amarok/scripts/conTEXT/conTEXT.py", line 261, in main
try: _actual_main()
File "/home/reg/.kde/share/apps/amarok/scripts/conTEXT/conTEXT.py", line 220, in _actual_main
amarokObject = amaroKProxy()
File "/home/reg/.kde/share/apps/amarok/scripts/conTEXT/lib/amarok.py", line 740, in __init__
self.smartPlaylistCollection = amaroKSmartPlaylistCollection(self)
File "/home/reg/.kde/share/apps/amarok/scripts/conTEXT/lib/amarok.py", line 589, in __init__
self.filename = os.path.join(os.path.dirname(parent.playlist.getPlaylistPath())
File "/home/reg/.kde/share/apps/amarok/scripts/conTEXT/lib/amarok.py", line 519, in getPlaylistPath
if not hasattr(self,"_playlistPath"): self._playlistPath = self.saveCurrentPlaylist()
File "/home/reg/.kde/share/apps/amarok/scripts/conTEXT/lib/amarok.py", line 529, in saveCurrentPlaylist
return self.call("saveCurrentPlaylist")
File "/home/reg/.kde/share/apps/amarok/scripts/conTEXT/lib/amarok.py", line 137, in call
return dcop_amarok(self.objectName,method_name,*args)
File "/home/reg/.kde/share/apps/amarok/scripts/conTEXT/lib/amarok.py", line 77, in dcop_amarok_commandsplus
raise DcopAmarokFailed(command,status,output+error)
DcopAmarokFailed: DCOP amaroK failure: command ['dcop', 'amarok', 'playlist', 'saveCurrentPlaylist'] failed with status 'process 27057 exited with status 1' and output call failed


cheers
Ron

Report

C

camico

14 years ago

Hmm thanks for reporting, are you maybe running a really old version of Amarok? Something like 1.2.x?
If not, what happens when you run the following command from a console:
dcop amarok playlist saveCurrentPlaylist

Report

reggler

14 years ago

no, i'm running svn from last week.
"dcop amarok playlist saveCurrentPlaylist" makes my amarok crashing... well not crashing but hanging... :(

Report

C

camico

14 years ago

Please try release 2b.

Report

atordo

14 years ago

Very handy if you have lyrics and tabs in the same dirs as the audio files. Nice work.

Report

Superstoned

14 years ago

I think its a great idea, really. nice job!

Report

timthelion

14 years ago

please note this is named the same as this http://www.context.cx/ wich is unrelated (and cooler ;) )

Report

MxCl

14 years ago

Woah. Unecessary agression.

Google doesn't care about case so his point is sound. Calm down.

Report

C

camico

14 years ago

I think I have to agree with bsander. And btw the name is NOT identical ;)

Report

bsander

14 years ago

why the fuck would anyone confuse those two? That link of yours isn't even available on any platform KDE runs on.

Report

timthelion

14 years ago

wine :)

all I was saying was that it had the same name. it's almost like naming a web brouser front page. this is a HTML viewer and that is an HTML editor :) no offense meant

Report

7 years ago

2010.11.17: 2q
2010.01.09: 2p
2010.01.01: 2o
2009.04.12: 2n
2008.01.02: 2m
2007.11.02: 2l
2007.08.17: 2k
2007.02.26: 2j
2007.02.19: 2i
2007.02.04: 2h
2006.12.28: 2g
2006.12.27: 2f
2006.09.14: 2e
2006.09.05: 2d
2006.08.21: 2c
2006.08.20: 2a, 2b

q: fixed allmusic, metacritic, pitchfork, rollingstone (but they seem to remove older reviews) and laut.de
p: fixed metacritic empty pages; more progressiveworld hits;
o: fixed metacritic, progressiveworld; removed broken searches: bbc,dis,nme,stylus; funny new experimental feature: mouseover cover will show the large version
n: fixed most review sites (e.g. bbc, cduniverse, dis, pitchfork, plattentests.de, punkbands, rollingstone,...search and/or display faults)
m: fixed nme, disabled playlouder; fixed some links inside reviews; improved allmusic, bbc, dis, guardian, laut, metacritic and stylus display (e.g. no site-specific fonts anymore)
l: added cduniverse.com; fixed punkbands.com; fixed pitchfork header display
k: fixed fast scrolling for new khtml versions; fixed playlouder.com; fixed rollingstone display; fixed plattentests.de referenzen
j: Added a button to search all (or all marked) sites manually (no need to restart the script anymore); Clicking the conTEXT icon now toggles the popup menu; Removed a popup warning which appeared when playback was stopped while searching;
i: Fix/workaround for the bug that prevented conTEXT from starting (when the name of the previously displayed text file contained a foreign character);
h: added icons to the search/popup menu for opening the currently loaded text file in KDE's default application (for editing) and for deleting (trashing)
g: added graphical scroll arrows with "jump to top/bottom" functionality, improved rollingstone.com interface
f: added metacritic.com, fixed bbc.co.uk
e: small fixes for allmusic, playlouder, stylus
d: added allmusic.com
d: fixed laut.de
d: improved drownedinsound hit rate
c: for txt files:
... wrap at context browser width
... don't use monospace font
... disable the "auto-shrink box" feature for short files when in scroll mode
b: removed a call to saveCurrentPlaylist (which makes Amarok hang for large playlists and was seemingly able to kill conTEXT)
b: set a timeout of 10 seconds for search requests
b: avoid temp files to be written to home directory when KDE session is quit with Amarok still running
a: quick fix to make it work (at least not exit) with last.fm streams (you can't have more than one review at a time yet)

2006.08.19: 2
manual or automatic album review search at various sites (11 english, 2 german)
remember scrolling position on song change
links are opened in external browser (which you set in amarok configuration)

2006.06.03: 1
initial release

12345678910
Be the first to comment
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
2q
updated Jun 29 2013
added Jun 02 2006
downloads 24h
0
mediaviews 24h 0
pageviews 24h 2
System Tags addon