You are not logged in.

#1 2010-05-11 05:41:29

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

So, this started out because I was very frustrated that it seemed that there weren't any actual clones of Mozilla Prism based on webkit besides one which was OS X only. For a while I just sat on this idea, hoping that something would show itself, but eventually I wanted to use webkit for something else, and stumbled on a beautiful piece of code by Andy Biener which started me on the project. Since I have cut much out of it, changed it, hacked it, but I still give credit to him since, without his code, I wouldn't have started it. wink

Anyway, PrisPy is, as the name suggests, a PyGTK Webkit clone of Mozilla's Prism application. Basically it allows you to view a website in a window without all the 'fat' that is associated with many of the web browsers available (even lighter ones, including uzbl). Why use this? In theory, it should take a lot less resources than any other web browser to render the page, and should help 'integrate' the apps into the desktop better. It isn't very advanced yet, though, and I am still learning Python myself, though I do have a good backing in PHP which helps (no fights, fanboys/fangals wink).

Anyway, to run it, just run this script without any parameters what-so-ever, a terminal is no longer needed. You can edit the shortcuts, create new ones, and delete them all from within the GUI. The 'legacy' ./prispy.py programName is still supported, but I recommend using the GUI instead. Also, the user agent string is manual for now, I recommend going to this site to get a list of strings for your preferred web browser.

Changelog:
0.1a4: General bugfixes plus .desktop file creation support.
0.1a3: Added an optional combined navigation/status bar. If enabled, you can switch between shortcuts by using the Index button. Also, cleaned up the new/edit shortcut dialogs a bit.
0.1a2: Added ability to use user agent strings. Also GUI-ified the startup, no longer having to run ./prispy.py to configure and ./prispy.py programName to run your program, instead just having to run the script once to add, edit, and remove the shortcuts.

Current Release: 0.1a4
Get it here!

Last edited by smartboyathome (2010-07-16 02:55:45)

Offline

#2 2010-05-11 16:24:12

Atticus
Member
Registered: 2007-06-14
Posts: 52

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

I gave it a shot and it worked as described. 

Here are a couple suggestions for possible future development:

- Have a single, unified configuration interface that allows one to add/edit/delete apps
- Allow the user to create shortcuts (i.e. *.desktop) files to put on their desktop (or somewhere else)
- Maybe provide a simple set of buttons at the top of the app window for Back/Forward/Home, etc.

Offline

#3 2010-05-12 22:58:52

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

Atticus wrote:

I gave it a shot and it worked as described. 

Here are a couple suggestions for possible future development:

- Have a single, unified configuration interface that allows one to add/edit/delete apps
- Allow the user to create shortcuts (i.e. *.desktop) files to put on their desktop (or somewhere else)
- Maybe provide a simple set of buttons at the top of the app window for Back/Forward/Home, etc.

Thanks for trying it. I updated it, adding your first point. This was already planned for the release, I had originally just wanted to get my code together and release as soon as possible so I could get opinions. wink

I plan on working on your point 3 next, this should be somewhat simple, since I am basically putting the code from here back in there, encased in an if statement checking if the navigation setting is true. In addition to this, I also plan to add the ability to use a statusbar during the same, or perhaps a subsequent release.

Your second point is a lower priority for me, since I have created a launcher in this release, and those who choose to create a .desktop file can do so pretty easily as it is. It is still on my feature list though. smile

If anyone has any more ideas, please mention them!

Offline

#4 2010-05-14 17:39:39

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

0.1a3  is released, I implemented a combined navigation/status bar which, in my opinion, uses space better than just separate navigation and status bars. It resides along the bottom, which may take some getting used to, but I find it rather efficient. Opinions are needed on this, though, so please give them! I would like to point out that I won't be putting any URL entry box into the application since this is meant to be a web viewer, not a web browser.

Offline

#5 2010-05-14 19:16:00

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

Is there a way to sanely download this script?
Put it into AUR.

Last edited by DonVla (2010-05-14 19:18:14)

Offline

#6 2010-05-15 02:21:01

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

DonVla wrote:

Is there a way to sanely download this script?
Put it into AUR.

Fair enough, done. Please see the first post. I just thought it might be overkill for a one-file script.

Last edited by smartboyathome (2010-05-15 02:22:28)

Offline

#7 2010-05-16 12:06:18

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

smartboyathome wrote:
DonVla wrote:

Is there a way to sanely download this script?
Put it into AUR.

Fair enough, done. Please see the first post. I just thought it might be overkill for a one-file script.

Thanks.
Why overkill? It's about convenience.

Offline

#8 2010-07-13 13:56:52

fauno_
Member
Registered: 2008-06-24
Posts: 17

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

Finally! smile

2 things:

- Bug: when you don't select use status bar and try to save, prispy complains about not having the element: "AttributeError: 'NewShortcut' object has no attribute 'wantStatusbar'"

- Feature: can you provide a git/hg/etc repo? that way you can have contributions from others.

3 things!
- Feature: having at least a keybinding for quitting would be fine.

Offline

