Commit Graph

52 Commits

Author SHA1 Message Date
Georg Sauthoff f469a9b9fc Add product changes that are effective 2020-01-01
i.e. some added/removed products and some price changes

The package now supports multiple price lists and selects the right
one based on the effective date suffix (if present).
2019-11-22 18:27:43 +01:00
Georg Sauthoff e72514697c Print inema version 2019-11-22 18:27:03 +01:00
Georg Sauthoff 824ed58d03 Remove trailing whitespace 2019-11-22 18:26:35 +01:00
Georg Sauthoff 6ad0d4dadd Fix json UTF8 dumping in Python 2 2019-07-15 19:41:49 +02:00
Harald Welte 77d55b4f48 update products.json with sorted keys / defined ordering
This will avoid lots of unwanted diffs on future updates
2019-07-15 07:50:28 +08:00
Georg Sauthoff ed139e5b59 Port to Python3, canonicalize JSON, retain Umlauts 2019-07-14 15:31:03 +02:00
Georg Sauthoff fe0e30f173 We don't require lxml - zeep does
and has it as a requirement in its setup.py
2019-07-14 13:41:45 +02:00
Harald Welte fdc295653b bump version to 0.8 2019-07-11 23:59:54 +08:00
Harald Welte 39c519f147 Update products.json with current dump of 20190711
This was extracted from ProdWS using 'examples/products.py | json_pp'
2019-07-11 23:59:42 +08:00
Henrik Genssen 896ac2abc0 Add ProductInformation() class and examples/products.py
This allows the user to re-generate (update) the price list in
products.json using ProdWS API, which is a separate API provided by DPAG
to obtain the product catalogue including pricing information.
2019-07-11 23:59:42 +08:00
Henrik Genssen 114b6c036b make gen_1c4a_hdr() and get_product_price_by_id() class methods 2019-07-11 23:59:42 +08:00
Harald Welte 999c0b713b Fix utf-8 parsing of json data files 2019-07-11 23:59:42 +08:00
Henrik Genssen 103c0f4059 Add coding/utf8 annotations to fix special characters for python 2.7 2019-07-11 23:59:42 +08:00
Harald Welte 2646fdc889 bump version to 0.7 2019-07-11 23:59:42 +08:00
Harald Welte 3cb30f5137 products.json: Update some prices to 2019-07-01
Deutshce Post changed pricing, let's update this for some products. A
proper fix for all products will follow as separate patch.
2019-07-11 23:22:28 +08:00
Harald Welte bef18ffa51 setup.py: Add install_requires for pytz
From commit 36120fbd7d onwards, we
introduced a dependency to pytz for timezone conversion.  This
dependency was not reflected in setup.py.
2019-06-03 09:38:18 +02:00
Harald Welte 9ec7af1df4 products.json: Avoid "Umlauts" for python 2.x compatibility
Without this patch, python 2.x would abort with a famous
	'ascii' codec can't decode byte ...
error.  This is why I kept the file free of special characters
so far, but commit 6d2ee85a7e
unfortunately broke that assumption.

I'm sure there's a proper solution, but I really don't feel like
investing time into researching and testing that now.
2019-06-03 07:34:09 +00:00
Georg Sauthoff 539148021e bump to version 0.6 2019-03-25 14:29:45 +01:00
Georg Sauthoff 7e141341a2 Fix deprecation warning 2019-03-25 14:27:55 +01:00
Georg Sauthoff 6d2ee85a7e Add some new Warenpost products
reported by Remi Bergsma
2019-03-25 14:24:50 +01:00
Georg Sauthoff 68e58a42e2 Fix name-key typo in products.json
reported by Remi Bergsma
2019-03-25 14:20:59 +01:00
Harald Welte fc2365d3d7 Add PEP-0396 compatible __version__ to the module and bump to 0.5 2019-01-16 16:08:32 +01:00
Harald Welte 7e1493ee09 products.json: Warenpost "L" is up to 2kg, not 1kg 2019-01-09 00:34:19 +01:00
Harald Welte a4950a0e0b products.json: Update to 20190101
* add new "Warenpost International" prices
* update pricing
* order document in logical groups + ascending order
2019-01-09 00:14:35 +01:00
Georg Sauthoff 72b46e97b0 bump version to 0.4 2018-12-09 11:18:32 +01:00
Georg Sauthoff db0e33d420 Update prices of Waren-/Büchersendung products
cf. https://web.archive.org/web/20180810155706/https://shop.deutschepost.de/briefversand/spezielle-versandformen/buechersendung-und-warensendung
2018-08-10 18:01:27 +02:00
Harald Welte 34efc61d9c move development status to production/stable 2018-05-14 10:26:49 +02:00
Georg Sauthoff 23502e15f1 Add --print option. 2018-05-10 15:30:41 +02:00
Georg Sauthoff 1d4bf4813c Add command line frontend 'frank' 2017-06-24 13:06:03 +02:00
Harald Welte a88240dea5 bump version to 0.2 2016-12-13 14:15:08 +01:00
Harald Welte e464545a89 Fix company addresses with contact person
When using the build_comp_addr() method 'person' argument, we need
to pass in a PersonName object, and not a string name of the contact.

