Commit graph

  • 0cbf89641a Merge pull request #70 from Ede123/default_attributes Eduard Braun 2016-08-27 16:26:10 +02:00
  • 7c86de83d1 Rename default_attributes -> default_properties (that's what they are called and it makes the distinction to the other default attributes clearer) Add some documentation / links to spec as sources Eduard Braun 2016-08-27 16:15:47 +02:00
  • 488c756989 removeDefaultAttributeValues(): Add a lot of new default attribute values Eduard Braun 2016-08-27 03:10:14 +02:00
  • 002c54b5cc removeDefaultAttributeValues(): Refactor to improve code clarity and extensibility Eduard Braun 2016-08-26 23:16:30 +02:00
  • cbda5dcd86 Add unittests for #66 Eduard Braun 2016-08-26 22:12:03 +02:00
  • beb9823a91 Fix some erroneous removal of default attributes (fxes #66) Eduard Braun 2016-08-25 19:26:56 +02:00
  • 90910eaa6f Fix counting issue in statistics due to collidng variable names Eduard Braun 2016-08-26 23:44:14 +02:00
  • 386d5d8656 Allow elements to be found via Document.getElementById() in the minidom document returned by scourXmlFile() (#68) Eduard Braun 2016-08-25 21:13:09 +02:00
  • 7613796a62 Allow elements to be found via Document.getElementById() in the minidom document returned by scourXmlFile() Eduard Braun 2016-08-25 21:01:08 +02:00
  • 8d6301950b Redirect informational output to stderr when SVG is output to stdout (#67) Eduard Braun 2016-08-23 22:31:55 +02:00
  • 43270d1b0b Redirect informational output to stderr when SVG is output to stdout fixes #47 Eduard Braun 2016-08-23 22:28:39 +02:00
  • 2e9259ea6c Merge 2165ef7031 into 4f23ea7a34 Eduard Braun 2016-08-23 20:26:45 +00:00
  • 4f23ea7a34 Print usage information if no input file was specified (and no data is available from stdin) (#65) Eduard Braun 2016-08-23 21:16:14 +02:00
  • ea28d3caa5 Fix generateDefaultOptions() after 4adacd6978 Eduard Braun 2016-08-16 22:44:06 +02:00
  • f08be5d666 Adjust unittests for previous commit; some reordering Eduard Braun 2016-08-16 22:17:38 +02:00
  • 4adacd6978 Split parsing of options and getting input/output The latter rarely makes sense when Scour is not called from command line Eduard Braun 2016-08-16 22:16:12 +02:00
  • c8eb29f54c Print usage information if no input file was specified (and no data is available from stdin) Eduard Braun 2016-08-16 22:08:49 +02:00
  • 57f93efc89 Don't escape quotes ('/") in text nodes and attributes. (#64) Eduard Braun 2016-08-16 00:10:41 +02:00
  • 738b7d7c5d Don't escape quotes ('/") in text nodes and attributes. - In text nodes quotes are fine - In attributes quotes are fine if used reciprocally. Eduard Braun 2016-08-16 00:07:29 +02:00
  • 2165ef7031 Enable quiet mode when writing output to stdout (otherwise informational text output would be mixed into the SVG output) Eduard Braun 2016-08-15 21:37:48 +02:00
  • fe2884c3e8 Don't remove unreferenced defs if --keep-unreferenced-defs is specified (#62) Eduard Braun 2016-08-14 18:52:55 +02:00
  • 189af6c4b4 Add unittests for previous commit Eduard Braun 2016-08-14 18:48:39 +02:00
  • fcddf97dfb Don't remove unreferenced defs if --keep-unreferenced-defs is specified (fixes #18) Eduard Braun 2016-08-14 18:17:03 +02:00
  • 3299f8f6e0 Also shorten unused IDs when --shorten-ids is specified Eduard Braun 2016-08-14 17:12:48 +02:00
  • 50498dd60c Fix calculation of "Number of bytes saved in id attributes" (bytes safed by renaming the ID attribute istelf were not counted, only those safed by renaming references) Eduard Braun 2016-08-14 17:08:21 +02:00
  • ac82d2e52b Also shorten unused IDs when --shorten-ids is specified (previously unreferenced IDs were simply ignored) Eduard Braun 2016-08-14 17:03:37 +02:00
  • df142a2f22 Drop official support for Python 2.6 Eduard Braun 2016-08-13 17:15:03 +02:00
  • 3f5c6c76c0 Sync version Eduard Braun 2016-08-13 17:14:29 +02:00
  • 06457a7461 trigger build Tobias Oberstein 2016-07-30 15:21:17 +02:00
  • e41893d98f trigger build Tobias Oberstein 2016-07-30 15:17:14 +02:00
  • a766a3256b force travis Tobias Oberstein 2016-07-30 13:14:43 +02:00
  • c564b89d21 Merge pull request #59 from dirk-thomas/order_attributes_option Tobias Oberstein 2016-07-30 13:02:09 +02:00
  • 371f14786a add --order-attributes option Dirk Thomas 2016-07-29 10:22:59 -07:00
  • 0d25d0811b bump version v0.34 Tobias Oberstein 2016-07-25 12:48:17 +02:00
  • 8a2d9d604d Merge pull request #57 from Ede123/xml_standalone Tobias Oberstein 2016-07-25 12:46:45 +02:00
  • f83b03707b Fix unittests for previous commit Eduard Braun 2016-06-12 15:42:30 +02:00
  • 84b36c7109 Only include "standalone" attribute if it was explicitly set to "yes" in input document ("no" is the default value) Eduard Braun 2016-06-12 15:36:02 +02:00
  • 1a8ece216d Merge pull request #53 from codedread/detect_flowtext Tobias Oberstein 2016-04-18 19:01:56 +02:00
  • d2faa6bffd Merge pull request #52 from Ede123/travis Tobias Oberstein 2016-04-03 09:11:06 +02:00
  • 6bb2b35ba2 Continuous integration with Travis and tox Eduard Braun 2016-04-02 19:30:30 +02:00
  • 6a23a4cd71 add unit tests Tobias Oberstein 2016-04-02 17:41:20 +02:00
  • d710fb3f6c whitespace Tobias Oberstein 2016-04-02 17:40:40 +02:00
  • 99dc0dfae9 fix opt groups Tobias Oberstein 2016-04-02 17:11:14 +02:00
  • b14e801cb7 add option to check and warn or bail out on flowtext Tobias Oberstein 2016-04-02 16:49:10 +02:00
  • 70e6fb776e Merge pull request #51 from Ede123/fix1 Tobias Oberstein 2016-04-02 15:22:40 +02:00
  • ea610e5c09 Fix regression in 77906518c0 (accidentally removed default value for "shorten_ids_prefix") Eduard Braun 2016-04-02 01:54:27 +02:00
  • 0d6725e05d Merge pull request #46 from Ede123/options Tobias Oberstein 2016-03-22 16:20:41 +01:00
  • 77906518c0 Use option groups for command line arguments to achieve clearer help output Eduard Braun 2016-02-20 18:43:43 +01:00
  • 72c2ec8e1c Add possibility to specify input/output filename using positional arguments (e.g. 'scour input.svg output.svg') Eduard Braun 2016-02-20 17:51:49 +01:00
  • ab90d18cb2 Merge pull request #45 from Ede123/console_output Tobias Oberstein 2016-02-19 14:08:29 +01:00
  • 7c3331d6f6 Merge pull request #44 from Ede123/default_options Tobias Oberstein 2016-02-19 14:07:29 +01:00
  • b042c93b2c Switch order of new/old size in console output (It already looked like a fraction, now it also yields the correct result if it's read like one) Eduard Braun 2016-02-19 04:47:33 +01:00
  • cf08a72e41 Unittests: Add two tests for and simplify after e701acdc25 Eduard Braun 2016-02-19 04:33:27 +01:00
  • e701acdc25 Add a mechanism to sanitize options. This simplifies usage of the Scour module while avoiding any compatibility issues that might be caused by adding/removing/renaming options. Eduard Braun 2016-02-19 04:03:59 +01:00
  • 1a9d6119e0 bump version v0.33 Tobias Oberstein 2016-01-29 09:26:12 +01:00
  • 170f8c7baa turn down log noise; improve logging Tobias Oberstein 2016-01-29 09:25:43 +01:00
  • d9c273a72c Hopefully definite fix for building from outside package directory (follow-up for 73ec7da13e) Eduard Braun 2016-01-16 02:23:18 +01:00
  • 939dd160bc scour does indeed work on py3 Tobias Oberstein 2016-01-15 13:17:34 +01:00
  • 73ec7da13e allow installation via direct execution of setup.py from outside the package directory Tobias Oberstein 2016-01-15 11:15:22 +01:00
  • 07e9ec0257 add notes on how to install latest trunk Tobias Oberstein 2016-01-15 11:07:29 +01:00
  • f05d73b859 cleanup readme Tobias Oberstein 2016-01-15 10:53:35 +01:00
  • dccb80314c Merge pull request #37 from Eitot/sketch Tobias Oberstein 2016-01-15 10:44:32 +01:00
  • 219500a329 Merge fed6203d36 into fbf4e3ec2e Eitot 2016-01-15 08:16:06 +00:00
  • fed6203d36 Fix import error in setup.py Eitot 2016-01-15 03:22:02 +01:00
  • 184efee16e - Initial support for Sketch - Typos in README.md Eitot 2015-12-24 11:18:08 +01:00
  • fbf4e3ec2e Merge pull request #36 from Eitot/readme Tobias Oberstein 2015-12-21 12:59:06 +01:00
  • 972812e6c7 Update README.md Eitot 2015-12-21 08:16:14 +01:00
  • 232f27269a bump version for release v0.32 Tobias Oberstein 2015-12-10 23:39:16 +01:00
  • 130a71327a Merge pull request #28 from Ede123/comments Tobias Oberstein 2015-12-10 23:34:59 +01:00
  • 0a0a062718 Merge pull request #27 from Ede123/encoding Tobias Oberstein 2015-12-10 23:32:22 +01:00
  • c698522c28 Simplify and fix "removeComments()" * The separate treatment of comments at the documentElement's level is not necessary - they have a parent (as tested in Python 3.5.0 and 2.7.11 and 2.6.6)! It might not have worked before due to a typo - note the "if isinstance(element,...)" and "len(element.data)" which should both refer to "subelement" instead - or a bug in very old versions of Python). * Fix the iteration over childNodes (i.e. replace "for subelement in element.childNodes:" with ""for subelement in element.childNodes[:]:". We have to create a copy of the list to iterate over, otherwise we'd be iterating over a list as we change it which leads to unpredictable results. Eduard Braun 2015-12-10 22:50:31 +01:00
  • 946ca3ce4a Unittests: Add a test for proper decoding of ISO 8859-15 Eduard Braun 2015-12-09 21:31:16 +01:00
  • 8984e550b0 Read from stdin in binary mode an let XML parser deal with encoding. Also write to stdout in binary mode as the output is already encoded. Eduard Braun 2015-12-09 00:30:16 +01:00
  • 4eade69201 Open input file in binary mode an let XML parser deal with encoding. Fixes #26 Eduard Braun 2015-12-08 23:38:06 +01:00
  • 1a6ff29c14 Merge pull request #24 from Ede123/unittests Jeff Schiller 2015-12-08 08:23:30 -08:00
  • 32e7e5517f Unittests: Account for b979fe19e5 (fix one test and add two more) - Unused XML namespace declarations *are supposed* to be removed - XML namespace declarations that are used as prefix for elements/attributes *must not* be removed Eduard Braun 2015-12-07 00:27:25 +01:00
  • ab1aa0e2f8 Fix a bug with "points" attribute of "polyline/polygon" starting with a negative number. In this case "len(nums) = 0" and "nums[len(nums)-1]" triggered an "IndexError: list index out of range" Eduard Braun 2015-12-06 23:47:56 +01:00
  • f0c69b827e Unittests: Sync options with current Scour (fixes yet two other errors when running tests) Eduard Braun 2015-12-06 23:07:06 +01:00
  • 2293e1bd4a Fix regex for list of points splitting: Expect at least one whitespace character or comma between coords. The previous regex would have allowed zero length matches and therefore could have split the string after every character - luckily this was not (yet) correctly implemented in Python. Since Python 3.5 a warning is raised informing of this problem. Future versions will correctly split also at zero length matches. Eduard Braun 2015-12-06 22:53:03 +01:00
  • c54c5e5d7e Unittests: Fix warnings - Replace deprecated assertion-aliases - Make sure opened files are properly closed after usage Eduard Braun 2015-12-06 22:13:21 +01:00
  • 320bdda6e9 Unittests: Run python-modernize Eduard Braun 2015-12-06 21:20:05 +01:00
  • 391ff77659 Unittests: Fix import paths Eduard Braun 2015-12-06 20:10:12 +01:00
  • 3b7e8a0091 Restore unittests from history Eduard Braun 2015-12-06 19:59:06 +01:00
  • ebccae8cad Merge pull request #17 from Ede123/compat_fix Tobias Oberstein 2015-11-26 22:56:48 +01:00
  • 6254548582 Compatibility fix for Python 2.6 (NamedNodeList seems not to have had the iterkeys method back then) Eduard Braun 2015-11-21 23:29:59 +01:00
  • 46a2ada361 Merge pull request #14 from Ede123/namespaces Tobias Oberstein 2015-11-17 23:18:46 +01:00
  • 532f664001 Minor fix in console output (superfluous space) Eduard Braun 2015-11-17 23:09:25 +01:00
  • 89f4b687f2 Statistics: count also attributes removed from root SVG element Eduard Braun 2015-11-17 22:49:50 +01:00
  • 67bacc2f23 Remove metadata right away (i.e. before checking for unused XML namespaces; otherwise the relevant namespaces used for metadata would not yet be unused) Eduard Braun 2015-11-17 22:46:50 +01:00
  • b979fe19e5 Remove unused XML namespace declarations Eduard Braun 2015-11-17 22:30:23 +01:00
  • 302f7f7477 use absolute imports Tobias Oberstein 2015-11-16 20:36:12 +01:00
  • d3b29a68da fix links; only upload source dist v0.31 Tobias Oberstein 2015-11-16 18:12:56 +01:00
  • ec7385c995 update readme Tobias Oberstein 2015-11-16 18:08:02 +01:00
  • e903475289 cleanups; bump version Tobias Oberstein 2015-11-16 18:05:35 +01:00
  • 27d5cd3881 Merge pull request #13 from Ede123/options Tobias Oberstein 2015-11-16 16:39:58 +01:00
  • af22f09094 Merge df11ee6588 into a5b09e3824 Eduard Braun 2015-11-15 18:40:14 +00:00
  • 7e36be4aaa Add an option to strip the xml:space="preserve" attribute from the root SVG element This attribute is added by at least one popular vector graphics editor thwarting our efforts to pretty-print the output. Eduard Braun 2015-11-15 19:26:39 +01:00
  • e21e362353 Add an option to suppress output of line breaks (obviously this also disables indentation) Eduard Braun 2015-11-15 18:44:17 +01:00
  • 18266ca1ec Add an option to set number of spaces (or tabs used for indentation) Eduard Braun 2015-11-15 17:58:08 +01:00
  • df11ee6588 Add wrapper script to allow standalone execution of the Scour module (this was broken after d1c66cc75b) Eduard Braun 2015-11-15 16:52:53 +01:00