Francisco Souza
42e81c1297
Added INSTALL section just before LICENSING
2011-06-05 20:07:30 -03:00
IceArmy
fd95c86d2b
Rip out --upload-file command-line option
2011-06-05 16:02:42 -07:00
IceArmy
47acc56153
Bring back file upload support.
...
Instead of using command-line option, file can be uploaded using
WebPage.uploadFile function, e.g.:
var page = new WebPage();
page.open(....., function () {
page.uploadFile('input#attachment', '/path/to/file');
});
uploadFile() accepts selector name (first argument), this is used to identify
which input element will need the filename (second argument).
2011-06-05 16:02:34 -07:00
Francisco Souza
c8dfe1e30a
Merge branch 'master' of git://github.com/ariya/phantomjs
2011-06-05 20:00:43 -03:00
Francisco Souza
9ee9361d49
Changes on description, project naming and readme
2011-06-05 20:00:12 -03:00
Francisco Souza
029b7f7768
Using version from utils module
2011-06-05 19:57:29 -03:00
Francisco Souza
9b12ce3f89
Changed the name of package from phantom to pyphantomjs
2011-06-05 19:55:07 -03:00
IceArmy
1796eb5d7c
Mark argparse as dependency for Python 2.6
2011-06-04 14:07:51 -07:00
IceArmy
fba248781a
Reorder import statements as per pep 8
2011-06-03 21:50:13 -07:00
IceArmy
a9bf0b964a
Move loadStatusChanged signal to top
2011-06-03 15:38:14 -07:00
IceArmy
9b69c83e2a
Simplify WebPage signal sending
2011-06-03 15:38:14 -07:00
Francisco Souza
e87918c993
Added argparse as dependency for installation
2011-06-03 16:43:26 -03:00
Francisco Souza
47123eff2e
Removed setup.py as dependency
2011-06-03 16:32:02 -03:00
Francisco Souza
804ff1bb0b
Excluding swp from sdist
2011-06-03 16:30:08 -03:00
Francisco Souza
c4ecbbc706
Moving structure for better integration with PyPI
2011-06-03 16:22:58 -03:00
Francisco Souza
7069b707ab
Added setup.py and phantom package (for PyPI)
2011-06-03 16:21:03 -03:00
IceArmy
69ff230f3a
Revert "Fix bug where WebPage.evaluate had a syntax error."
...
This reverts commit d2c520a777
.
2011-06-01 12:14:20 -07:00
IceArmy
d2c520a777
Fix bug where WebPage.evaluate had a syntax error.
...
It now creates a proper anonymous function (which passes this for global context)
2011-06-01 02:09:07 -07:00
IceArmy
0d78768e4d
Fix bug that caused operation body to fail
2011-06-01 00:53:07 -07:00
IceArmy
d19901cdf8
Handle badly encoded URL's
2011-06-01 00:29:35 -07:00
IceArmy
e93bea5a21
Fix bug where script wouldn't exit properly
2011-05-31 23:29:06 -07:00
IceArmy
82c6735fd0
Declare m_returnValue to 0
2011-05-31 23:29:06 -07:00
IceArmy
456356e876
Simplify CSConverter()'s convert() return statement
...
Simplify Phantom()'s loadImages and loadPlugins
2011-05-31 22:02:41 -07:00
IceArmy
a313d1befd
PyPhantomJS version 1.2.0
...
Refactored most of functionalities to WebPage object
WebPage object can have settings
Support different HTTP operations for loading a page
Simplify buffer handling in render()
Refactor render(), split the buffer rendering to its own function
Render the web page using the tiling approach
WebPage callback for it's console message
Make exit() synchronous
WebPage callback for its JS alert
Updated all examples
2011-05-31 16:23:06 -07:00
IceArmy
73329e73aa
Update CoffeeScript to version 1.1.1
2011-05-13 01:10:49 -07:00
IceArmy
652a3c3c76
Added did_action() to find out how many times a hook has been fired
2011-05-07 00:19:55 -07:00
IceArmy
e8d1928ebb
Fix tiny error where if script is not called directly (so we import it to use it elsewhere), then Bunch and do_action will not be defined in main script.
2011-05-07 00:19:27 -07:00
IceArmy
8c12af3ce5
Did a complete rewrite of the plugin system!
...
It is now event based, and is MUCH easier than before to write your plugins!
2011-05-06 23:46:51 -07:00
IceArmy
4fc9692176
Get list of .pyc plugins as well, that way you can provide only a bytecode plugin with no .py plugin and it'll still load up fine
2011-05-05 15:43:12 -07:00
IceArmy
66dc5625b3
Raise RuntimeError on loadPlugin's KeyError, explaining the problem
2011-05-05 12:24:30 -07:00
IceArmy
e3e82648dd
Documented run function(s) and passed args in plugincontroller
...
Reorganize loadPlugins to run any named function with any set of arguments. all dict arguments will be automatically converted to bunches
Put same func hooks into 1 hook that calls different methods (pre and post)
2011-05-04 23:11:18 -07:00
IceArmy
354bb22a68
Add plugin URL to README
2011-05-04 17:59:17 -07:00
IceArmy
5d861ccdf9
Simplify loadPlugin's bunched globals and locals
2011-05-04 16:52:58 -07:00
IceArmy
f320d76284
Simplified plugin code
...
_globals and _locals are now attributed objects like they should be, instead of being a dict (makes it easier to use them)
2011-05-04 16:15:51 -07:00
IceArmy
15c854405e
Add flusher to SafeStreamFilter
2011-05-04 12:32:17 -07:00
IceArmy
b1d8fd1f8c
Add pre/post __init__ hook to Phantom() for more flexibility
2011-05-04 11:11:37 -07:00
IceArmy
3ac8c79856
Update plugincontroller Hook doc strings
2011-05-04 10:56:36 -07:00
IceArmy
37dd766478
No need to worry about clashing plugin class/method names. It's already automatically taken care of :)
2011-05-04 10:47:54 -07:00
IceArmy
f923085c52
Place hooks at better spots to allow more flexibility
2011-05-04 10:47:28 -07:00
IceArmy
b25d10bf7c
Create loadPlugins helper function
2011-05-04 10:47:08 -07:00
IceArmy
d156bad091
New plugin system allows you to add/modify internal code without actually changing it!
...
Read the string in plugincontroller for a short how to explanation
2011-05-04 02:53:20 -07:00
IceArmy
e51ffbcae0
Added option: --ignore-ssl-errors=[yes|no]
...
Fixed bug where disk-cache would not be enabled unless you also specified --verbose (oops!)
2011-05-03 16:49:34 -07:00
IceArmy
fed6b0cc03
Alphabetize usage message
2011-05-03 16:49:13 -07:00
IceArmy
f1ea757c24
Removed unneeded scriptDir detection
2011-05-03 16:48:41 -07:00
IceArmy
7ddcd95014
Created setup script to build executables (mainly for Windows, but also works for Linux)
2011-05-03 16:48:04 -07:00
IceArmy
3d8d25d368
Output unicode safe text
2011-05-03 16:45:53 -07:00
IceArmy
bb2e59ca99
Open files as unicode (utf-8) to support all encodings
2011-05-03 16:44:28 -07:00
IceArmy
1493b2e613
Update INSTALL file
2011-05-03 16:43:56 -07:00
IceArmy
dfadc43053
Remove spaces on default args
2011-05-03 16:43:31 -07:00
IceArmy
ef515c83e5
Simplify version into tuple
2011-05-03 16:43:09 -07:00
IceArmy
e9dad4be43
Changed the copyright headers in the program.
...
Gave credit in the README to make up for the changes.
2011-05-03 16:42:21 -07:00
IceArmy
4a47282276
Small change to the error message on javaScriptConsoleMessage()
2011-05-03 16:40:45 -07:00
IceArmy
65563ca89d
- Automatically convert Qt types by using api 2
...
* Convert all QString and QVariant types
* Replaced all references to QString with Python str object
- Fixed bug where phantom.version didn't work
- Don't cd to scripts directory anymore (but loadScript still loads scripts from directory relative to it)
- clipRect.setter and viewportSize.setter both have improved system now.
* if you miss or neglect to specify an attritube (width, height, etc), there will no longer be an exception. it will be handled gracefully, and whatever you didn't specify won't be changed
* if you enter a negative value on any of them, it'll be reset to 0 (except for phantom.clipRect top and left) and you won't loose your attempted changes
- Cleaned up Webpage's javaScriptConsoleMessage print JavaScript (sourceID)
- Allow viewportSize to be set to 0 (default)
- General cleanup
2011-04-27 16:36:45 -07:00
IceArmy
92573698f5
Start using new style signals and slots
2011-04-27 05:15:25 -07:00
IceArmy
7f6fec5b5e
Refactor main file
...
- Moved main code to main()
- Moved argument parsing to parseArgs()
Changed
- Removed qFatal's and replaced them with sys.exit(message)
- upload-file: Fixed bug where tag= (if it wasn't in first arg) wasn't caught as empty
- upload-file: Added duplicate tag checking
2011-04-27 02:45:41 -07:00
IceArmy
1a9c28af62
Fix bug with arg parser
...
if --option script arg had no arg after it (or had another --option type arg), args.script would be None and would insert None after --option
2011-04-13 19:35:38 -07:00
IceArmy
24f013df73
Script arguments can now use --option type args
...
... as long as the option names don't conflict with the programs option names of course
2011-04-13 08:12:43 -07:00
IceArmy
924eaa9cbd
Only show status code if it exists
2011-04-13 07:45:54 -07:00
IceArmy
201731325a
Change reply.attribute from .toInt() to .toString()
2011-04-13 04:12:26 -07:00
IceArmy
acbc62a1a5
Added HTTP status code to debug messages in handleFinished()
2011-04-13 04:07:53 -07:00
IceArmy
494866a769
Issue 20: JPG transparent colour is black.
...
Filling QImage with transparent white instead of transparent
black. For an artifact free rendering of a transparent web
page into PNG, Format_ARGB32 is needed instead of
Format_ARGB32_Premultiplied.
2011-04-13 02:53:26 -07:00
IceArmy
6fdc9d11f5
Allow setting clipRect to height:0, width:0, which will 'reset' the clipRect
2011-04-13 02:08:33 -07:00
IceArmy
2121fb4026
Added option for disk cache use
2011-04-12 19:36:25 -07:00
IceArmy
3ca9137219
Show response URL on NetworkAccessManager's Reponse (because you can't always know what request the response came from)
2011-04-12 18:53:23 -07:00
IceArmy
ccde5cc418
Cleanup imports / removed very bad "import *"
2011-04-12 18:20:17 -07:00
IceArmy
16b55bba45
Fix URL qDebug in createRequest, which errored out if URL had an ordinal not in range(128)
2011-04-12 03:27:56 -07:00
IceArmy
7719e12aa7
New NetworkAccessManager
...
The new NetworkAccessManager currently:
- logs HTTP Method type
- logs HTTP Destination URL
- logs HTTP Reponse
2011-04-12 01:38:19 -07:00
IceArmy
1bdd1867ff
Remove some extra spacing on the header
2011-04-12 01:37:47 -07:00
IceArmy
6c5c23a8fb
Created README and INSTALL files
2011-04-12 01:37:09 -07:00
IceArmy
42dbe9d8f2
Fixed bug in main file where QString was not defined
...
Added message handling system
Simplified userAgent system
Added qDebug and qFatal messages
qDebug does not display unless you specify -v or --verbose on the command line
2011-04-12 01:34:20 -07:00
IceArmy
0bc48c7131
Fix usage message from tag:file to tag=file
2011-04-12 01:33:15 -07:00
IceArmy
af2cdf944d
Refactor code into separate files
2011-04-12 01:32:07 -07:00
IceArmy
3a7aad798e
Remove setObjectName as we don't need it
2011-04-01 20:50:51 -07:00
IceArmy
e0b869ab35
Regenerated resources, and compressed them
2011-04-01 16:48:56 -07:00
IceArmy
e52b422e3c
Added phantom.clipRect to be able to control the dimensions of the output
...
- There's 4 values: width, height, top, and left
- You can read it by, i.e. phantom.clipRect['width']
- You can set it by, phantom.clipRect = {width: 400, height:300, ...}
2011-04-01 13:37:12 -07:00
IceArmy
240e6a2c4a
Stop trashing CPU on sleep's infinite loop
2011-03-31 21:36:44 -07:00
IceArmy
f08e4faeed
Renamed some variables to get around predefined keywords
2011-03-30 16:32:03 -07:00
IceArmy
3efc6a5ddf
General improvements
2011-03-30 05:02:16 -07:00
IceArmy
fd8fa690c4
Update usage message
2011-03-30 00:46:21 -07:00
IceArmy
e57adfe0b6
Issue 17: Make paper size for the PDF export specifiable
2011-03-29 22:54:07 -07:00
IceArmy
4926841be1
Specify js or coffee in usage message
2011-03-29 22:53:23 -07:00
IceArmy
62d798ddf8
Amend copyright date
2011-03-18 14:35:23 -07:00
IceArmy
162aacdc7e
Remove 2 variables from main QString() variable declaration list, as they're assigned a value not long afterward
2011-03-17 00:16:21 -07:00
IceArmy
198c13d195
- Migrated from Qt's QFile() method of opening files to Python's open() - Speed test shows that open() is faster at the core
...
- Fixed subtle bug where loadScript's filename identifier for the cache was not always the same (thereby not loading the cached copy)
2011-03-16 22:24:04 -07:00
IceArmy
55c7a4f620
Change if in chooseFile to be 'if tag in tagList' instead of 'if tagList.get(tag)'
...
Cache scripts using phantom.loadScript. Not much speed improvement, but when you're loading a coffee script, there is a huge speed improvement as the converted script is already cached and doesn't need to be re-compiled.
Revert phantom.render (function is supposed to return true on success!)
2011-03-16 17:17:51 -07:00
IceArmy
ac39de6efa
Remove -u option
...
Fixed help message to show "tag:file" and not just "file"
2011-03-16 00:53:36 -07:00
IceArmy
a731e6c4d7
Added Python PhantomJS project
2011-03-15 22:18:01 -07:00