-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
34 lines (30 loc) · 873 Bytes
/
example.py
File metadata and controls
34 lines (30 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
from pathlib import Path
from db import init_db
from db.services import TransactionService
from config import APP_ID, APP_SECRET
from feishu.message import FeishuMessageSender
from feishu.table import FeishuTable
from util import common_util
from util.common_util import find_project_root
# sender = FeishuMessageSender(
# app_id=APP_ID,
# app_secret=APP_SECRET
# )
# init_db()
#
# # 创建服务实例
# service = TransactionService()
table = FeishuTable(APP_ID, APP_SECRET)
# table_name = table.get_table_name()
# project_root = common_util.find_project_root()
# file_path = os.path.join(project_root, table_name + '.csv', )
# print(file_path)
# print(table.get_file_path())
table.export_table()
# print(data)
# msg = '\n'.join([
# f"类型: {t.type}, 金额: {t.amount}"
# for t in data
# ])
# print(msg)