1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-04 07:57:52 +03:00
Commit Graph

55 Commits

Author SHA1 Message Date
Guillaume Ayoub
16e8186568 Drop Python 2 support 2018-01-14 01:48:17 +01:00
Guillaume Ayoub
fcd6bf7070 Clean and document the logging levels
Related to #488.
2017-07-25 13:59:56 +02:00
Guillaume Ayoub
ba26fa34a9 Use ElementTree's elements as much as possible 2017-07-03 15:19:05 +02:00
Guillaume Ayoub
df50204f3e Remove unsupported source lines 2017-07-01 00:28:14 +02:00
Guillaume Ayoub
4a5fa84f9f Use cssselect2 instead of cssselect 2017-06-30 17:54:02 +02:00
Guillaume Ayoub
b53d9d3b1f Cut long lines, remove an old note 2017-04-29 10:41:53 +02:00
Hugh Secker-Walker
9376c95071 Fix typos and awkward grammar on Tutorial and API pages. 2017-04-28 14:36:14 -04:00
Guillaume Ayoub
1215cb586a Allow relative URIs in anchors
Fix #437.

Backward-incompatible change: the signature of weasyprint.urls.url_join has
changed to allow relative links without a base URI.

This feature doesn't look really safe at first sight, but I can't find
anything bad coming from these changes. If there's a bug, I take the blame.
2017-03-25 18:28:41 +01:00
Guillaume Ayoub
4f4b4ed598 Use isort in tests 2017-03-25 00:33:36 +01:00
Guillaume Ayoub
ddefd4bb52 Use FILESYSTEM_ENCODING when encoding file:// URLs 2016-08-17 00:52:11 +02:00
Guillaume Ayoub
e346982b03 Don't try to make urlopen's job 2016-08-16 23:36:54 +02:00
Guillaume Ayoub
59e4fb5146 Change the way filenames are managed 2016-08-16 22:15:18 +02:00
Guillaume Ayoub
09e14e5820 Fix typo 2015-12-16 13:50:04 +01:00
Alex Eftimie
93f497bf11 Replace utf8 with utf-8 for gettext compatibility 2015-11-25 09:38:01 +02:00
Thomas Grainger
8c0a97a37d Fix ressource typo 2015-07-01 00:01:43 +01:00
Simon Sapin
830598c30b Merge branch 'pdf-attachments' from PR #177 2014-04-27 17:56:02 +01:00
Simon Sapin
43d1e73e65 Fix code formatting. (Clean flake8!) 2014-04-27 12:29:55 +01:00
Simon Sapin
09b2a4def0 Correctly close StreamingGzipFile, and log this kind of error
… rather than silence them. Logs make tests fail.
2014-04-27 11:00:02 +01:00
Colin Leitner
2be5945864 Replaced urlopen_contenttype with urllib_get_content_type, urllib_get_charset and urllib_get_filename. 2014-04-23 16:24:14 +02:00
Colin Leitner
a8a951bc2f Fixed the default_url_fetcher for Python 2, which returns a message type with no get_filename method 2014-04-22 21:22:10 +02:00
Simon Sapin
9404375d3e Fix #86: Support gzip and deflate encoding in HTTP responses 2014-04-21 23:52:58 +01:00
Colin Leitner
05ec8df728 Added optional filename key to the URL fetcher result 2014-04-18 16:39:54 +02:00
Simon Sapin
c34221d215 2014. 2014-01-10 14:27:02 +00:00
Florian Mounier
e3d7bad55b Be careful logging.warn is deprecated 2013-08-19 14:38:09 +02:00
Simon Sapin
52c06894b7 Docs: add an example combining documents into one PDF file. 2013-07-14 09:22:04 +01:00
Simon Sapin
d8014d28ad Image loading: only swallow exception related to fetching or decoding. 2013-06-20 22:06:47 +01:00
Simon Sapin
05e1cb22b2 URL fetching: enforce closing sockets/files with a context manager. 2013-06-20 15:16:47 +01:00
Simon Sapin
9c9fc1ae2d Do not get MIME types base on URLs. 2013-06-20 12:40:11 +01:00
Simon Sapin
9d5cebb5ce URL fetching: use an intermediate function rather than a wrapper 2013-06-20 12:17:03 +01:00
Simon Sapin
0d9f867491 Fix the URL scheme regexp.
Not sure why I had [0-1] there.
2013-04-12 10:32:25 +03:00
Simon Sapin
171438f48e 2013 2013-04-03 16:23:48 +02:00
Simon Sapin
c854feece9 Fix #21: Check for 'data' URL scheme case-insensitively. 2013-03-28 13:33:28 +01:00
Simon Sapin
89bd068990 Allow absolute URLs without a base URL. Fix #42. 2013-03-13 12:12:12 +01:00
Simon Sapin
6f56613441 Do not require HtmlElement.
* Do not use element.base_url which only exists in lxml.html.HtmlElement
* Use lxml.etree.HtmlParser instead of lxml.html

This is one step toward using the html5lib parser, but see
https://github.com/Kozea/WeasyPrint/pull/12
2012-11-06 13:55:39 +01:00
Simon Sapin
3072fff2e5 Docs docs docs.
But no ducks.
2012-10-08 19:51:18 +02:00
Simon Sapin
c2b2b8c2ea Escape non-ASCII characters in hyperlinks. 2012-10-04 19:12:34 +02:00
Simon Sapin
7984fbd3bc Warn (not crash) on missing base_url for @import 2012-09-25 16:01:12 +02:00
Simon Sapin
87d5741376 Integrate the sphinx docs with docstrings. 2012-09-19 17:37:52 +02:00
Simon Sapin
2614821fa9 Add support for <base href="..."> element in HTML. 2012-08-03 15:22:26 +02:00
Simon Sapin
d1971b6e63 Remove unused imports. 2012-08-03 13:32:42 +02:00
Simon Sapin
eab2646dcc Fix base_url set to a directory name.
With base_url='/a/b', a relative URL 'c' was resolved to '/a/c'.
Now it is resolved to '/a/b/c' if /a/b is a directory, '/a/c'
otherwise. This is most likely the expected behavior.
2012-08-02 17:19:34 +02:00
Simon Sapin
fb01c4c839 Work around getfilesystemencoding stupidity on Linux. 2012-07-30 12:01:20 +02:00
Simon Sapin
a34fd1a616 Remove a deprecation warning. 2012-07-29 18:38:59 +02:00
Simon Sapin
c39d4119c8 Fix MIME type registering: always use native strings. 2012-07-29 15:13:45 +02:00
Simon Sapin
50c175a5dc Force the MIME types for the file extensions we care about. 2012-07-28 22:38:44 +02:00
Simon Sapin
b1f0959df5 Use the filesystem encoding for file:// URLs. This might help with #891 2012-07-27 18:55:19 +02:00
Simon Sapin
96748be086 Gotta learn to run *all* tests before pushing. 2012-07-27 18:08:05 +02:00
Simon Sapin
501f690d49 Require at least 2 characters in URL schemes.
This makes sure that Windows filenames like C:\foo\bar.html
are not considered as URLs.
2012-07-27 17:19:17 +02:00
Simon Sapin
4a6fff4384 Make mime_type optional in custom URL fetchers 2012-07-18 14:34:43 +02:00
Simon Sapin
2768dea548 Add `url_fetcher` to the public API 2012-07-13 12:24:55 +02:00