ovos-skill-diagnostics 0.0.0__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.
Files changed (37) hide show
  1. ovos-skill-diagnostics-0.0.0/LICENSE +203 -0
  2. ovos-skill-diagnostics-0.0.0/MANIFEST.in +2 -0
  3. ovos-skill-diagnostics-0.0.0/PKG-INFO +38 -0
  4. ovos-skill-diagnostics-0.0.0/README.md +26 -0
  5. ovos-skill-diagnostics-0.0.0/__init__.py +162 -0
  6. ovos-skill-diagnostics-0.0.0/locale/en-us/available_memory.dialog +1 -0
  7. ovos-skill-diagnostics-0.0.0/locale/en-us/cpu_percent.dialog +1 -0
  8. ovos-skill-diagnostics-0.0.0/locale/en-us/current_lang.dialog +1 -0
  9. ovos-skill-diagnostics-0.0.0/locale/en-us/current_memory.dialog +1 -0
  10. ovos-skill-diagnostics-0.0.0/locale/en-us/has_gpu.dialog +1 -0
  11. ovos-skill-diagnostics-0.0.0/locale/en-us/kernel_version.dialog +1 -0
  12. ovos-skill-diagnostics-0.0.0/locale/en-us/no_gpu.dialog +1 -0
  13. ovos-skill-diagnostics-0.0.0/locale/en-us/no_secondary_langs.intent +1 -0
  14. ovos-skill-diagnostics-0.0.0/locale/en-us/primary_lang.dialog +1 -0
  15. ovos-skill-diagnostics-0.0.0/locale/en-us/query_cpu_usage.intent +7 -0
  16. ovos-skill-diagnostics-0.0.0/locale/en-us/query_extra_langs.intent +5 -0
  17. ovos-skill-diagnostics-0.0.0/locale/en-us/query_gpu.intent +4 -0
  18. ovos-skill-diagnostics-0.0.0/locale/en-us/query_kernel_version.intent +4 -0
  19. ovos-skill-diagnostics-0.0.0/locale/en-us/query_langs.intent +7 -0
  20. ovos-skill-diagnostics-0.0.0/locale/en-us/query_memory_usage.intent +6 -0
  21. ovos-skill-diagnostics-0.0.0/locale/en-us/query_ovos_location.intent +4 -0
  22. ovos-skill-diagnostics-0.0.0/locale/en-us/query_primary_lang.intent +8 -0
  23. ovos-skill-diagnostics-0.0.0/locale/en-us/query_user_lang.intent +2 -0
  24. ovos-skill-diagnostics-0.0.0/locale/en-us/query_user_location.intent +4 -0
  25. ovos-skill-diagnostics-0.0.0/locale/en-us/secondary_langs.dialog +1 -0
  26. ovos-skill-diagnostics-0.0.0/locale/en-us/system_location.dialog +1 -0
  27. ovos-skill-diagnostics-0.0.0/locale/en-us/user_location.dialog +1 -0
  28. ovos-skill-diagnostics-0.0.0/ovos_skill_diagnostics.egg-info/PKG-INFO +38 -0
  29. ovos-skill-diagnostics-0.0.0/ovos_skill_diagnostics.egg-info/SOURCES.txt +35 -0
  30. ovos-skill-diagnostics-0.0.0/ovos_skill_diagnostics.egg-info/dependency_links.txt +1 -0
  31. ovos-skill-diagnostics-0.0.0/ovos_skill_diagnostics.egg-info/entry_points.txt +2 -0
  32. ovos-skill-diagnostics-0.0.0/ovos_skill_diagnostics.egg-info/requires.txt +2 -0
  33. ovos-skill-diagnostics-0.0.0/ovos_skill_diagnostics.egg-info/top_level.txt +1 -0
  34. ovos-skill-diagnostics-0.0.0/requirements.txt +2 -0
  35. ovos-skill-diagnostics-0.0.0/setup.cfg +4 -0
  36. ovos-skill-diagnostics-0.0.0/setup.py +92 -0
  37. ovos-skill-diagnostics-0.0.0/version.py +6 -0
