Author Topic: Lets create a PCLinuxOS webkit browser (python)  (Read 28031 times)

Offline Hootiegibbon

  • Hero Member
  • *****
  • Posts: 4151
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #225 on: April 08, 2011, 05:34:20 PM »
Hootiegibbon  ;D
I don't know about you LOL

Are we talking about shoe-horning a terminal into the browser so we can use W3M instead of Webkit ?


Nope,

I am talking about using surfraw to pass arguments/instruction into Hammer if GUI (RL5)  and into w3m if in RL3 that way if we have another app calling for a web address via surfraw it will work in either situation... ( as i aim to have this set up in -Light) once we get this Webbrowser (and possibly another project ) to a stable state

Please remember that it is late I am tired have now had 6 good strong coffees and my mind is close to insanity... lol

I see surfraw as a way we can get Hammer to act a bit smarter without having extra code into the browser itself
 

Jase

Bringing the power of CLi to the GUI web...


I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles

ongoto

  • Guest
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #226 on: April 08, 2011, 06:02:10 PM »
IC
You just want to run it remote.

For the moment, add import sys at the beginning of the script among the other imports.
Then, at the bottom of the script, substitute this:
Code: [Select]
if __name__ == "__main__":
    if len(sys.argv) > 1:
        DEFAULT_PAGE = sys.argv[1]

    webbrowser = WebBrowser()
    gtk.main()


You can launch from the cli giving a url as the argument.

Offline Hootiegibbon

  • Hero Member
  • *****
  • Posts: 4151
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #227 on: April 08, 2011, 06:14:35 PM »
IC
You just want to run it remote.

For the moment, add import sys at the beginning of the script among the other imports.
Then, at the bottom of the script, substitute this:
Code: [Select]
if __name__ == "__main__":
    if len(sys.argv) > 1:
        DEFAULT_PAGE = sys.argv[1]

    webbrowser = WebBrowser()
    gtk.main()


You can launch from the cli giving a url as the argument.

Excellent Thanks,

Surfraw is actually pretty smart , it does the work and passes the result into the browser to show

Jase


I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #228 on: April 08, 2011, 06:53:52 PM »
Help!  I have installed surfraw and added the mod to the script.  How do I make it work and what am I expecting to happen?  Opening surfraw in terminal doesn't seem to do anything.

PS - that Julian Assange, he gets around, doesn't he!
Linux Registered User # 529407


Offline Hootiegibbon

  • Hero Member
  • *****
  • Posts: 4151
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #229 on: April 08, 2011, 07:08:42 PM »
Help!  I have installed surfraw and added the mod to the script.  How do I make it work and what am I expecting to happen?  Opening surfraw in terminal doesn't seem to do anything.

PS - that Julian Assange, he gets around, doesn't he!

use

so long as the GUI browser was set prior to compiling you should just have to use somthing like

surfraw imdb "bruce willis"

or

sr imdb "bruce willis"

with surfraw it has to have all the config set prior to compiling

Jase


I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #230 on: April 09, 2011, 02:11:32 AM »
I'm not having much success with this.  I sort of got things working with surfraw-1.07 from repo, then tried 2.2 from outside.  Back to 1.07 - back to 2.2!  I have allocated a browser in surfraw .conf and set default to graphical browser.  Upon writing "sr google" in terminal the browser page opens with this error "http://openurl%28http//www.google.com/".  Same happens with other elvis.  Where is the error coming from?
« Last Edit: April 10, 2011, 01:23:58 AM by Taco.22 »
Linux Registered User # 529407


Offline Hootiegibbon

  • Hero Member
  • *****
  • Posts: 4151
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #231 on: April 09, 2011, 04:34:54 PM »
Taco.22

Not sure if we will or wont go via surfraw yet, as some research needs t be done .

However I have a coupe of links that may help us get further functionality within the browser core

http://webware.sourceforge.net/Webware-0.8/WebKit/Docs/UsersGuide.html

and  possibly more interestingly

http://webware.sourceforge.net/Webware-0.9/WebKit/Docs/Source/Docs/WebKit.HTTPResponse.html


Jase



I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles

ongoto

  • Guest
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #232 on: April 09, 2011, 07:32:26 PM »
Taco.22

Not sure if we will or wont go via surfraw yet, as some research needs t be done .

However I have a coupe of links that may help us get further functionality within the browser core

http://webware.sourceforge.net/Webware-0.8/WebKit/Docs/UsersGuide.html

and  possibly more interestingly