#9 2010-07-13 14:15:25

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

fauno_ wrote:

Finally! smile

2 things:

- Bug: when you don't select use status bar and try to save, prispy complains about not having the element: "AttributeError: 'NewShortcut' object has no attribute 'wantStatusbar'"

Yeah, I think I'll need to change that statement to a try except statement. tongue

fauno_ wrote:

- Feature: can you provide a git/hg/etc repo? that way you can have contributions from others.

I've usually had trouble with any type of version control system I've used, including those mentioned, which is why I tend to avoid them. Plus, this is just a one-file script at the moment, so people could just submit patches here. I'll look into it though. smile

fauno_ wrote:

3 things!
- Feature: having at least a keybinding for quitting would be fine.

I've tried keybindings in several apps following both known ways to do them in PyGTK, but always they either work for a bit then stop, or don't work at all. I can't really understand it since I am implementing them almost directly from their respective sources, but they just refuse to work. Again, I'll look into it. smile

Offline

#10 2010-07-15 18:29:04

pratik_narain
Member
Registered: 2009-12-03
Posts: 37

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

its not loading anything, neither facebook.com nor orkut.com

my Orkut.conf

name = 'Orkut'
url = 'www.orkut.com'
userAgent = 'Opera/9.80 (X11; Linux i686; U; en) Presto/2.6.30 Version/10.60'
wantStatusbar = 1

prispy window error message

Unable to load page

Problem occurred while loading the URL www.orkut.com

URL cannot be shown

Last edited by pratik_narain (2010-07-15 18:50:11)

Offline

#11 2010-07-15 21:48:22

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

pratik_narain wrote:

its not loading anything, neither facebook.com nor orkut.com

my Orkut.conf

name = 'Orkut'
url = 'www.orkut.com'
userAgent = 'Opera/9.80 (X11; Linux i686; U; en) Presto/2.6.30 Version/10.60'
wantStatusbar = 1

prispy window error message

Unable to load page

Problem occurred while loading the URL www.orkut.com

URL cannot be shown

Are you behind a proxy or some such mechanism? I tried that and it seems to work here. Just to note, proxies are not supported as of yet but I may support them in the future.

EDIT: Wait, it seems that by leaving off the http:// it doesn't work. I will try coding some detection to see if you have included it.

Last edited by smartboyathome (2010-07-15 21:59:03)

Offline

#12 2010-07-16 02:30:54

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

0.1a4 is released. This is a general bugfix release, plus adding .desktop creation support. The .desktop files are created in ~/.local/share/applications/, are put in the Network/Internet category, and are deleted when you delete the app in the startup screen. I will try to implement keybindings in the next release, though if that doesn't work and no bugs come up, I am renaming this release to 0.1, otherwise the next release will be stable. For 0.2, I am hoping to use sqlite as my config instead of different config files. While I do realize this will get rid of the text editable text, overall it seems like it would suit this better than text files.

Offline

#13 2010-07-16 19:16:15

pratik_narain
Member
Registered: 2009-12-03
Posts: 37

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

@smartboyathome Thnx for the awesome app. I finally ditched prism as it made changing user agent near impossible. One issue though, If anyone has an orkut.com profile/id, try it with prispy. Its not working for me withe the new interface but old interface is working fine(BTW, orkut is google product nd it works perfectly in webkit browser like chrome). I'm ok with it, but I thought i'd share the feedback.

Offline

#14 2010-07-16 19:51:51

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

pratik_narain wrote:

@smartboyathome Thnx for the awesome app. I finally ditched prism as it made changing user agent near impossible. One issue though, If anyone has an orkut.com profile/id, try it with prispy. Its not working for me withe the new interface but old interface is working fine(BTW, orkut is google product nd it works perfectly in webkit browser like chrome). I'm ok with it, but I thought i'd share the feedback.

