Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

3
Become a Fan
7.0

Description:
Select a piece of a webpage to create your own auto updating plasmoid.

Just search for a webpage and click on the area to keep!

You can also import community made plasmoids in one click or save and publish your plasmoid online.

Also support plasmoid creation from HTML embed code.

This plasmoid require plasma-scriptengine-ruby and ruby-qt or korundum.

To install the plasmoid
1. Install the dependencies plasma-scriptengine-ruby and ruby-qt or korundum if needed
2. Right click on your desktop and select Add plasmoid.
4. Click on Install new plasmoids. Choose either download and browse for the piece of web plasmoid or from local file by using the downloadable zip of this page (plasmoid mode).
5. Add a piece of web plasmoid to your desktop.

Ratings & Comments

31 Comments

Wattos

Is it possible for someone to upload a backup of this plasmoid? It seems that the original url does not work anymore

gravy

Yes. Pls reupload this plasmoid. Link broken.

gravy

plasmoidviewer ~/.kde/share/apps/plasma/plasmoids/piece-of-web/ Bus::open: Can not get ibus-daemon's address. IBusInputContext::createInputContext: no connection to ibus-daemon plasmoidviewer(4344)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "" not found /usr/lib/ruby/1.8/Qt/qtruby4.rb:2640:in `initialize': wrong number of arguments (3 for 2) (ArgumentError) /usr/lib/ruby/1.8/Qt/qtruby4.rb:2640:in `call' /usr/lib/ruby/1.8/Qt/qtruby4.rb:2640:in `try_initialize' /usr/lib/ruby/1.8/Qt/qtruby4.rb:2639:in `catch' /usr/lib/ruby/1.8/Qt/qtruby4.rb:2639:in `try_initialize' RubyAppletScript::Applet#init mainScript: /home/dh/.kde/share/apps/plasma/plasmoids/piece-of-web/contents/code/main.rb RubyAppletScript::Applet#init instantiating: PieceOfWeb::Main Object::connect: No such slot Plasma::WebView::urlChanged(const QUrl &) Object::connect: No such slot Plasma::WebView::urlChanged(const QUrl &) /usr/share/kde4/apps/plasma_scriptengine_ruby/applet.rb:54: command not found: ruby /home/dh/.kde/share/apps/plasma/plasmoids/piece-of-web/contents/code/update_check.rb

anderslund

What is the refresh rate counting? 0.10 is what, seconds? minutes? msecs? what? Otherwise, nice applet :)

dovidhalevi

The setup dialog is so excruciatingly slow that one simply cannot use it. It should come up with some valid content rather than a javascript empty document error timing out over and over. If the ruby cannot perform, then a compiled language may be in order (using qtwebkit). OK, I am using a 600mhz PIII, but CPU cycles are not the problem. This is too nice an idea to give it up in frustration.

cedriK

I don't think ruby is the issue because ruby does not really much: this plasmoid uses the compiled qtwebkit engine (part of qt). I'd rather think of an Internet connection problem: The configuration dialog should show a webpage suggesting you to search for a page to make your plasmoid from. Are you using a proxy ?

dovidhalevi

So if you are using qtwebkit, it should be doing much much better. However, I have had interpreted apps with unusable dialogs. I am using tinyproxy and dansguardian. I could try bypassing this. However, until I could even enter a URL was interminable. Once I got the page, I could not attempt to select to piece I wanted in the applet because the thing simply would not respond.

dovidhalevi

As I said, I have had problems with dialogs in other interpreted or scripted UIs. Java, for example. To keep the Java UI responsive, I have used threads. The UI is on the main thread. Everything else is in background threads. BTW, Qt4 is designed to mimic the Java API. Also, internet and other loading in plasmoids must be asynchronous. Start a thread to load, signal the main thread when done. Similar issues with the UI!

cedriK

The area picking is done in javascript (some javascript is injected into the webpage). The mousemove event was not really optimized (adding borders to the element at each mouse move). So I changed it so that it bypass events for the same element. This should speed up the area picking part.

dovidhalevi

May be a good idea. However, I never got that far. The response of the dialog needs to be fixed before I can try all this out. Check threading.

dovidhalevi

Hint: I tried it out again, took half hour to get the web page up, then restarted it when I clicked to select the area. So ... I removed the plasmoid. The dialog was still up! Low and behold, the web page loaded and I got the prompt to select the area, did so, tested it, wonderful! Just no plasmoid. Crashed plasma on exit but to be expected. So it is the plasmoid itself (or its interaction with the dialog--BTW, give it some poetic symbolic title :-) -- that is stalling the business.

cedriK

Ok I see. I think I know where the problem is. At startup the plasmoid wait for an internet connection (otherwise it display an error at system startup). To check the connection it merely try to ping google each 100ms like this : ping google.com -c 1 But maybe your connection prevent this command from being executed in the given 100ms. Can you try this command "ping google.com -c 1" and count how long it last and with which result? Anyway, I think I should move to another solution for the internet Checking.

dovidhalevi

ALL data test/load be they from local or from the internet, must be asynchronous! Otherwise, plasma will wait and wait with a black screen. I have had this happen. Very embarrassing. I cannot ping out (I guess I can enable it in my firewall). A plasmoid must initiate the test or load, go on its merry way, allow init() to complete, allow the GUI to be active. A signal of completion must be received and then the data can be used. The graphic can have the "busy" animation meanwhile, but the UI should remain crisp and active, graying anything dependent on the data. Use provided (or write) dataengines where appropriate. The ping to me is a no-no. No data or no connection? After a certain time (one-shot QTimer), a message box and a no-data graphic. Allow me to retry/refresh from the config dialog since internet connections do go up and down.

dovidhalevi

I enabled the ping and all flows nicely--still best do it without the ping and be fully asynchronous. Issues: 1. To be able to read it :-) Setting background color, adjusting the transparency (if supported), etc. CSS? (need to remember how to use that!). 2. If a link is displayed and clicked, what should happen? Open in plasmoid? Will usually be too small, set to show a smaller section, huh? Another window in right click choices does nothing. So the user's default browser (or one chosen in the config) should come up with the link. Plasmoid should be unaffected by this.

cedriK

I replaced the ping by a service call to KDE. 1. The transparent default background is not really great. I may had a default white background in the page css. FYI: you can add body{background:white} in the Advanced CSS section or you can use the predefined javascript hiding others which keeps the default page styles (but often it keeps some margins which are not well suited for a small plasmoid). 2. I'll add the click on link functionnality and I agree with your solution: to open in the user default browser.

dovidhalevi

1. Unzip to a parent directory, i.e. pieceofweb. 2. How does one install it? Give script or instructions.

mirzaD

I was struggling with that too :) Do not unzip just download it. Install all dependencies mentioned above, especially plasma-scriptengines Now go to the install folder and open terminal and type: Quote:

plasmapkg -i piece-of-webv0.2v.zip
You could try to install it graphical way add widgets -> install new widgets -> install widget from local file -> choose web widget and next-> chose web archive but that approach did not work with me, I had do it the CLI way. Hope this helps

mirzaD

now this is great, and extremely usable :) thank you for making this. one question, could you support flash, because great deal of web content is flash based, like games and videos. a really great job on usability:)

cedriK

Flash will be good for sure. I tried to enable it but it either crashes the desktop or load the flash in a new window. I think this is due to how plasma desktop is drawn but I'll try to ask informations to plasma developers.

eMerzh

Yeah it's reaaaalllllyy Cooool ... I had this idea but ..don't know how to do this... i haven't thought to use jquery.... really nice... But the view is quite instable... it refresh all the time and become gray... Are you using a source repo where we can see/submit our code idea/contributions /...?

cedriK

This new version should be more stable. No repo as for now.

mirzaD

If this plasmoid is what I think it is: widget that can display only part of web page, like one DIV field... It is too complex, could you make it more user friendly.. I still haven't figured out how to display a part of web page. If I did not understand a plasmoid function, my bad sorry.

cedriK

Yes this is one of the function that it can do, but the solution I propose is a more powerfull and simple to implement - but it need javascript and html skills. The problem is that selecting the part of a page is by nature complex. That's why I prefer to use the inspect feature of firebug (select the element by clicking on the page) and then constructing my jquery selector as the best way possible. For exemple you might want to select the 3rd parent div of a link which contain a specific word which will lead you to this code : $("body").replaceWith($("a:contains('the link word')").parents("div:eq(2)")) What would you suggest anyway ?

mirzaD

I don't know if you use it but on Firefox there is extension Adblock Plus. With it you can right click on some parts of web page and chose to "adblock block frame". I am not sure but if you could use the same principle.

cedriK

I made lot of improvments to the plasmoid and it now support a really easy selection mode. And you can also publish your plasmoid or get one made by others.

Pling
0 Affiliates
Details
license
version 0.2
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

Other Plasma 4 Extensions:

Icon Tasks deb build
N00bun2
last update date: 13 years ago

Score 4.3

Prayer Times Plasmoid
riyad
last update date: 12 years ago

Score 5.2

KPrayertime4 Islamic Prayer Times
ahaq
last update date: 15 years ago

Score 4.4

Hostinfo
mgraesslin
last update date: 13 years ago

Score 4.7

Monitor QuadCore Russian
kuchumovn
last update date: 16 years ago

Score 5.0

blaKjaK
werevire
last update date: 15 years ago

Score 5.0