Hey :)
As I mentioned in my previous post, I'm working on revamping Amarok's scripting interface for GSoC 2013. Here's an update on what I've been working on these past 3 weeks.
Yes, the popup's ugly. It's going to be a simple modal dialog instead, as Mark [my mentor, Amarok founder] suggested.
Hovering over the running script , you now get controls for stopping the script, and clearing it. Scripts are automatically saved to the disk (with random names and other plugin specs for now), and you can optionally have them cleared from the disk too.
Double clicking on the script, opens up the editor, and like the main editor on the left. It is a standard katepart, so you get cool features like syntax highlighting, word completion and auto-indentation.
This is quite crude a prototype right now, though. If approved, I'll hopefully be able to work on a code completion model, so you can have auto-completion for Amarok Script. This does, however, pose some difficulties, but they can hopefully be sorted out with the help of my mentor and the kparts team.
There's also two bug fixes- a fix for the crashes on disabling Free Music Charts, and a fix for crashes that may occur when the dependencies for a script weren't listed in its specs.
PS - My apologies for not having been regular with my blog updates- there isn't really much I can say in my defense, except for the assurance that I'll be more regular from now on.
PPS-
Again, I repeat:
Amarok Script Authors please provide feedback on what you'd like to see in the scripting interface here [comments on the blog are okay, too] so I can work on implementing it.
As I mentioned in my previous post, I'm working on revamping Amarok's scripting interface for GSoC 2013. Here's an update on what I've been working on these past 3 weeks.
1. Script Termination
Amarok now checks running scripts, and offers to terminate long running/ unresponsive ones after a 5 second duration, so you can now kill unresponsive scripts instead of having Amarok freeze on you.Here's a screenshot of the popup:Yes, the popup's ugly. It's going to be a simple modal dialog instead, as Mark [my mentor, Amarok founder] suggested.
2. Collection Management
Now, script writers have access to Amarok's underlying collection management. Scripts can now access collections, query them using simple collection browser like queries, and copy/ move files among them.3.Script Console
I've now been working on a new script console- here's a screenshot:Hovering over the running script , you now get controls for stopping the script, and clearing it. Scripts are automatically saved to the disk (with random names and other plugin specs for now), and you can optionally have them cleared from the disk too.

This is quite crude a prototype right now, though. If approved, I'll hopefully be able to work on a code completion model, so you can have auto-completion for Amarok Script. This does, however, pose some difficulties, but they can hopefully be sorted out with the help of my mentor and the kparts team.
There's also two bug fixes- a fix for the crashes on disabling Free Music Charts, and a fix for crashes that may occur when the dependencies for a script weren't listed in its specs.
PS - My apologies for not having been regular with my blog updates- there isn't really much I can say in my defense, except for the assurance that I'll be more regular from now on.
PPS-
Again, I repeat:
Amarok Script Authors please provide feedback on what you'd like to see in the scripting interface here [comments on the blog are okay, too] so I can work on implementing it.
"Amarok now checks running scripts, and offers to terminate long running/ unresponsive ones"
ReplyDeleteGood idea. The popup message is maybe a bit too technical, something like "not responding" seems more apropriate to me.
You're right, "Not Responding" does seem more succint, though I wonder how well that translates over to other languages.
DeleteSome applications will launch a web server and it would be interesting to have a quick way to restart an application after changes.
ReplyDeleteAlso, it would be interesting to have a repl for quick tests as well as being able to run a selected snippet only and it would be awesome if we could have some real debugger in the editor ;)
You can simply click on the little play button you get over the script after editing to relaunch it, gotta be fast enough. A repl sounds great, and would be trivial to add too :) I'm not sure about the debugger, though simple syntax checking and highlighting shouldn't be hard.
DeleteAs far as launching snippets is concerned, why not just copy-paste it into the console?
Modal dialogs are the worst!
ReplyDeleteMaybe just kill the script with an easy-to-ignore option to restart it and not kill it next time. Also wouldn't be unreasonable to just silently kill such scripts.
Finally, somebody who agrees with me ;)
DeleteMaybe we can have a timer, like in the longMessages, and the script's auto-killed after that.
Ooh, code completion for random languages in KatePart... I'm definitely interested in that. It's been on my "I want to do that one day" list for a long time ;)
ReplyDeleteWill you be at akademy? Maybe we can talk about it there.
Cheers,
Sven
Not going to Akademy :(
DeleteI did try the code completion thingy though, I hardcoded a bunch of the scripting API calls. It's trivial introspecting my QtScript API calls at runtime and generating a list, but I doubt that's a very good way of going about it. Quite a bit of it is copy pasted from kate sources, and the popup looks broken, though it works fine.
I didn't wanna spend too much time on it until getting markey's approval. Here's the code(warning- ugly) for the completion model:
http://paste.kde.org/792968/
Hi Anmol,
ReplyDeleteas one of the authors of the Rating Statistics addon ( http://kde-apps.org/content/show.php/Rating+Statistics?content=100541 ) I had a hard time getting the path to the album cover for a given song.
The problem was not querying the database but rather the interpretation of the data. For some songs the database holds a strange MD5 hash, for others an even stranger filename and whatever.
I don't know if this is already inclueded in the "access to Amarok's underlying collection management" you mentioned. If not, regard this as a wish :)
I doubt the url is guaranteed to be local, but a hash does sound weird. The current state probably isn't any different though, I haven't touched the scripting track prototypes (not that the problem lies there, it's just a wrapper).
ReplyDeleteHave you tried using .imagePixmap( ) instead?
As far as I can see from the API documentation, you can get a track prototype (and therefore a .imagePixmap() method) only for the current track. But for Rating Statistics, we need the image for an arbirary track.
DeleteI just had a look at your script. You're right, such queries aren't possible with the the query maker I exposed, not yet at least. Lemme see what I can do about it :)
ReplyDeleteThese kind of articles are always https://www.assignmenthelper.com.au/nursing-assignment-help/ attractive and I am happy to find so many good point here in the post, writing is simply great, thanks for sharing.
ReplyDeleteThis is very informative and very easy to understand. These kind of article is amazing and I do really love to read.
ReplyDeleteYou definitely have shared here is very helpful for what Im trying to program now.
ReplyDeleteCant wait for the upgraded one.
ReplyDeletehttps://www.concretecontractorsfayettevillear.com
You really did a great job making this article. Thanks for sharing! www.concretescottsdale.com/
ReplyDeleteI remember we have started from this as well.
ReplyDeleteapply here
Thanks for sharing this. I did this along time ago.
ReplyDeletewww.concreteprosroundrock.com/
Great site. Im glad I found it.
ReplyDeleteYes, You have a point there. Thanks for sharing your content. Click
ReplyDeleteThis is great. I will let my friends know about this. Thanks. https://www.carbodyrepairsglos.com/dent-repair.html
ReplyDeleteIt is so nice seeing this post Manassas Tow Truck
ReplyDeleteThis is interesting! tow truck
ReplyDeletenice site, informative
ReplyDeleteFairfax Tow Truck
So nice!
ReplyDeletetow truck
Excellent website, very interesting Burke Tow Truck
ReplyDeleteThis is great, excellent post || towing service
ReplyDeleteInteresting post , very nice! Reston Tow Truck
ReplyDeleteThis blog is really nice McLean Tow Truck II
ReplyDeleteAwesome Leesburg Tow Truck
ReplyDeleteAwesome, this is a good one Annandale Tow Truck
ReplyDeleteI'm glad to see this page Woodbridge Tow Truck
ReplyDeleteThis page is great tow truck
ReplyDeleteVery nice Arlington Tow Truck
ReplyDeleteSite is so nice Sterling Tow Truck
ReplyDeleteGreat information
ReplyDeleteChantilly Tow Truck
That is a nice post
ReplyDeleteCentreville Tow Truck
This is a must-read content Vienna Tow Truck
ReplyDeleteThis website is great Tysons Tow Truck
ReplyDeleteThis is an excellent content Warrenton Tow Truck
ReplyDeleteInformative site, so nice Aberdeen Tow Truck
ReplyDeleteGreat content, excellent! Edgewood Tow Truck
ReplyDeleteWell done on this post Ellicott City Towing Service
ReplyDeleteWell written content. Thank you for sharing. Glen Burnie Towing Service
ReplyDeleteI went through this website and found it very impressive. Keep sharing! Middle River Tow Truck
ReplyDeleteInteresting piece, thanks for sharing! Rosedale Tow Truck
ReplyDeleteThis is an interesting article. Towson Tow Truck
ReplyDeleteInformation on your content is excellent Orlando Towing & Recovery
ReplyDeleteIt is nice seeing this page, informative one! Harrisonburg Tow Truck
ReplyDeleteInformative! This is great! Lynchburg Tow Truck
ReplyDeleteWell written post! Newport News Tow Truck
ReplyDeleteValuable information, awesome! Norfolk Tow Truck
ReplyDeleteI really like all the points you made. Petersburg Tow Truck
ReplyDeleteGreat job for publishing such a beneficial web site Richmond Tow Truck
ReplyDeleteThanks for sharing this! This looks pretty informative! Kissimmee Tow Truck
ReplyDeleteThis is an impressive and informative site. Keep it up Orlando Tow Truck
ReplyDeleteThanks for sharing this! This is very insightful! Sanford Towing Service
ReplyDeleteThanks for this information. I appreciate it Charlottesville Tow Truck
ReplyDeleteContent is really nice, it is well written. Chesapeake Tow Truck
ReplyDeleteTo me this a is very nice site. Hampton Tow Truck
ReplyDeleteYou did a great job on this excellent site Roanoke Tow Truck
ReplyDeleteI am glad seeing this nice website. Staunton Tow Truck
ReplyDeleteKeep sharing great post, I like them. Virginia Beach Tow Truck
ReplyDeleteI personally like your post Waynesboro Tow Truck
ReplyDeleteI’m really impressed with your article Winchester Tow Truck
ReplyDeletethank you sharing such helpful article! Cctv Gloucestershire
ReplyDeletethis blog has given me ideas about scripting interface electrical wiring extension Cheltenham
ReplyDeleteTowing Service Fredericksburg VA is a full service towing, rescue, and recovery business serving the city of Fredericksburg and all of the surrounding areas of Virginia.
ReplyDeleteThe team at Towing Service Independence MO are proud to serve a large service area.
ReplyDeleteNorthern Virginia Private Property Parking Management is a reputable parking management company in Arlington, Virginia and its environs.
ReplyDeleteTow Truck Albany NY is happy to service the greater Albany, Schenectady and Troy with our full fleet of tow and roadside assistance vehicles.
ReplyDeleteLawn Care Fredericksburg VA has been dedicated to enhancing appearance of Virginia homes for years.
ReplyDeletehere in Hialeah Tow Truck, we have been proud to service Hialeah, FL and the surrounding area for years.
ReplyDeletevisit us
Tow Truck West Palm Beach FL have been working hard to establish our brand within the lower Florida area.
ReplyDeletekeep it up!
ReplyDeleteTowing Service Culpeper, VA is one of the top towing companies in the state and can provide a wide range of towing and roadside assistance services.
equipement hauling Manassas VA is a local service that you can trust to get your large valuable assets to where they need to be.
ReplyDeleteCash For Junk Cars Northern Virginia began as a small family business in North Virginia. We want our customers to feel that they can recommend us to their family and friends.
ReplyDeleteTow Truck Abingdon MD have taken this negative connotation of our business and flipped it on its head.
ReplyDeleteThe team at Tree Service Fredericksburg VA are true experts of their craft.
ReplyDeleteGreat blog. Keep up the good work. professional fencing solutions
ReplyDeletePretty amazing content. fence baltimore experts
ReplyDeleteGreat article. tree removal service professionals
ReplyDeletePretty nice article. Keep up the good work. Cloud services
ReplyDeleteThank you or the content. decorative concrete omaha ne
ReplyDeleteAmazing article. professional fences Milwaukee firms
ReplyDeleteInteresting content. tulsa foundation repair company
ReplyDeletePretty impressive blog. our team of Carolina IT professionals
ReplyDeleteGreat work. Keep up the good work. best wrought iron fencing solutions
ReplyDeleteGreat job. Keep up the great work. privacy fence lincoln ne
ReplyDeleteNice blog. Looking for more. www.fencingfortcollinspros.com
ReplyDeleteNice work. Looking for more. Foundation repair settlement
ReplyDeleteNice blog. Looking for more. fencecompanybuffalony
ReplyDeleteThank you or the article. fencing sarasota
ReplyDeleteVery well written content. concrete raleigh
ReplyDeletePretty great blog. kansas city concrete contractors
ReplyDeletePretty well written blog. steel deck frame
ReplyDeleteGlad to found this great blog. fencecompaniesstpetersburgflpros.com
ReplyDelete