From: Mauro Scomparin Date: Mon, 16 Sep 2019 21:23:10 +0000 (+0200) Subject: aggiunto filtro X-Git-Url: https://git.scompo.it/?a=commitdiff_plain;h=520598bbb441cced13d6a5e34c44bd33146f2d37;p=money.git aggiunto filtro --- diff --git a/money/money.py b/money/money.py index a2f3553..40ccf7e 100755 --- a/money/money.py +++ b/money/money.py @@ -52,6 +52,7 @@ DATE_MESSAGE = create_input_message(DATE_FIELD_NAME, 'DD/MM/YYYY', _('today')) HOUR_MESSAGE = create_input_message(HOUR_FIELD_NAME, 'HH:MM', _('now')) VALUE_MESSAGE = create_input_message(VALUE_FIELD_NAME, '#####.##', '') DESCRIPTION_MESSAGE = create_input_message(DESCRIPTION_FIELD_NAME, '', '') +FILTER_MESSAGE = create_input_message(_('regex filter'), '', '') def write_movement_to_file(path, m): @@ -81,6 +82,9 @@ def write_movement_to_stream(fileStream, movement): fileStream.write('\n') return +def read_filter(): + filtro = input(FILTER_MESSAGE) + return filtro def read_type(): t = 'n' @@ -224,7 +228,7 @@ def filter_regex_movements(data_file, conf, filter): ordered_movements = sort_movements(movements) filtered_movements = mov_filter(ordered_movements, filter) for movement in filtered_movements: - formatted_movement = format_movement(ordered_movements[i]) + formatted_movement = format_movement(movement) print(formatted_movement) def filter_movements(): diff --git a/money/translations/it/LC_MESSAGES/money.mo b/money/translations/it/LC_MESSAGES/money.mo index c06178e..bf7456f 100644 Binary files a/money/translations/it/LC_MESSAGES/money.mo and b/money/translations/it/LC_MESSAGES/money.mo differ diff --git a/money/translations/it/LC_MESSAGES/money.po b/money/translations/it/LC_MESSAGES/money.po index 2f10ed0..4cc5c9d 100644 --- a/money/translations/it/LC_MESSAGES/money.po +++ b/money/translations/it/LC_MESSAGES/money.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: money 2.0.0\n" -"Report-Msgid-Bugs-To: scompo@gmail.com\n" -"POT-Creation-Date: 2018-07-18 22:00+0200\n" +"Project-Id-Version: money 2.0.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-09-16 23:15+0200\n" "PO-Revision-Date: 2018-07-10 23:17+0200\n" "Last-Translator: \n" "Language-Team: Italian\n" @@ -17,50 +17,55 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: money/money.py:20 +#: money/money.py:21 msgid "type" msgstr "tipo" -#: money/money.py:21 +#: money/money.py:22 msgid "value" msgstr "valore" -#: money/money.py:22 +#: money/money.py:23 msgid "date" msgstr "data" -#: money/money.py:23 +#: money/money.py:24 msgid "hour" msgstr "ora" -#: money/money.py:24 +#: money/money.py:25 msgid "description" msgstr "descrizione" -#: money/money.py:50 +#: money/money.py:51 msgid "today" msgstr "oggi" -#: money/money.py:51 +#: money/money.py:52 msgid "now" msgstr "adesso" -#: money/money.py:139 +#: money/money.py:55 +#, fuzzy +msgid "regex filter" +msgstr "filtro regex" + +#: money/money.py:144 msgid "data file:" msgstr "file dati:" -#: money/money.py:331 +#: money/money.py:365 msgid "latest {} movements:" msgstr "ultimi {} movimenti:" -#: money/money.py:382 +#: money/money.py:416 msgid "actual value: {}" msgstr "valore attuale: {}" -#: money/money.py:383 +#: money/money.py:417 msgid "total incomes: {}" msgstr "incassi totali: {}" -#: money/money.py:384 +#: money/money.py:418 msgid "total expenses: {}" msgstr "spese totali: {}" diff --git a/money/translations/money.pot b/money/translations/money.pot index 45d64c8..68e7a1d 100644 --- a/money/translations/money.pot +++ b/money/translations/money.pot @@ -1,66 +1,70 @@ -# Translations for money template file. -# Copyright (C) 2018 Mauro Scomparin +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# Mauro Scomparin , 2018. +# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: money 2.0.0\n" -"Report-Msgid-Bugs-To: scompo@gmail.com\n" -"POT-Creation-Date: 2018-07-18 22:00+0200\n" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-09-16 23:16+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: money/money.py:20 +#: money/money.py:21 msgid "type" msgstr "" -#: money/money.py:21 +#: money/money.py:22 msgid "value" msgstr "" -#: money/money.py:22 +#: money/money.py:23 msgid "date" msgstr "" -#: money/money.py:23 +#: money/money.py:24 msgid "hour" msgstr "" -#: money/money.py:24 +#: money/money.py:25 msgid "description" msgstr "" -#: money/money.py:50 +#: money/money.py:51 msgid "today" msgstr "" -#: money/money.py:51 +#: money/money.py:52 msgid "now" msgstr "" -#: money/money.py:139 +#: money/money.py:55 +msgid "regex filter" +msgstr "" + +#: money/money.py:144 msgid "data file:" msgstr "" -#: money/money.py:331 +#: money/money.py:365 msgid "latest {} movements:" msgstr "" -#: money/money.py:382 +#: money/money.py:416 msgid "actual value: {}" msgstr "" -#: money/money.py:383 +#: money/money.py:417 msgid "total incomes: {}" msgstr "" -#: money/money.py:384 +#: money/money.py:418 msgid "total expenses: {}" msgstr "" diff --git a/setup.py b/setup.py index ef85cbc..1ffded9 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ here = path.abspath(path.dirname(__file__)) setup( name='money', - version='2.0.1', + version='2.0.2', description='Money handling program', long_description='A python program to handle expenses and incomes', url='http://code.scompo.it:3000/scompo/money',