@@ -0,0 +1,203 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2024 Casimiro Ferreira
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
203
+
@@ -0,0 +1,2 @@
1
+ recursive-include locale *
2
+ include *.txt
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.1
2
+ Name: ovos-skill-diagnostics
3
+ Version: 0.0.0
4
+ Summary: OVOS diagnostics skill
5
+ Home-page: https://github.com/OpenVoiceOS/ovos-skill-diagnostics
6
+ Author: OpenVoiceOS
7
+ Author-email: jarbasai@mailfence.com
8
+ License: Apache-2.0
9
+ Keywords: ovos skill plugin
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+
13
+ # <img src='https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/info-circle.svg' card_color='#22a7f0' width='50' height='50' style='vertical-align:bottom'/> System Diagnostics
14
+ Retrieve system information such as CPU, memory, and language settings.
15
+
16
+ ## About
17
+ The **System Diagnostics Skill** provides various system metrics, including kernel version, CPU and memory usage, GPU availability, and language settings. Users can query these details via voice commands.
18
+
19
+ ## Examples
20
+ * "What is your kernel version?"
21
+ * "Do you have a GPU?"
22
+ * "What is your CPU usage?"
23
+ * "How much memory are you using?"
24
+ * "What language are you using?"
25
+
26
+ ## Credits
27
+ OpenVoiceOS (@OpenVoiceOS)
28
+
29
+ ## Category
30
+ **System**
31
+
32
+ ## Tags
33
+ #system
34
+ #diagnostics
35
+ #hardware
36
+ #performance
37
+ #language
38
+
@@ -0,0 +1,26 @@
1
+ # <img src='https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/info-circle.svg' card_color='#22a7f0' width='50' height='50' style='vertical-align:bottom'/> System Diagnostics
2
+ Retrieve system information such as CPU, memory, and language settings.
3
+
4
+ ## About
5
+ The **System Diagnostics Skill** provides various system metrics, including kernel version, CPU and memory usage, GPU availability, and language settings. Users can query these details via voice commands.
6
+
7
+ ## Examples
8
+ * "What is your kernel version?"
9
+ * "Do you have a GPU?"
10
+ * "What is your CPU usage?"
11
+ * "How much memory are you using?"
12
+ * "What language are you using?"
13
+
14
+ ## Credits
15
+ OpenVoiceOS (@OpenVoiceOS)
16
+
17
+ ## Category
18
+ **System**
19
+
20
+ ## Tags
21
+ #system
22
+ #diagnostics
23
+ #hardware
24
+ #performance
25
+ #language
26
+
@@ -0,0 +1,162 @@
1
+ import platform
2
+ import subprocess
3
+
4
+ import psutil
5
+ from ovos_config import Configuration
6
+ from ovos_lang_parser import pronounce_lang
7
+ from ovos_number_parser import pronounce_number
8
+
9
+ from ovos_workshop.decorators import intent_handler
10
+ from ovos_workshop.skills import OVOSSkill
11
+
12
+
13
+ class SystemDiagnosticsSkill(OVOSSkill):
14
+
15
+ @intent_handler("query_kernel_version.intent")
16
+ def handle_get_os(self, message):
17
+ kernel = platform.release().split("-")[0] # simplify version number
18
+ self.speak_dialog("kernel_version",
19
+ {"os_info": f"{platform.system()} {kernel}"})
20
+
21
+ @intent_handler("query_gpu.intent")
22
+ def handle_get_gpu(self, message):
23
+ try:
24
+ import torch
25
+ gpu = torch.cuda.is_available()
26
+ except ImportError:
27
+ gpu = has_nvidia_gpu()
28
+ if gpu:
29
+ self.speak_dialog("has_gpu")
30
+ else:
31
+ self.speak_dialog("no_gpu")
32
+
33
+ @intent_handler("query_cpu_usage.intent")
34
+ def handle_get_cpu(self, message):
35
+ self.speak_dialog("cpu_percent",
36
+ {"cpu": pronounce_number(psutil.cpu_percent(), lang=self.lang)})
37
+
38
+ @intent_handler("query_memory_usage.intent")
39
+ def handle_get_memory(self, message):
40
+ m = psutil.virtual_memory()
41
+ memory = pronounce_number(m.percent, lang=self.lang)
42
+ self.speak_dialog("current_memory", {"memory": memory})
43
+ memory = nice_bytes(m.available)
44
+ total = nice_bytes(m.total)
45
+ self.speak_dialog("available_memory",
46
+ {"memory": memory, "total": total})
47
+
48
+ @intent_handler("query_user_location.intent")
49
+ def handle_user_location(self, message):
50
+ location = self.location_pretty
51
+ self.speak_dialog("user_location", {"location": location})
52
+
53
+ @intent_handler("query_user_location.intent")
54
+ def handle_default_location(self, message):
55
+ loc = Configuration().get("location", {}).get("city", {}).get("name")
56
+ self.speak_dialog("system_location", {"location": loc})
57
+
58
+ @intent_handler("query_user_lang.intent")
59
+ def handle_what_lang_am_i_speaking(self, message):
60
+ lang = pronounce_lang(self.lang, self.lang)
61
+ self.speak_dialog("current_lang", {"lang": lang})
62
+
63
+ @intent_handler("query_primary_lang.intent")
64
+ def handle_primary_lang(self, message):
65
+ lang = pronounce_lang(self.core_lang, self.lang)
66
+ self.speak_dialog("primary_lang", {"lang": lang})
67
+
68
+ @intent_handler("query_extra_langs.intent")
69
+ def handle_secondary_langs(self, message):
70
+ if self.secondary_langs:
71
+ langs = ', '.join([pronounce_lang(l, self.lang) for l in self.secondary_langs])
72
+ self.speak_dialog("secondary_langs", {"langs": langs})
73
+ else:
74
+ self.speak_dialog("no_secondary_langs")
75
+
76
+ @intent_handler("query_langs.intent")
77
+ def handle_get_languages(self, message):
78
+ if self.core_lang != self.lang:
79
+ self.handle_what_lang_am_i_speaking(message)
80
+ self.handle_primary_lang(message)
81
+ if self.secondary_langs:
82
+ self.handle_secondary_langs(message)
83
+
84
+ ######################
85
+ # TODO - query via bus
86
+ def handle_list_skills(self, message):
87
+ # TODO - placeholder
88
+ skills = [self.skill_id]
89
+ self.speak(f"I have the following skills installed: {', '.join(skills)}")
90
+
91
+ def handle_list_tts(self, message):
92
+ # TODO - placeholder
93
+ plugins = []
94
+ self.speak(f"I have the following text to speech plugins installed: {', '.join(plugins)}")
95
+
96
+ def handle_list_stt(self, message):
97
+ # TODO - placeholder
98
+ plugins = []
99
+ self.speak(f"I have the following speech to text plugins installed: {', '.join(plugins)}")
100
+
101
+ def handle_list_vad(self, message):
102
+ # TODO - placeholder
103
+ plugins = []
104
+ self.speak(f"I have the following voice activity detection plugins installed: {', '.join(plugins)}")
105
+
106
+
107
+ def has_nvidia_gpu():
108
+ try:
109
+ subprocess.check_output('nvidia-smi')
110
+ return True
111
+ except Exception: # this command not being found can raise quite a few different errors depending on the configuration
112
+ pass
113
+ return False
114
+
115
+
116
+ def nice_bytes(number, speech=True, binary=True, gnu=False):
117
+ """
118
+ turns a number of bytes into a string using appropriate units
119
+ prefixes - https://en.wikipedia.org/wiki/Binary_prefix
120
+ spoken binary units - https://en.wikipedia.org/wiki/Kibibyte
121
+ implementation - http://stackoverflow.com/a/1094933/2444609
122
+ :param number: number of bytes (int)
123
+ :param speech: spoken form (True) or short units (False)
124
+ :param binary: 1 kilobyte = 1024 bytes (True) or 1 kilobyte = 1000 bytes (False)
125
+ :param gnu: say only order of magnitude (bool) - 100 Kilo (True) or 100 Kilobytes (False)
126
+ :return: nice bytes (str)
127
+ """
128
+
129
+ if speech and gnu:
130
+ default_units = ['Bytes', 'Kilo', 'Mega', 'Giga', 'Tera', 'Peta',
131
+ 'Exa', 'Zetta', 'Yotta']
132
+ elif speech and binary:
133
+ default_units = ['Bytes', 'Kibibytes', 'Mebibytes', 'Gibibytes',
134
+ 'Tebibytes', 'Pebibytes', 'Exbibytes', 'Zebibytes',
135
+ 'Yobibytes']
136
+ elif speech:
137
+ default_units = ['Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes',
138
+ 'Terabytes', 'Petabytes', 'Exabytes', 'Zettabytes',
139
+ 'Yottabytes']
140
+ elif gnu:
141
+ default_units = ['B', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']
142
+ elif binary:
143
+ default_units = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB',
144
+ 'YiB']
145
+ else:
146
+ default_units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
147
+
148
+ units = default_units
149
+
150
+ n = 1024 if binary else 1000
151
+
152
+ for unit in units[:-1]:
153
+ if abs(number) < n:
154
+ if number == 1 and speech and not gnu:
155
+ # strip final "s"
156
+ unit = unit[:-1]
157
+ return "%3.1f %s" % (number, unit)
158
+ number /= n
159
+ return "%.1f %s" % (number, units[-1])
160
+
161
+
162
+
@@ -0,0 +1 @@
1
+ {memory} available out of {total}
@@ -0,0 +1 @@
1
+ I am using {cpu} per cent of my CPU
@@ -0,0 +1 @@
1
+ We are currently speaking {lang}
@@ -0,0 +1 @@
1
+ Current memory usage is {memory} percent
@@ -0,0 +1 @@
1
+ yes I have a G P U
@@ -0,0 +1 @@
1
+ I am running on {os_info}
@@ -0,0 +1 @@
1
+ No, I don't have a G P U
@@ -0,0 +1 @@
1
+ I don't speak any extra languages
@@ -0,0 +1 @@
1
+ My primary language is {lang}
@@ -0,0 +1,7 @@
1
+ what is your cpu usage
2
+ tell me your cpu usage
3
+ how much cpu are you using
4
+ how much processor is in use
5
+ current cpu load
6
+ what is the cpu load
7
+ cpu diagnostics
@@ -0,0 +1,5 @@
1
+ what other languages do you have
2
+ what are your additional languages
3
+ which extra languages are you using
4
+ do you have secondary languages
5
+ tell me your extra languages
@@ -0,0 +1,4 @@
1
+ do you have a gpu
2
+ is there a gpu in your system
3
+ are you using a gpu
4
+ does your system have a gpu
@@ -0,0 +1,4 @@
1
+ what is your kernel version
2
+ tell me your kernel version
3
+ what kernel version are you using
4
+ which kernel do you have
@@ -0,0 +1,7 @@
1
+ what languages are you using
2
+ tell me all your languages
3
+ which languages are available
4
+ what are your system languages
5
+ list (your|supported|available|) languages
6
+ available languages
7
+ (what|which) languages can you (speak|understand)
@@ -0,0 +1,6 @@
1
+ what is your memory usage
2
+ how much ram are you using
3
+ tell me your memory status
4
+ what's your available memory
5
+ current memory usage
6
+ memory diagnostics
@@ -0,0 +1,4 @@
1
+ where are you
2
+ tell me your location
3
+ what is your current location
4
+ what's your location
@@ -0,0 +1,8 @@
1
+ what is your primary language
2
+ what is your main language
3
+ tell me your core language
4
+ which language is your default
5
+ what language are you using
6
+ which language are you set to
7
+ what's your system language
8
+ tell me your language
@@ -0,0 +1,2 @@
1
+ (which|what) language am I (speaking|using)
2
+ (which|what) language are we (speaking|using)
@@ -0,0 +1,4 @@
1
+ where am i
2
+ tell me my location
3
+ what is my current location
4
+ what's my location
@@ -0,0 +1 @@
1
+ I can also speak {langs}
@@ -0,0 +1 @@
1
+ My location is {location}
@@ -0,0 +1 @@
1
+ Your location is {location}
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.1
2
+ Name: ovos-skill-diagnostics
3
+ Version: 0.0.0
4
+ Summary: OVOS diagnostics skill
5
+ Home-page: https://github.com/OpenVoiceOS/ovos-skill-diagnostics
6
+ Author: OpenVoiceOS
7
+ Author-email: jarbasai@mailfence.com
8
+ License: Apache-2.0
9
+ Keywords: ovos skill plugin
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+
13
+ # <img src='https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/info-circle.svg' card_color='#22a7f0' width='50' height='50' style='vertical-align:bottom'/> System Diagnostics
14
+ Retrieve system information such as CPU, memory, and language settings.
15
+
16
+ ## About
17
+ The **System Diagnostics Skill** provides various system metrics, including kernel version, CPU and memory usage, GPU availability, and language settings. Users can query these details via voice commands.
18
+
19
+ ## Examples
20
+ * "What is your kernel version?"
21
+ * "Do you have a GPU?"
22
+ * "What is your CPU usage?"
23
+ * "How much memory are you using?"
24
+ * "What language are you using?"
25
+
26
+ ## Credits
27
+ OpenVoiceOS (@OpenVoiceOS)
28
+
29
+ ## Category
30
+ **System**
31
+
32
+ ## Tags
33
+ #system
34
+ #diagnostics
35
+ #hardware
36
+ #performance
37
+ #language
38
+
@@ -0,0 +1,35 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ __init__.py
5
+ requirements.txt
6
+ setup.py
7
+ version.py
8
+ locale/en-us/available_memory.dialog
9
+ locale/en-us/cpu_percent.dialog
10
+ locale/en-us/current_lang.dialog
11
+ locale/en-us/current_memory.dialog
12
+ locale/en-us/has_gpu.dialog
13
+ locale/en-us/kernel_version.dialog
14
+ locale/en-us/no_gpu.dialog
15
+ locale/en-us/no_secondary_langs.intent
16
+ locale/en-us/primary_lang.dialog
17
+ locale/en-us/query_cpu_usage.intent
18
+ locale/en-us/query_extra_langs.intent
19
+ locale/en-us/query_gpu.intent
20
+ locale/en-us/query_kernel_version.intent
21
+ locale/en-us/query_langs.intent
22
+ locale/en-us/query_memory_usage.intent
23
+ locale/en-us/query_ovos_location.intent
24
+ locale/en-us/query_primary_lang.intent
25
+ locale/en-us/query_user_lang.intent
26
+ locale/en-us/query_user_location.intent
27
+ locale/en-us/secondary_langs.dialog
28
+ locale/en-us/system_location.dialog
29
+ locale/en-us/user_location.dialog
30
+ ovos_skill_diagnostics.egg-info/PKG-INFO
31
+ ovos_skill_diagnostics.egg-info/SOURCES.txt
32
+ ovos_skill_diagnostics.egg-info/dependency_links.txt
33
+ ovos_skill_diagnostics.egg-info/entry_points.txt
34
+ ovos_skill_diagnostics.egg-info/requires.txt
35
+ ovos_skill_diagnostics.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [ovos.plugin.skill]
2
+ ovos-skill-diagnostics.openvoiceos = ovos_skill_diagnostics:SystemDiagnosticsSkill
@@ -0,0 +1,2 @@
1
+ ovos_workshop>=0.0.12
2
+ ovos-lang-parser
@@ -0,0 +1 @@
1
+ ovos_skill_diagnostics
@@ -0,0 +1,2 @@
1
+ ovos_workshop>=0.0.12
2
+ ovos-lang-parser
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ from os import path, walk, environ
4
+ from os.path import abspath, dirname, join, isfile
5
+
6
+ from setuptools import setup
7
+
8
+ URL = "https://github.com/OpenVoiceOS/ovos-skill-diagnostics"
9
+ SKILL_CLAZZ = "SystemDiagnosticsSkill" # needs to match __init__.py class name
10
+ PYPI_NAME = "ovos-skill-diagnostics" # pip install PYPI_NAME
11
+
12
+ # below derived from github url to ensure standard skill_id
13
+ SKILL_AUTHOR, SKILL_NAME = URL.split(".com/")[-1].split("/")
14
+ SKILL_PKG = SKILL_NAME.lower().replace('-', '_')
15
+ PLUGIN_ENTRY_POINT = f'{SKILL_NAME.lower()}.{SKILL_AUTHOR.lower()}={SKILL_PKG}:{SKILL_CLAZZ}'
16
+
17
+
18
+ def find_resource_files():
19
+ resource_base_dirs = ("locale",)
20
+ base_dir = path.dirname(__file__)
21
+ package_data = ["*.json", "*.wav"]
22
+ for res in resource_base_dirs:
23
+ if path.isdir(path.join(base_dir, res)):
24
+ for (directory, _, files) in walk(path.join(base_dir, res)):
25
+ if files:
26
+ package_data.append(
27
+ path.join(directory.replace(base_dir, "").lstrip('/'),
28
+ '*'))
29
+ return package_data
30
+
31
+
32
+ with open(path.join(path.abspath(path.dirname(__file__)), "README.md"), "r") as f:
33
+ long_description = f.read()
34
+
35
+
36
+ def get_version():
37
+ """ Find the version of this skill"""
38
+ version_file = os.path.join(os.path.dirname(__file__), 'version.py')
39
+ major, minor, build, alpha = (None, None, None, None)
40
+ with open(version_file) as f:
41
+ for line in f:
42
+ if 'VERSION_MAJOR' in line:
43
+ major = line.split('=')[1].strip()
44
+ elif 'VERSION_MINOR' in line:
45
+ minor = line.split('=')[1].strip()
46
+ elif 'VERSION_BUILD' in line:
47
+ build = line.split('=')[1].strip()
48
+ elif 'VERSION_ALPHA' in line:
49
+ alpha = line.split('=')[1].strip()
50
+
51
+ if ((major and minor and build and alpha) or
52
+ '# END_VERSION_BLOCK' in line):
53
+ break
54
+ version = f"{major}.{minor}.{build}"
55
+ if int(alpha):
56
+ version += f"a{alpha}"
57
+ return version
58
+
59
+
60
+ def get_requirements(requirements_filename: str = "requirements.txt"):
61
+ requirements_file = join(abspath(dirname(__file__)), requirements_filename)
62
+ if isfile(requirements_file):
63
+ with open(requirements_file, 'r', encoding='utf-8') as r:
64
+ requirements = r.readlines()
65
+ requirements = [r.strip() for r in requirements
66
+ if r.strip() and not r.strip().startswith("#")]
67
+ if 'MYCROFT_LOOSE_REQUIREMENTS' in environ:
68
+ print('USING LOOSE REQUIREMENTS!')
69
+ requirements = [r.replace('==', '>=').replace('~=', '>=')
70
+ for r in requirements]
71
+ return requirements
72
+ return []
73
+
74
+
75
+ setup(
76
+ name=PYPI_NAME,
77
+ version=get_version(),
78
+ long_description=long_description,
79
+ long_description_content_type="text/markdown",
80
+ url=URL,
81
+ author=SKILL_AUTHOR,
82
+ description='OVOS diagnostics skill',
83
+ author_email='jarbasai@mailfence.com',
84
+ license='Apache-2.0',
85
+ package_dir={SKILL_PKG: ""},
86
+ package_data={SKILL_PKG: find_resource_files()},
87
+ packages=[SKILL_PKG],
88
+ include_package_data=True,
89
+ install_requires=get_requirements("requirements.txt"),
90
+ keywords='ovos skill plugin',
91
+ entry_points={'ovos.plugin.skill': PLUGIN_ENTRY_POINT}
92
+ )
@@ -0,0 +1,6 @@
1
+ # START_VERSION_BLOCK
2
+ VERSION_MAJOR = 0
3
+ VERSION_MINOR = 0
4
+ VERSION_BUILD = 0
5
+ VERSION_ALPHA = 0
6
+ # END_VERSION_BLOCK