http://webware.sourceforge.net/Webware-0.9/WebKit/Docs/Source/Docs/WebKit.HTTPResponse.html


Jase




Has anyone looked into Pyro
http://www.xs4all.nl/~irmen/pyro3/manual/PyroManual.html

ongoto

  • Guest
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #233 on: April 09, 2011, 08:06:48 PM »
hello

Done some more changes.  
Chased down a few bugs and edited a lot of code.  Trying to make this gnarly beast a little easier to read and maintain.

Added:
    Zoom buttons
    Google search
    CLI launch with url
    Tooltips
    
http://www.box.net/shared/9u450ely3t
« Last Edit: April 09, 2011, 08:31:03 PM by ongoto »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #234 on: April 09, 2011, 10:34:41 PM »
May I suggest this as the Copyright line? -->
Quote
# Copyright (C) 2011 PCLinuxOS <http://pclinuxos.com>


Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3786
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #235 on: April 09, 2011, 10:43:53 PM »
Excellent work, everyone!

Galen

ongoto

  • Guest
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #236 on: April 09, 2011, 11:49:25 PM »
May I suggest this as the Copyright line? -->
Quote
# Copyright (C) 2011 PCLinuxOS <http://pclinuxos.com>



I doubt we can copyright anything.  As it says in the license notice, this is someone else's code and they own the copyright.  All we've done is hack it up.

If we get good enough at this, then we can build and copyright one from scratch. 

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #237 on: April 10, 2011, 12:05:01 AM »
ontogo
It's looking good.  At first I wasn't sure, but now I like the idea of a separate Home and Find button - works for me.  I would prefer to see the Home, Find and Refresh buttons to the left of the URL bar, and the Tab and Zoom buttonto the right.  The grouping seems more logical.  I have uploaded http://dl.dropbox.com/u/18945176/tabbed_browser2v3.py so people can have a look.
Did you have any luck with the progress bar?  I've borked half a dozen copies so far, but you never know, I might jag it one day :D
 
May I suggest this as the Copyright line? -->
Quote
# Copyright (C) 2011 PCLinuxOS <http://pclinuxos.com>

I was wondering when we would reach the point of putting our mark on this.  What is the protocol for claiming some sort of ownership?  Is this something that needs to go into the Information page?  However ontogos recent post may have answered this.

The .config file - is this something that is written separately, in XML or other, and placed in its appropriate place by the directions that the packager gives it?  Having started playing with Glade I can see how external files can be linked to the code and by altering them changes are made to the app.  Am I right in thinking that the principle applies to files such as Bookmarks and Preferences? 

Sorry about all the questions - my learning curve of late seems to resemble a ski ramp as I come to grips with all manner of concepts.   
Linux Registered User # 529407


Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #238 on: April 10, 2011, 12:20:27 AM »
May I suggest this as the Copyright line? -->
Quote
# Copyright (C) 2011 PCLinuxOS <http://pclinuxos.com>



I doubt we can copyright anything.  As it says in the license notice, this is someone else's code and they own the copyright.  All we've done is hack it up.

If we get good enough at this, then we can build and copyright one from scratch. 


Add -->
Quote
# Based on code Copyright 2009 by Jan Michael Alonzo <jmalonzo at gmail.com>


Should have put this in my previous post.

In this case, what we copyright is the PCLinuxOS Hammer browser, not the code.

ongoto

  • Guest
Re: Lets create a PCLinuxOS webkit browser (python)
« Reply #239 on: April 10, 2011, 03:02:23 AM »
Neal, Taco.22

I think we're ok as long as we leave the original license in the code.  It states that we can modify it and redistribute it and that we should note our changes. We're ok.

We could own the ToolBar class because we've almost completely rewritten it.
A customizable toolbar similar to FF is in order, but that's way too much work.
 
Moving tools around is as simple as relocating them in the list.  So anyone can customize it to suit themselves.

Config files could be simple text files written to and read from by us.  There is also a ready made class that manages all that if we want to import it.  It's a lot of work either way. 

Epiphany isn't quite done, but it blows us away in features.  We can't download or view PDF or handle cookies, popups, google ads, and lots of other geeky stuff.  We can't even set the font size.  We just don't have the brainiacs to figure all that out. 

It takes a lot of people to develop big apps. We have to realize our limits here.  We'll be doing good to come up with a basic HTML viewer and get rid of all the little bugs and glitches. 

For people learning Python, a project like this is the best thing that could happen.  I hope it stays fun and helps everyone get some hands-on experience. 
I love puzzles and this one has a lot to offer.   ;D