Fix cookie jar typo – Kord Campbell.
Minor refactorings. Musings on what must be done next in the todo.
A couple of websites caused PyKHTML to freeze because they used window.confirm. Hooking into it is implemented via browser.onConfirm. A simple scraper example for Google News has started.
Bugfix: immediate simultaneous calls to Browser.load do not cause an error when disconnecting (thanks Michael). Realisation that multiple Browsers do not work, with preliminary troubleshooting. onPrompt documentation and a little source shifting.
Two-way communication – Python can talk back to JavaScript, so hooking into window.prompt is implemented. alerts.py example updated accordingly.
Bugfix re static methods in dom._CallbackEventListener.
Bugfix in Browser.setHtml – it now makes sure that the initialisation necessary for all pages takes place.
Generic execution of JavaScript via Browser.eval, with returned JavaScript types being automatically cast to Python types.
JavaScript->Python communication via events, meaning that alert() gets passed on to Python. Added an alerts.py example showcasing it.
stopEventLoop now calls stopEventLoopImmediately after a 0-timeout, fixing a couple of crashes.
Temporary fix for javascript prompts blocking the event loop. Regular expression example in the myspace sample.
More complex data extraction for the Myspace example, with a few trickier ones on the way. Handling of checkboxes/radiobuttons nearly ready for commit. JavaScript intervention definitely isn't.
Bugfix: innerHTML uses str() and fails with international pages – converted to unicode (thanks Peter Schneider).
Website updates (contact section). Researching how to hook alert/prompt/confirm from JavaScript to Python without going via KJS (which isn't wrapped for PyKDE by default). Something with events, possibly.
Latest download button added for each page. Releases are sorted by date. No luck trying to fix the graphical requisite for Browser.screenshot so far.
Examples from the development repo are automatically available online.
Preliminary support for taking screenshots of webpages. Added websitescreenshot example accordingly. Seems to only work with pykhtml.debugWithGUI set to True, though. Will investigate further.
Release 0.2
No multiple calls to startEventLoop allowed.
Initial unit tests using the py.test framework, testing a couple of the core functions and importation of pykhtml – more to come. Tweaked a couple of things in the pykhtml core so they are more naturally tested (checkProcessRunning).
Imported Myspace example that signs into an account.
Renamed pykhtml.running to pykhtml.checkProcessRunning and changed how it is assigned, with the idea of unit testing in mind. Made password-dialog-squatting more robust by falling back to using the dcop process.
Diffs are available to view for each revision on the changelog page.
Bugfixes: stopped the cookie dialog opening on first launch; fixed junk being displayed in window title bar when you debug with a GUI; stopped plugins like flash and java being loaded.
The big one: stopped PyKHTML popping up a dialog box asking to save passwords (big fault on behalf of KHTML, IMHO) with some configuration and DCOP magic. Stopped a segfault occuring when calling application.exit is called, but it might be a little hackish. Looking further into it.
Purging of dialogs begins. Tracked down the setting to disable KWallet (and in turn the dialog KHTMLPart pops up to ask about password storage).
Painstakingly found out why logging into stuff wasn't working – must call part.browserExtension()->setURLArgs from an openURLRequest signal to pass on the form data.
Added a new example that interfaces with the AJAX spellchecker at broken-notebook.com/spell_checker.
Updated and fixed getElementsByClass. KHTML magic for allowing "clicking" on arbitary elements implemented as dom.Element.click. dom.TextArea class implemented.
Updated install.txt to reflect the new installation system.
Internal revamp of the way casting to more specific element types works – this way stops grave bugs coming up. Attributes on elements can be got/set/deleted using [] notation or via Element.attributes, which returns a dictionary. Text node values are now returned as unicode (the default – you can get at regular strings if you'd like). Document.getElementById raises an exception when the element with the given ID isn't found (stops a segfault and is far cleaner). You can now iterate over children of an element using a regular for loop (the pykhtmlsite example has been re-worked to reflect this). Browser.onNextLoad added for those cases where there is an implicit change of page and you need to handle it. Further work on the Myspace example.
Began the addition of dom.Input/Form classes for the start of an evil myspace example. All Node subclasses can access the browser they reside on. Code cleanup (nodeToClass->castNode). Renamed curry to partial. Minor cleanup in the dynamicdom example.
Distutils setup.py installer added. Maybe change to setuptools when it gains a little more adoption?
Changelog/todo/repository on the webserver now updated on commit.
Rectified by attacking the correct item. Changelog now available for view online.
Attacked the wrong todo item, heh. Todo list is now available for view online.
Release 0.1
Added some todo items. Pretty much set for release (really really).
Wrote install/license/readme/todo.txt.
Oops. Actually added dynamicdom example!
Made Xvfb entirely optional. If it's not present (or either of pykhtml.useXvfb / pykhtml.debugWithGUI are False) then PyKHTML will use the current X server. Generated documentation of global variables is thoroughly needed, but that can wait.
startEventLoop calls init() (so things work in the slim event that no Browser instance is created). The timer function has been re-worked so it works properly when using curried functions. Half tempted to re-name curry to partial. Added dynamicdom example that shows how to feed HTML to to PyKDE and poll for changes.
Added a partial param application implementation (pykhtml.curry) which is used to pass the browser instance to callbacks – previously I thought having a global browser object would be okay but that (in retrospect) clearly sucks. The curry class will also be very useful when communicating with different functions when chaining together Browser.load or Document.visit calls. Updated the pykhtmlsite example accordingly.
Added Document.serialized method that returns a string representation of the DOM. We can use this to check for DOM changes as it appears KHTMLPart offers no domChanged signal as I had thought.
Documentation generation: when a class inherits from another it links back to the class in inherits from. When it inherits from an unknown class there is no link (all links to classes that aren't present are ignored).
Added doc directory containing the generated documentation, CSS + JavaScript stuff, and a couple of images.
Healthy improvements on documentation generated (implemented anchor references, hiding inherited methods, and more). Things are starting to come together. Inheritance diagrams in the working.
Initial commit of PyKHTML. You can do semi-cool things with it. There are a bunch of very neat features (asynchronous design, automatic casting to more specific element types) that make working with it great fun already. One example is provided (and will be expanded on). Documentation generation almost works. An HTML backend for the documentation writer is to be written.