pyflutter-app 0.2.8__tar.gz → 0.2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/PKG-INFO +1 -1
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyproject.toml +1 -1
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/table.py +2 -2
- pyflutter_app-0.2.9/toi.py +100 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/uv.lock +1 -1
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/.gitignore +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/.idea/.gitignore +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/.idea/inspectionProfiles/Project_Default.xml +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/.idea/misc.xml +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/.idea/modules.xml +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/.idea/pyflutter_app.iml +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/.idea/vcs.xml +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/README.md +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/cartas/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/cartas/_table_toi.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/cartas/common.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/cartas/erros.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/cartas/find_toi.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/cartas/relatorio.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/cartas/util.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/__main__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/assets/forms_config.json +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/config_app.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/home_page/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/home_page/_page_edit.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/home_page/controller.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/home_page/model.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/home_page/view.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/lib_toi.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/page_forms/Diagnorstico.txt +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/page_forms/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/page_forms/common.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/page_forms/config.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/page_forms/controller_forms.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/page_forms/diagnose_forms.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/page_forms/model_forms.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/page_forms/service.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/page_forms/view_forms.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/run_app_convert.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/table_widget.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/util.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/whatsapp/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/converter/whatsapp/model.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/export_app.sh +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/local_build/linux.sh +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/local_build/send.sh +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/main.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/mediator.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/mvc/controller.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/mvc/model.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/mvc/view.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/new-export_app.sh +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/ocrlib/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/ocrlib/_common.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/ocrlib/_pdf_convert.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/ocrlib/_table_ocr.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/ocrlib/_tesseract.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/ocrlib/erros.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/ocrlib/export_ocr.sh +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/ocrlib/relatorio_ocr.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/ocrlib/util.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/app.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/file_picker.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/navigator.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/scheduler.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/theme.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/ui/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/ui/buttons.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/ui/container.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/ui/core.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/ui/list_builder.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/ui/progress.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/ui/tables.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/pyflutter_ui/ui/widgets.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/erros.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/hash_map.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/notifier.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/pattner/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/pattner/adapter.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/sheet/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/sheet/check_mod.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/sheet/load.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/sheet/options.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/sheet/parse.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/sheet/save.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/state.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/sysfiles.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/thread.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/table_stream/workbook.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/test.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/whatsapp_files/__init__.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/whatsapp_files/_table_whatsapp.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/whatsapp_files/common.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/whatsapp_files/erros.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/whatsapp_files/stream_files.py +0 -0
- {pyflutter_app-0.2.8 → pyflutter_app-0.2.9}/whatsapp_files/util.py +0 -0
|
@@ -827,7 +827,7 @@ def concat_tables[TB_TYPE](
|
|
|
827
827
|
raise ListTablesEmptyError("Não é possível concatenar uma lista vazia")
|
|
828
828
|
|
|
829
829
|
header = values[0].header()
|
|
830
|
-
final:
|
|
830
|
+
final: TableData = rt_type()
|
|
831
831
|
header.for_each(lambda h: final.add(ColumnV(h)))
|
|
832
832
|
|
|
833
833
|
current_table: Table
|
|
@@ -891,7 +891,7 @@ class SequenceTables[TB_TYPE](ArrayList[Table]):
|
|
|
891
891
|
"""
|
|
892
892
|
return self.append(v)
|
|
893
893
|
|
|
894
|
-
def concat(self, rt_type: type[TB_TYPE] =
|
|
894
|
+
def concat(self, rt_type: type[TB_TYPE] = TableData) -> TB_TYPE | Table:
|
|
895
895
|
"""
|
|
896
896
|
Concatena os itens existentes na tabela e limpa a tabela atual com o método clear.
|
|
897
897
|
"""
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
from table_stream import *
|
|
2
|
+
from cartas import *
|
|
3
|
+
from whatsapp_files import *
|
|
4
|
+
from ocrlib import *
|
|
5
|
+
import pandas as pd
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def get_now():
|
|
10
|
+
dt = datetime.now()
|
|
11
|
+
y = dt.year
|
|
12
|
+
m = dt.month
|
|
13
|
+
d = dt.day
|
|
14
|
+
dt.time()
|
|
15
|
+
|
|
16
|
+
return f"{y}-{m}-{d}"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
ufs = UserFileSystem()
|
|
20
|
+
cache_dir = ufs.get_user_downloads().concat("CacheToi", create=True)
|
|
21
|
+
config_wp = BuilderConfigWhatsApp().builder()
|
|
22
|
+
config_toi = BuilderConfigTOI().builder()
|
|
23
|
+
# cache_dir = ufs.get_user_downloads().concat("RFA", True)
|
|
24
|
+
|
|
25
|
+
file_ocr = cache_dir.join_file("ocr-todos.xlsx")
|
|
26
|
+
file_toi_todos = cache_dir.join_file("toi-todos.xlsx")
|
|
27
|
+
file_toi_recente = cache_dir.join_file(f"{get_now()} tois-recentes.xlsx")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def save(t: Table, f: File):
|
|
31
|
+
print(f"Salvando ... {f}")
|
|
32
|
+
t.to_dataframe().to_excel(f.absolute(), index=False)
|
|
33
|
+
|
|
34
|
+
name = f.name_absolute()
|
|
35
|
+
csv_name = f"{name}.csv"
|
|
36
|
+
|
|
37
|
+
print(f"Salvando ... {csv_name}")
|
|
38
|
+
t.to_dataframe().to_csv(csv_name, index=False)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def join_all():
|
|
42
|
+
|
|
43
|
+
rw = ReadWriteTableOCR()
|
|
44
|
+
list_ocr = SequenceTables()
|
|
45
|
+
|
|
46
|
+
df_pdf = rw.load_table_pdf().to_dataframe().dropna()
|
|
47
|
+
df_img = rw.load_table_image().to_dataframe().dropna()
|
|
48
|
+
|
|
49
|
+
list_ocr.add(TableOcr.create_from_data(df_pdf))
|
|
50
|
+
list_ocr.add(TableOcr.create_from_data(df_img))
|
|
51
|
+
|
|
52
|
+
# list_ocr.for_each(lambda t: t.remove_null(HeaderOcr.TEXT))
|
|
53
|
+
|
|
54
|
+
final = list_ocr.concat()
|
|
55
|
+
print(f"Salvando ... {file_ocr}")
|
|
56
|
+
# final.to_dataframe().to_excel(file_ocr.absolute(), index=False)
|
|
57
|
+
save(final, file_ocr)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def create_toi_todos():
|
|
61
|
+
src = config_wp.dir_export_files
|
|
62
|
+
content = ContentFiles(src)
|
|
63
|
+
pdf = content.get_pdfs()
|
|
64
|
+
pdf.extend(content.get_images())
|
|
65
|
+
|
|
66
|
+
data = HashMapDict[hashFile, File]()
|
|
67
|
+
pdf.for_each(lambda f: data.set_value(load_file_hash(f), f))
|
|
68
|
+
|
|
69
|
+
controller = ControllerTOI()
|
|
70
|
+
tb = controller.find_on_cache(data)
|
|
71
|
+
save(tb, file_toi_todos)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def criar_toi_recente():
|
|
75
|
+
|
|
76
|
+
# file_toi_recente = config_toi.file_relatorio_toi
|
|
77
|
+
builder = BuilderTablesTOI()
|
|
78
|
+
|
|
79
|
+
# meses = ["07", "08", "09", "10"]
|
|
80
|
+
meses = ["10"]
|
|
81
|
+
|
|
82
|
+
df = pd.read_excel(file_toi_todos.absolute())
|
|
83
|
+
tb = builder.create_table_forms_from_df(df)
|
|
84
|
+
|
|
85
|
+
tb_meses = tb.search_all(HeaderCartas.MON, meses)
|
|
86
|
+
|
|
87
|
+
if tb_meses is None:
|
|
88
|
+
return
|
|
89
|
+
|
|
90
|
+
save(tb_meses, file_toi_recente)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def main():
|
|
94
|
+
|
|
95
|
+
# join_all()
|
|
96
|
+
# create_toi_todos()
|
|
97
|
+
criar_toi_recente()
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|