Add a public build_pers_name() method to produce that PersonName object,
and use it from the example code.
2016-12-13 14:08:29 +01:00
Matthias Bilger 04cdf054c4 Allow no sender and receiver 2016-11-30 17:49:11 +01:00
Matthias Bilger 4061765f48 Added formats.json to setup 2016-11-30 17:48:13 +01:00
Harald Welte 325d2efa08 use round() to avoid truncation errros when doing int(5.1 * 100) = 5.09
Before this commit, a postage of 5.10 EUR would actually be reported as
postage of 5.09 EUR and subsequently rejected by DPAG.
2016-10-25 14:56:02 +02:00
Georg Sauthoff 2f0f298075 add preview pdf call 2016-09-26 20:26:15 +02:00
Georg Sauthoff a013f6c4c6 Store pdf in result, also store manifest
- since multiple vouchers yield one PDF, storing it directly in the
  result object makes more sense
- the manifest is also available when buying PDFs, thus retrieve it as
  well
2016-09-26 16:02:01 +02:00
Georg Sauthoff af78ec1c53 support building ShoppingCartPDFPosition positions 2016-09-23 18:37:58 +02:00
Georg Sauthoff bf758177bf add formats retrieval method
and cache the result as json
2016-09-23 18:36:32 +02:00
Georg Sauthoff 19c48360cb convert class variable into an instance one
Otherwise, you can't have multiple connections with different
authentications and basket contents. Also, re-constructing the
object didn't clear the positions which isn't very intuitive.
2016-09-23 11:38:01 +02:00
Georg Sauthoff d5220f809e fix Python 3 compatibiltiy
the result still is compatible with Python 2 (tested with 2.7)

- use relative import in `__init__.py` such that the import of `inema`
  also works with `PYTHONPATH` set to the repository
- use another method to load the json file, i.e. one that also works
  when the package isn't installed
- replace some deprecated imports (that aren't available in Python 3)
  with their sucessors
- replace some Python 2 specific constructs (e.g. `map` that implicitly
  converts to a list in Python 2 but just returns a map object in Python 3)
2016-09-23 11:30:18 +02:00
Harald Welte a478bfe03e setup.py: Update classifiers, add cgit URL 2016-07-24 13:32:31 +02:00
Harald Welte 597cc60046 Add actual content to README.rst 2016-07-24 12:56:03 +02:00
Harald Welte 869d001b81 setup.py: Add missing ',' 2016-07-24 12:49:58 +02:00
Harald Welte c136b66a31 fix setup.py / install on FreeBSD 2016-07-24 12:48:20 +02:00
Harald Welte d679cc1d3d add example script on how to use python-inema 2016-07-24 12:37:29 +02:00
Harald Welte 3a643f54b5 port to python-zeep >= 0.12.0 which uses _soapheaders
Prior to this commit, we useda custom modified versin of python-zeep
that accepts a list of headesr as part of the _soapheader argument.
Recent changes to python-zeep include that support natively using the
_soapeheaders [plural] argument.  Port the code to that.
2016-07-24 12:29:29 +02:00
Harald Welte bdb60a861b log how many positions in the basket we are submitting 2016-07-15 23:24:21 +02:00
Harald Welte eb03095932 add new clear_positions() method to clear a shopping basket 2016-07-15 23:24:05 +02:00
Harald Welte 4a87cb7d57 fix logger statements in terms of format string use 2016-07-15 15:53:27 +02:00
Harald Welte 9b3187c6a9 remove 'print' statements and use python logging instead 2016-07-15 15:03:46 +02:00