elastolink 0.0.2__py3-none-any.whl
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.
- elastolink-0.0.2.dist-info/METADATA +167 -0
- elastolink-0.0.2.dist-info/RECORD +8 -0
- elastolink-0.0.2.dist-info/WHEEL +5 -0
- elastolink-0.0.2.dist-info/entry_points.txt +3 -0
- elastolink-0.0.2.dist-info/licenses/LICENSE +121 -0
- elastolink-0.0.2.dist-info/top_level.txt +1 -0
- netkiller/__init__.py +0 -0
- netkiller/elastolink.py +204 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: elastolink
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: Elastolink CLI
|
|
5
|
+
Author-email: Neo <netkiller@msn.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/elastolink/elastolink-cli
|
|
8
|
+
Project-URL: Issues, https://github.com/elastolink/elastolink-cli/issues
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.14
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: httpx
|
|
15
|
+
Requires-Dist: tqdm
|
|
16
|
+
Requires-Dist: texttable
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# Elastolink CLI
|
|
20
|
+
|
|
21
|
+
```shell
|
|
22
|
+
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
23
|
+
pip install build twine
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Help
|
|
28
|
+
|
|
29
|
+
```shell
|
|
30
|
+
(.venv) neo@Mac elastolink % python elastolink-cli.py
|
|
31
|
+
usage: elastolink-cli.py [-h] [-l] [-d <会议ID>] [-m <会议ID>] [-o <会议ID>] [-s <关键词>] [-k <API KEY>] [--status] [--verbose]
|
|
32
|
+
|
|
33
|
+
Elastolink Command Line Interface
|
|
34
|
+
|
|
35
|
+
options:
|
|
36
|
+
-h, --help show this help message and exit
|
|
37
|
+
-l, --list 会议列表
|
|
38
|
+
-d, --detail <会议ID> 查看会议内容
|
|
39
|
+
-m, --markdown <会议ID> 会议 Markdown 文件
|
|
40
|
+
-o, --office <会议ID> 下载 Office 会议文档
|
|
41
|
+
-s, --search <关键词> 会议搜索
|
|
42
|
+
-k, --key <API KEY> 设置 API KEY
|
|
43
|
+
--status 设备状态
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 设置 API KEY
|
|
47
|
+
|
|
48
|
+
请先在小程序后台,用户中心生成 API KEY
|
|
49
|
+
|
|
50
|
+
```shell
|
|
51
|
+
(.venv) neo@Mac elastolink % python elastolink-cli.py -k sk-02172F38-776D-4F5F-88D3-EAC0F87E445B
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 会议列表
|
|
56
|
+
|
|
57
|
+
```shell
|
|
58
|
+
(.venv) neo@Mac elastolink % python elastolink-cli.py -l
|
|
59
|
+
|
|
60
|
+
+----------------------------------------+----------------------+------------+----------+--------------+
|
|
61
|
+
| 会议ID | 会议标题 | 会议时长 | 会议语言 | 会议日期 |
|
|
62
|
+
+========================================+======================+============+==========+==============+
|
|
63
|
+
| fb997978-df53-4588-a163-d28da08d9f06 | 会议测试 | - | - | 2026-03-17 |
|
|
64
|
+
+----------------------------------------+----------------------+------------+----------+--------------+
|
|
65
|
+
| 019f3094-21af-4802-8b7e-07b11e31673e | 会议测试 | - | - | 2026-03-17 |
|
|
66
|
+
+----------------------------------------+----------------------+------------+----------+--------------+
|
|
67
|
+
| c8e44bb3-5f17-4b46-9689-87ccf2f901a1 | 会议测试 | - | - | 2026-03-17 |
|
|
68
|
+
+----------------------------------------+----------------------+------------+----------+--------------+
|
|
69
|
+
| a5a574f7b7d34cfd8a9b564670ef354b | PodcastEnglishLear | 01:56:52 | en-US | 2026-03-25 |
|
|
70
|
+
+----------------------------------------+----------------------+------------+----------+--------------+
|
|
71
|
+
|
|
72
|
+
共 4 条会议
|
|
73
|
+
--------------------------------------------------------------------------------
|
|
74
|
+
您可以使用 elastolink-cli -d <会议ID> 查看会议内容
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 查看会议
|
|
78
|
+
|
|
79
|
+
```shell
|
|
80
|
+
(.venv) neo@Mac elastolink % python elastolink-cli.py -d a5a574f7b7d34cfd8a9b564670ef354b
|
|
81
|
+
会议主题:PodcastEnglishLearningTips
|
|
82
|
+
会议时间:2026-03-25T14:32:32
|
|
83
|
+
会议时长:01:56:52
|
|
84
|
+
会议语言:en_US
|
|
85
|
+
----- 会议内容 -----
|
|
86
|
+
00:00:31 1:English shpodcast .
|
|
87
|
+
00:00:36 2:from speak English with class.
|
|
88
|
+
00:00:40 3:Hey, Hey, English learners, welcome back to the English leap podcast.
|
|
89
|
+
00:00:46 3:Your cozy place to learn easy English through real life conversations. I'm Anna and I'm Jake.
|
|
90
|
+
00:00:51 4:And as always, we're really happy you decided to spend a little bit of your day with us.
|
|
91
|
+
00:00:51 4:Yeah, seriously.
|
|
92
|
+
00:01:02 3:you could be anywhere on the Internet right now, Netflix, Instagram, games, but you're here with us working on your English and not .
|
|
93
|
+
00:01:02 4:just here.
|
|
94
|
+
00:01:11 4:In one place, we see you in the comments, people listening from so many different parts of the world.
|
|
95
|
+
00:01:15 3:and we just want to say a big thank you for all your love and support.
|
|
96
|
+
00:01:22 3:When we read, I listen to you on my way to work or I fall asleep with your podcast. It makes our hearts so happy. Yeah.
|
|
97
|
+
00:01:30 4:sometimes we're like, wow, our little cozy podcast is traveling more than we are .
|
|
98
|
+
00:01:30 3:one day.
|
|
99
|
+
00:02:02 1:因没有,你是不定要套餐去块,是你要想要法,它就必以就要有。
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## 查看 Mardown 文档
|
|
103
|
+
|
|
104
|
+
```shell
|
|
105
|
+
(.venv) neo@Mac elastolink % python elastolink-cli.py -m a5a574f7b7d34cfd8a9b564670ef354b | head -n 10
|
|
106
|
+
----- 鱼骨图 (开始)-----
|
|
107
|
+
- 缺乏对不同家庭具体使用场景的明确理解
|
|
108
|
+
- 销售人员与潜在客户的初步沟通不足,未能全面收集家庭日常通勤距离、长途旅行频率、载客与载物需求等关键信息。
|
|
109
|
+
- 市场调研数据未按家庭结构(如单身、有孩家庭、多代同堂)和主要用车场景(城市代步、城际通勤、周末休闲)进行精细化分类。
|
|
110
|
+
- 现有宣传材料过于笼统,未能清晰展示不同双擎车型如何针对性解决各类家庭的特定痛点。
|
|
111
|
+
- 对丰田双擎技术优势与家庭实用性关联的传达不清晰
|
|
112
|
+
- 技术讲解过于专业化,使用了过多工程术语,导致普通家庭消费者难以理解混动系统如何直接转化为低油耗、平顺驾驶和降低使用成本。
|
|
113
|
+
- 试驾体验流程标准化,未能引导客户在模拟典型家庭使用场景(如拥堵路段、满载爬坡、安静行驶)中感受双擎技术的核心价值。
|
|
114
|
+
- 缺乏与同价位纯燃油车或竞品混动车型在长期持有成本、可靠性、保养便利性等方面的直观对比数据。
|
|
115
|
+
- 购车决策过程中的财务考量不够透明和个性化
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## 下载 Office 文档
|
|
119
|
+
|
|
120
|
+
```shell
|
|
121
|
+
(.venv) neo@Mac elastolink % python elastolink-cli.py -o a5a574f7b7d34cfd8a9b564670ef354b
|
|
122
|
+
----- Office 文档列表 -----
|
|
123
|
+
"思维导图":http://elastolink-document.oss-cn-shenzhen.aliyuncs.com/development/aigcsst/25321561854178/2026-03-25/a5a574f7b7d34cfd8a9b564670ef354b/PodcastEnglishLearningTips%28mindmap%29.svg?Expires=1775017938&OSSAccessKeyId=LTAI5tPrqH1c1FVWfJxvrafY&Signature=Nw8czjwh3t53Slm%2Fyt174lhaiN0%3D
|
|
124
|
+
"幻灯片":http://elastolink-document.oss-cn-shenzhen.aliyuncs.com/development/2026-03-25/a5a574f7b7d34cfd8a9b564670ef354b/PodcastEnglishLearningTips_20260325_093221.pptx?Expires=1775017938&OSSAccessKeyId=LTAI5tPrqH1c1FVWfJxvrafY&Signature=L3%2BXDghHtixR%2FLzB1d3RG5%2FSN4M%3D
|
|
125
|
+
"音频文件":http://elastolink-document.oss-cn-shenzhen.aliyuncs.com/development/2026-03-25/a5a574f7b7d34cfd8a9b564670ef354b/audio.mp3?Expires=1775017938&OSSAccessKeyId=LTAI5tPrqH1c1FVWfJxvrafY&Signature=pib7CWZYMRzwpogQSZ90Z8xX8Xc%3D
|
|
126
|
+
"会议纪要":http://elastolink-document.oss-cn-shenzhen.aliyuncs.com/development/aigcsst/25321561854178/2026-03-25/a5a574f7b7d34cfd8a9b564670ef354b/PodcastEnglishLearningTips%28minutes%29.docx?Expires=1775017938&OSSAccessKeyId=LTAI5tPrqH1c1FVWfJxvrafY&Signature=qccOwE2QH6Bjm41AUe73t8GUNxI%3D
|
|
127
|
+
"会议结论":http://elastolink-document.oss-cn-shenzhen.aliyuncs.com/development/aigcsst/25321561854178/2026-03-25/a5a574f7b7d34cfd8a9b564670ef354b/PodcastEnglishLearningTips%28summary%29.docx?Expires=1775017938&OSSAccessKeyId=LTAI5tPrqH1c1FVWfJxvrafY&Signature=isBsxyVG74StY6j0t13z2J9tDcQ%3D
|
|
128
|
+
"鱼骨图":http://elastolink-document.oss-cn-shenzhen.aliyuncs.com/development/aigcsst/25321561854178/2026-03-25/a5a574f7b7d34cfd8a9b564670ef354b/PodcastEnglishLearningTips%28fishbone%29.svg?Expires=1775017938&OSSAccessKeyId=LTAI5tPrqH1c1FVWfJxvrafY&Signature=afeoUqjxU%2BlejmXln41Ok5rFOr0%3D
|
|
129
|
+
"待办事项":http://elastolink-document.oss-cn-shenzhen.aliyuncs.com/development/aigcsst/25321561854178/2026-03-25/a5a574f7b7d34cfd8a9b564670ef354b/PodcastEnglishLearningTips%28todolist%29.docx?Expires=1775017938&OSSAccessKeyId=LTAI5tPrqH1c1FVWfJxvrafY&Signature=bYsh%2BycjFCO45k2R5%2Bze7GOcH3A%3D
|
|
130
|
+
"会议方案":http://elastolink-document.oss-cn-shenzhen.aliyuncs.com/development/aigcsst/25321561854178/2026-03-25/a5a574f7b7d34cfd8a9b564670ef354b/PodcastEnglishLearningTips%28plan%29.docx?Expires=1775017938&OSSAccessKeyId=LTAI5tPrqH1c1FVWfJxvrafY&Signature=%2F87RV%2FBfPOE3QBnma%2Fn%2BSfWck%2F4%3D
|
|
131
|
+
----- 文档下载连接时效 24 小时 -----
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## 查看设备状态
|
|
135
|
+
|
|
136
|
+
```shell
|
|
137
|
+
(.venv) neo@Mac elastolink % python elastolink-cli.py --status
|
|
138
|
+
{'expired': 'xxxxxx', 'status': '激活'}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## 集成 Openclaw 小龙虾
|
|
142
|
+
|
|
143
|
+
```shell
|
|
144
|
+
(.venv) neo@Mac elastolink % python elastolink-cli.py -k sk-02172F38-776D-4F5F-88D3-EAC0F87E445B
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
或者
|
|
149
|
+
|
|
150
|
+
```shell
|
|
151
|
+
|
|
152
|
+
export ELASTOLINK_API_KEY=sk-02172F38-776D-4F5F-88D3-EAC0F87E445B
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
然后让小龙虾查看会议列表,在根据需要阅读会议内容。接下来就可以操作了,例如:
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
小龙虾:请帮我总结2026年第一季度会议中都有哪些重要的代办事项
|
|
160
|
+
小龙虾:帮我分析所有会议发言人,并总结最有价值发言,最后给我一份,员工价值价值评分,再给我制定一个优秀员工激励方案。
|
|
161
|
+
小龙虾:帮我分析会议中的发言时,给我列出,谁在摸鱼?
|
|
162
|
+
小龙虾:2026年2月份,会议中提到的报销费用都有哪些,给我粗略统计一下2月份花了多少钱。
|
|
163
|
+
小龙虾:给我统计一下3月份营销会议中,提到所有各种项目,投入与产出比,输出一份Excel 文档给我。
|
|
164
|
+
小龙虾:这个月面试了多少人?对比一下所有面试者跟我们公司的岗位胜任力模型,最后生成一份 excle 文档,放在我电脑的 D:盘,人力资源文件夹下。
|
|
165
|
+
小龙虾:下载“数字转型会议”的会议纪要,帮我分析一下技术可行性?
|
|
166
|
+
小龙虾:昨天的会议,发言人1是李副总,你认为他的方案可行吗?
|
|
167
|
+
```
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
elastolink-0.0.2.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
|
2
|
+
netkiller/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
netkiller/elastolink.py,sha256=p44JNO7ZnjHYwc33sGceWQ6q-Sf_iJ42doeFBsXE41Q,7789
|
|
4
|
+
elastolink-0.0.2.dist-info/METADATA,sha256=RYM-VqlHoEnmH8HK3KlCYlyuOl1VYB38zpxmQI-GTiw,9674
|
|
5
|
+
elastolink-0.0.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
6
|
+
elastolink-0.0.2.dist-info/entry_points.txt,sha256=LFJ6sd1nL9x7zSPf-cNTufJSwcULsxNEzD40irbLMQg,100
|
|
7
|
+
elastolink-0.0.2.dist-info/top_level.txt,sha256=43lHmF7KzdqgcxA6_yrYmSQOg8YXBGeCRbt7xtHPF-g,10
|
|
8
|
+
elastolink-0.0.2.dist-info/RECORD,,
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Creative Commons Legal Code
|
|
2
|
+
|
|
3
|
+
CC0 1.0 Universal
|
|
4
|
+
|
|
5
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
6
|
+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
7
|
+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
8
|
+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
9
|
+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
10
|
+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
11
|
+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
12
|
+
HEREUNDER.
|
|
13
|
+
|
|
14
|
+
Statement of Purpose
|
|
15
|
+
|
|
16
|
+
The laws of most jurisdictions throughout the world automatically confer
|
|
17
|
+
exclusive Copyright and Related Rights (defined below) upon the creator
|
|
18
|
+
and subsequent owner(s) (each and all, an "owner") of an original work of
|
|
19
|
+
authorship and/or a database (each, a "Work").
|
|
20
|
+
|
|
21
|
+
Certain owners wish to permanently relinquish those rights to a Work for
|
|
22
|
+
the purpose of contributing to a commons of creative, cultural and
|
|
23
|
+
scientific works ("Commons") that the public can reliably and without fear
|
|
24
|
+
of later claims of infringement build upon, modify, incorporate in other
|
|
25
|
+
works, reuse and redistribute as freely as possible in any form whatsoever
|
|
26
|
+
and for any purposes, including without limitation commercial purposes.
|
|
27
|
+
These owners may contribute to the Commons to promote the ideal of a free
|
|
28
|
+
culture and the further production of creative, cultural and scientific
|
|
29
|
+
works, or to gain reputation or greater distribution for their Work in
|
|
30
|
+
part through the use and efforts of others.
|
|
31
|
+
|
|
32
|
+
For these and/or other purposes and motivations, and without any
|
|
33
|
+
expectation of additional consideration or compensation, the person
|
|
34
|
+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
35
|
+
is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
36
|
+
elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
37
|
+
terms, with knowledge of his or her Copyright and Related Rights in the
|
|
38
|
+
Work and the meaning and intended legal effect of CC0 on those rights.
|
|
39
|
+
|
|
40
|
+
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
41
|
+
protected by copyright and related or neighboring rights ("Copyright and
|
|
42
|
+
Related Rights"). Copyright and Related Rights include, but are not
|
|
43
|
+
limited to, the following:
|
|
44
|
+
|
|
45
|
+
i. the right to reproduce, adapt, distribute, perform, display,
|
|
46
|
+
communicate, and translate a Work;
|
|
47
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
48
|
+
iii. publicity and privacy rights pertaining to a person's image or
|
|
49
|
+
likeness depicted in a Work;
|
|
50
|
+
iv. rights protecting against unfair competition in regards to a Work,
|
|
51
|
+
subject to the limitations in paragraph 4(a), below;
|
|
52
|
+
v. rights protecting the extraction, dissemination, use and reuse of data
|
|
53
|
+
in a Work;
|
|
54
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
55
|
+
European Parliament and of the Council of 11 March 1996 on the legal
|
|
56
|
+
protection of databases, and under any national implementation
|
|
57
|
+
thereof, including any amended or successor version of such
|
|
58
|
+
directive); and
|
|
59
|
+
vii. other similar, equivalent or corresponding rights throughout the
|
|
60
|
+
world based on applicable law or treaty, and any national
|
|
61
|
+
implementations thereof.
|
|
62
|
+
|
|
63
|
+
2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
64
|
+
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
65
|
+
irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
66
|
+
Affirmer's Copyright and Related Rights and associated claims and causes
|
|
67
|
+
of action, whether now known or unknown (including existing as well as
|
|
68
|
+
future claims and causes of action), in the Work (i) in all territories
|
|
69
|
+
worldwide, (ii) for the maximum duration provided by applicable law or
|
|
70
|
+
treaty (including future time extensions), (iii) in any current or future
|
|
71
|
+
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
72
|
+
including without limitation commercial, advertising or promotional
|
|
73
|
+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
74
|
+
member of the public at large and to the detriment of Affirmer's heirs and
|
|
75
|
+
successors, fully intending that such Waiver shall not be subject to
|
|
76
|
+
revocation, rescission, cancellation, termination, or any other legal or
|
|
77
|
+
equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
78
|
+
as contemplated by Affirmer's express Statement of Purpose.
|
|
79
|
+
|
|
80
|
+
3. Public License Fallback. Should any part of the Waiver for any reason
|
|
81
|
+
be judged legally invalid or ineffective under applicable law, then the
|
|
82
|
+
Waiver shall be preserved to the maximum extent permitted taking into
|
|
83
|
+
account Affirmer's express Statement of Purpose. In addition, to the
|
|
84
|
+
extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
85
|
+
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
86
|
+
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
87
|
+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
88
|
+
maximum duration provided by applicable law or treaty (including future
|
|
89
|
+
time extensions), (iii) in any current or future medium and for any number
|
|
90
|
+
of copies, and (iv) for any purpose whatsoever, including without
|
|
91
|
+
limitation commercial, advertising or promotional purposes (the
|
|
92
|
+
"License"). The License shall be deemed effective as of the date CC0 was
|
|
93
|
+
applied by Affirmer to the Work. Should any part of the License for any
|
|
94
|
+
reason be judged legally invalid or ineffective under applicable law, such
|
|
95
|
+
partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
96
|
+
of the License, and in such case Affirmer hereby affirms that he or she
|
|
97
|
+
will not (i) exercise any of his or her remaining Copyright and Related
|
|
98
|
+
Rights in the Work or (ii) assert any associated claims and causes of
|
|
99
|
+
action with respect to the Work, in either case contrary to Affirmer's
|
|
100
|
+
express Statement of Purpose.
|
|
101
|
+
|
|
102
|
+
4. Limitations and Disclaimers.
|
|
103
|
+
|
|
104
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
105
|
+
surrendered, licensed or otherwise affected by this document.
|
|
106
|
+
b. Affirmer offers the Work as-is and makes no representations or
|
|
107
|
+
warranties of any kind concerning the Work, express, implied,
|
|
108
|
+
statutory or otherwise, including without limitation warranties of
|
|
109
|
+
title, merchantability, fitness for a particular purpose, non
|
|
110
|
+
infringement, or the absence of latent or other defects, accuracy, or
|
|
111
|
+
the present or absence of errors, whether or not discoverable, all to
|
|
112
|
+
the greatest extent permissible under applicable law.
|
|
113
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
114
|
+
that may apply to the Work or any use thereof, including without
|
|
115
|
+
limitation any person's Copyright and Related Rights in the Work.
|
|
116
|
+
Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
117
|
+
consents, permissions or other rights required for any use of the
|
|
118
|
+
Work.
|
|
119
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
120
|
+
party to this document and has no duty or obligation with respect to
|
|
121
|
+
this CC0 or use of the Work.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
netkiller
|
netkiller/__init__.py
ADDED
|
File without changes
|
netkiller/elastolink.py
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
###################################################
|
|
4
|
+
# Home : https://www.netkiller.cn
|
|
5
|
+
# Author: Neo <netkiller@msn.com>
|
|
6
|
+
# Upgrade: 2026-03-30
|
|
7
|
+
# Description: Elastolink command line interface
|
|
8
|
+
###################################################
|
|
9
|
+
import asyncio
|
|
10
|
+
import httpx
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
import uuid,hashlib
|
|
14
|
+
import glob
|
|
15
|
+
import shutil
|
|
16
|
+
import os,sys,random,argparse
|
|
17
|
+
from datetime import datetime
|
|
18
|
+
from tqdm import tqdm
|
|
19
|
+
from texttable import Texttable
|
|
20
|
+
# import yaml
|
|
21
|
+
except ImportError as err:
|
|
22
|
+
print("ImportError: %s" % (err))
|
|
23
|
+
exit()
|
|
24
|
+
|
|
25
|
+
class Elastolink():
|
|
26
|
+
config = os.path.expanduser("~/.elastolink")
|
|
27
|
+
base_url = os.environ.get('ELASTOLINK_API', 'https://api.ideasprite.com')
|
|
28
|
+
headers = {}
|
|
29
|
+
|
|
30
|
+
classes = []
|
|
31
|
+
labels = {}
|
|
32
|
+
|
|
33
|
+
def __init__(self):
|
|
34
|
+
|
|
35
|
+
self.basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
36
|
+
sys.path.append(self.basedir)
|
|
37
|
+
# print(basedir)
|
|
38
|
+
|
|
39
|
+
self.parser = argparse.ArgumentParser(description='Elastolink Command Line Interface', color=True,
|
|
40
|
+
formatter_class=lambda prog: argparse.HelpFormatter(prog, indent_increment=2,max_help_position=30, width=120))
|
|
41
|
+
self.parser.add_argument('-l','--list', action="store_true", default=False, help='会议列表')
|
|
42
|
+
self.parser.add_argument('-d','--detail', type=str, default=None, help='查看会议内容', metavar="<会议ID>")
|
|
43
|
+
self.parser.add_argument('-m','--markdown', type=str, default=None, help='会议 Markdown 文件', metavar="<会议ID>")
|
|
44
|
+
self.parser.add_argument('-o','--office', default=None, type=str, help='下载 Office 会议文档',metavar="<会议ID>")
|
|
45
|
+
self.parser.add_argument('-s','--search', type=str, default=None, help='会议搜索', metavar="<关键词>")
|
|
46
|
+
self.parser.add_argument('-k', '--key', type=str, default=None, help='设置 API KEY', metavar="<API KEY>")
|
|
47
|
+
self.parser.add_argument('--status', action="store_true", default=False, help='设备状态')
|
|
48
|
+
# self.parser.add_argument('--verbose', action="store_true", default=False, help='过程输出')
|
|
49
|
+
|
|
50
|
+
self.args = self.parser.parse_args()
|
|
51
|
+
|
|
52
|
+
def getenv(self):
|
|
53
|
+
api_key = os.getenv("ELASTOLINK_API_KEY")
|
|
54
|
+
if not api_key:
|
|
55
|
+
try:
|
|
56
|
+
with open(self.config, "r") as file:
|
|
57
|
+
api_key = file.readline()
|
|
58
|
+
if not api_key:
|
|
59
|
+
print(f"请配置 ELASTOLINK_API_KEY 环境变量")
|
|
60
|
+
except Exception as e:
|
|
61
|
+
print(e)
|
|
62
|
+
exit()
|
|
63
|
+
return api_key
|
|
64
|
+
return api_key
|
|
65
|
+
def setenv(self,sk):
|
|
66
|
+
try:
|
|
67
|
+
with open(self.config, "w") as file:
|
|
68
|
+
file.write(sk)
|
|
69
|
+
os.environ["ELASTOLINK_API_KEY"] = sk
|
|
70
|
+
print("操作成功")
|
|
71
|
+
|
|
72
|
+
except Exception as e:
|
|
73
|
+
# log.error(e)
|
|
74
|
+
print("input: ", e)
|
|
75
|
+
exit()
|
|
76
|
+
|
|
77
|
+
async def status(self):
|
|
78
|
+
|
|
79
|
+
try:
|
|
80
|
+
self.headers = {"Authorization": f"Bearer {self.getenv()}"}
|
|
81
|
+
async with httpx.AsyncClient(base_url=self.base_url,headers=self.headers) as client:
|
|
82
|
+
r = await client.get("agent/cli/device/status")
|
|
83
|
+
print(r.json())
|
|
84
|
+
except Exception as e:
|
|
85
|
+
# log.error(e)
|
|
86
|
+
print("status: ",e)
|
|
87
|
+
exit()
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
async def list(self):
|
|
91
|
+
try:
|
|
92
|
+
self.headers = {"Authorization": f"Bearer {self.getenv()}"}
|
|
93
|
+
async with httpx.AsyncClient(base_url=self.base_url, headers=self.headers, timeout=30.0) as client:
|
|
94
|
+
# 用 tqdm 显示加载状态
|
|
95
|
+
# for _ in tqdm(range(1), ncols=20, desc="加载中"):
|
|
96
|
+
r = await client.get("agent/cli/meeting/list")
|
|
97
|
+
data = r.json()
|
|
98
|
+
|
|
99
|
+
if not data:
|
|
100
|
+
print("暂无会议数据")
|
|
101
|
+
return
|
|
102
|
+
|
|
103
|
+
# print(f"\n{'会议ID':<38} {'会议标题':<20} {'会议时长':<8} {'会议语言':<6} {'会议日期':<12}")
|
|
104
|
+
|
|
105
|
+
table = Texttable()
|
|
106
|
+
table.header(["会议ID", "会议标题", "会议时长", "会议语言", "会议日期"])
|
|
107
|
+
table.set_cols_width([38, 20, 10, 8, 12])
|
|
108
|
+
|
|
109
|
+
for item in data:
|
|
110
|
+
meeting_id = item.get("id", "")
|
|
111
|
+
title = item.get("title", "")[:18]
|
|
112
|
+
duration = item.get("duration", "") or "-"
|
|
113
|
+
language = item.get("language", "") or "-"
|
|
114
|
+
ctime_str = item.get("ctime", "")
|
|
115
|
+
ctime = ctime_str[:10] if ctime_str else "-"
|
|
116
|
+
table.add_row([meeting_id, title, duration, language, ctime])
|
|
117
|
+
|
|
118
|
+
print(f"\n{table.draw()}")
|
|
119
|
+
print(f"\n共 {len(data)} 条会议")
|
|
120
|
+
print("-" * 80)
|
|
121
|
+
print(f"您可以使用 elastolink-cli -d <会议ID> 查看会议内容")
|
|
122
|
+
except Exception as e:
|
|
123
|
+
print(f"获取会议列表失败: {e}")
|
|
124
|
+
|
|
125
|
+
async def detail(self, meeting_id: str):
|
|
126
|
+
try:
|
|
127
|
+
self.headers = {"Authorization": f"Bearer {self.getenv()}"}
|
|
128
|
+
async with httpx.AsyncClient(base_url=self.base_url, headers=self.headers, timeout=30.0) as client:
|
|
129
|
+
r = await client.get(f"agent/cli/meeting/detail?id={meeting_id}")
|
|
130
|
+
content = r.text
|
|
131
|
+
|
|
132
|
+
if not content:
|
|
133
|
+
print("暂无会议详情")
|
|
134
|
+
return
|
|
135
|
+
|
|
136
|
+
print(content)
|
|
137
|
+
except Exception as e:
|
|
138
|
+
print(f"获取会议详情失败: {e}")
|
|
139
|
+
|
|
140
|
+
async def markdown(self, meeting_id: str):
|
|
141
|
+
try:
|
|
142
|
+
self.headers = {"Authorization": f"Bearer {self.getenv()}"}
|
|
143
|
+
async with httpx.AsyncClient(base_url=self.base_url, headers=self.headers, timeout=30.0) as client:
|
|
144
|
+
r = await client.get(f"agent/cli/document/markdown?id={meeting_id}")
|
|
145
|
+
content = r.text
|
|
146
|
+
|
|
147
|
+
if not content:
|
|
148
|
+
print("暂无 Markdown 内容")
|
|
149
|
+
return
|
|
150
|
+
|
|
151
|
+
print(content)
|
|
152
|
+
except Exception as e:
|
|
153
|
+
print(f"获取 Markdown 失败: {e}")
|
|
154
|
+
|
|
155
|
+
async def office(self, meeting_id: str):
|
|
156
|
+
try:
|
|
157
|
+
self.headers = {"Authorization": f"Bearer {self.getenv()}"}
|
|
158
|
+
async with httpx.AsyncClient(base_url=self.base_url, headers=self.headers, timeout=30.0) as client:
|
|
159
|
+
r = await client.get(f"agent/cli/document/office?id={meeting_id}")
|
|
160
|
+
content = r.text
|
|
161
|
+
|
|
162
|
+
if not content:
|
|
163
|
+
print("暂无 Office 文档")
|
|
164
|
+
return
|
|
165
|
+
|
|
166
|
+
print(content)
|
|
167
|
+
except Exception as e:
|
|
168
|
+
print(f"获取 Office 文档失败: {e}")
|
|
169
|
+
def search(self,path):
|
|
170
|
+
self.headers = {"Authorization": f"Bearer {self.getenv()}"}
|
|
171
|
+
print("还未开放")
|
|
172
|
+
pass
|
|
173
|
+
|
|
174
|
+
async def main(self):
|
|
175
|
+
# print(self.args)
|
|
176
|
+
if self.args.key :
|
|
177
|
+
self.setenv(self.args.key)
|
|
178
|
+
|
|
179
|
+
if self.args.status :
|
|
180
|
+
await self.status()
|
|
181
|
+
elif self.args.list:
|
|
182
|
+
await self.list()
|
|
183
|
+
elif self.args.detail :
|
|
184
|
+
await self.detail(self.args.detail)
|
|
185
|
+
elif self.args.markdown:
|
|
186
|
+
await self.markdown(self.args.markdown)
|
|
187
|
+
elif self.args.office:
|
|
188
|
+
await self.office(self.args.office)
|
|
189
|
+
elif self.args.search :
|
|
190
|
+
self.search(self.args.search)
|
|
191
|
+
else:
|
|
192
|
+
self.parser.print_help()
|
|
193
|
+
exit()
|
|
194
|
+
|
|
195
|
+
def main():
|
|
196
|
+
try:
|
|
197
|
+
run = Elastolink()
|
|
198
|
+
# run.main()
|
|
199
|
+
asyncio.run(run.main())
|
|
200
|
+
except KeyboardInterrupt as e:
|
|
201
|
+
print(e)
|
|
202
|
+
|
|
203
|
+
if __name__ == "__main__":
|
|
204
|
+
main()
|