This probably has to do with cookies. Pywebkitgtk, unfortunately, doesn't have very good support for cookies as of yet, and its complicated to try to use libsoup with it since I'd have to rewrite the web viewer portions of this to use PyGI (EDIT: Actually, PyGObject once its updated to 2.22.4 in the repos) instead of PyWebkitGTK (at least from what I've read). This may come with 0.2, but thats only if I can figure out how to even do it.

Last edited by smartboyathome (2010-07-16 19:56:01)

Offline

#15 2010-07-16 21:51:23

pablokal
Member
From: Nijmegen, Holland
Registered: 2010-03-07
Posts: 96
Website

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

I wanted to change the fontsize or zoom the page but nothing happened when doing ctrl + + or ctrl+scroll
user agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100627 Firefox/3.6.6


GNu/Linux: Nu nog schoner: http://linuxnogschoner.blogspot.com/

Offline

#16 2010-07-16 22:00:26

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

pablokal wrote:

I wanted to change the fontsize or zoom the page but nothing happened when doing ctrl + + or ctrl+scroll
user agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100627 Firefox/3.6.6

By default, I don't know if there are any keybindings besides the common ones like ctrl+c, ctrl+v, ctrl+a, etc, and I dont think that is one of them. I'd probably have to add it manually, which I'll look into while coding the keybindings. If all else fails, I can probably just add a couple toolbar buttons to handle this.

Offline

#17 2010-11-10 09:37:25

STEELBAS
Member
From: The Netherlands
Registered: 2010-01-18
Posts: 82

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

I think Prispy doesn't work anymore with the new Python update. I manually pointed the script at Python2, but it still prints errors.

Offline

#18 2010-11-10 11:19:40

sugardeath
Member
Registered: 2010-03-02
Posts: 82

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

STEELBAS wrote:

I think Prispy doesn't work anymore with the new Python update. I manually pointed the script at Python2, but it still prints errors.

I pointed it at python2 and it worked fine here..

Will we be able to, in the future, run prispy with a command to load a website or a configuration?  It would be nice to be able to have an openbox menu item for "prispy -site voice.google.com" or "prispy -profile GoogleVoice"

Offline

#19 2010-11-10 13:19:37

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

Does anyone know where webkit caches its temp information?
And is there a adblocker for webkit apps?

Prispy is pretty handy. Thanks

Offline

#20 2010-11-10 13:25:36

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

sugardeath wrote:

Will we be able to, in the future, run prispy with a command to load a website or a configuration?  It would be nice to be able to have an openbox menu item for "prispy -site voice.google.com" or "prispy -profile GoogleVoice"

Put smth like

<item label="GoogleVoice">
   <action name="Execute"><command>prispy -site voice.google.com</command></action>
</item>

in your ~/.config/openbox/menu.xml.

Offline

#21 2010-11-10 13:42:22

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

Why not kiosk mode (or whatever it is called) of Chromium? Does it use a lot less resources?


Arch x64 on Thinkpad X200s/W530

Offline

#22 2010-11-10 14:21:35

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

sugardeath wrote:

Will we be able to, in the future, run prispy with a command to load a website or a configuration?  It would be nice to be able to have an openbox menu item for "prispy -site voice.google.com" or "prispy -profile GoogleVoice"

You can already run PrisPy on the command line, given you've already created a profile. Simply run prispy programName (in your case prispy GoogleVoice) and thats good. I created this to help facilitate creating launchers.

DonVla wrote:

Does anyone know where webkit caches its temp information?
And is there a adblocker for webkit apps?

Prispy is pretty handy. Thanks

I don't know about where webkit stores its information, but if you want an adblocker you can always use a hosts file one (see here).

Pank wrote:

Why not kiosk mode (or whatever it is called) of Chromium? Does it use a lot less resources?

1) Some people are paranoid of google
2) That doesn't do the same thing as Prism/PrisPy

Basically, this is just an alternative to Chrome, and if you want to use it, then use it.

And I'll get around to changing it soon. Sorry, I've been packed with University work and my focus has more been SmartTE. I'll probably be focusing more on porting to PyGObject since that is how one needs to add cookie support.

Last edited by smartboyathome (2010-11-10 14:30:16)

Offline

#23 2010-11-10 18:13:50

sugardeath
Member
Registered: 2010-03-02
Posts: 82

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

smartboyathome wrote:

You can already run PrisPy on the command line, given you've already created a profile. Simply run prispy programName (in your case prispy GoogleVoice) and thats good. I created this to help facilitate creating launchers.

Oh!  I must've mistyped when I tried it.  Nice!

Offline

#24 2010-11-11 19:44:05

STEELBAS
Member
From: The Netherlands
Registered: 2010-01-18
Posts: 82

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

sugardeath wrote:
STEELBAS wrote:

I think Prispy doesn't work anymore with the new Python update. I manually pointed the script at Python2, but it still prints errors.

I pointed it at python2 and it worked fine here..

Really? In that case, I suppose either I'm doing something wrong, or my system is missing something. The console prints the following when I try to set up a shortcut to Google Docs:

Traceback (most recent call last):
  File "/usr/bin/prispy", line 155, in save_config
    confFile.write("name = '"+name+"'\nurl = '"+url+"'\nuserAgent = '"+userAgent+"'\nwantStatusbar = "+self.wantStatusbar)
TypeError: cannot concatenate 'str' and 'int' objects

This is using "http://docs.google.com" for URL and "googledocs" as the Name, without checking any of the check boxes.

It's no big deal, I can make do with Prism, but does anyone know what the problem could be?

Offline

#25 2010-11-11 23:59:37

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: PrisPy - The PyGTK+Webkit clone of Mozilla Prism!

STEELBAS wrote:

Traceback (most recent call last):
  File "/usr/bin/prispy", line 155, in save_config
    confFile.write("name = '"+name+"'\nurl = '"+url+"'\nuserAgent = '"+userAgent+"'\nwantStatusbar = "+self.wantStatusbar)
TypeError: cannot concatenate 'str' and 'int' objects

That is odd, I don't get that here. Also, I seem to be getting close to using PyGObject for my script, which will be hosted on github. Hopefully I can get that finished before too long.

Offline

Board footer

Powered by FluxBB