mirror of
https://github.com/novoid/guess-filename.py.git
synced 2026-02-16 13:24:15 +00:00
added another PDF example
This commit is contained in:
parent
74f502a013
commit
8f0d1636ac
1 changed files with 15 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Time-stamp: <2016-03-09 18:22:48 vk>
|
# Time-stamp: <2016-03-09 18:33:30 vk>
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# * fix parts marked with «FIXXME»
|
# * fix parts marked with «FIXXME»
|
||||||
|
|
@ -438,6 +438,20 @@ class GuessFilename(object):
|
||||||
' '.join(self.adding_tags(tags, ['scan', 'taxes'])) + \
|
' '.join(self.adding_tags(tags, ['scan', 'taxes'])) + \
|
||||||
u".pdf"
|
u".pdf"
|
||||||
|
|
||||||
|
# 2015-11-24 Rechnung A1 Festnetz-Internet 12,34€ -- scan finance.pdf
|
||||||
|
if self.fuzzy_contains_all_of(content, [self.config.PROVIDER_CONTRACT, self.config.PROVIDER_CUE]) and \
|
||||||
|
datetimestr:
|
||||||
|
floatstr = self.get_euro_charge_from_context(content,
|
||||||
|
u"\u2022",
|
||||||
|
"Bei Online Zahlungen geben Sie")
|
||||||
|
if not floatstr:
|
||||||
|
floatstr = 'FIXXME'
|
||||||
|
logging.warning(u"Could not parse the charge from file %s - please fix manually" % basename)
|
||||||
|
return datetimestr + \
|
||||||
|
u" A1 Festnetz-Internet " + floatstr + \
|
||||||
|
u"€ -- " + ' '.join(self.adding_tags(tags, ['scan', 'finance', 'bill'])) + \
|
||||||
|
u".pdf"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# FIXXME: more file documents
|
# FIXXME: more file documents
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue