pumaguard 20.post235__py3-none-any.whl → 20.post241__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.
pumaguard/presets.py CHANGED
@@ -145,7 +145,9 @@ class Preset:
145
145
  self.model_function_name = "xception"
146
146
  self.model_version = "undefined"
147
147
  self.play_sound = True
148
+ self.volume = 80 # Volume level 0-100 for ALSA playback
148
149
  self.print_download_progress = True
150
+ self.camera_url = "" # URL for external camera web interface
149
151
  self.no_lion_directories: list[str] = []
150
152
  self.validation_no_lion_directories: list[str] = []
151
153
  self.with_augmentation = False
@@ -228,6 +230,7 @@ class Preset:
228
230
  self.deterrent_sound_file = settings.get(
229
231
  "deterrent-sound-file", "cougar_call.mp3"
230
232
  )
233
+ self.volume = settings.get("volume", 80)
231
234
  self.notebook_number = settings.get("notebook", 1)
232
235
  self.epochs = settings.get("epochs", 1)
233
236
  dimensions = settings.get("image-dimensions", [0, 0])
@@ -288,9 +291,11 @@ class Preset:
288
291
  "file-stabilization-extra-wait", 0
289
292
  )
290
293
  self.play_sound = settings.get("play-sound", True)
294
+ self.volume = settings.get("volume", 80)
291
295
  self.print_download_progress = settings.get(
292
296
  "print-download-progress", True
293
297
  )
298
+ self.camera_url = settings.get("camera-url", "")
294
299
 
295
300
  def save(self):
296
301
  """
@@ -318,6 +323,8 @@ class Preset:
318
323
  "sound-path": self.sound_path,
319
324
  "deterrent-sound-file": self.deterrent_sound_file,
320
325
  "play-sound": self.play_sound,
326
+ "volume": self.volume,
327
+ "camera-url": self.camera_url,
321
328
  "alpha": self.alpha,
322
329
  "batch-size": self.batch_size,
323
330
  "color-mode": self.color_mode,
@@ -864,3 +871,21 @@ class Preset:
864
871
  if not isinstance(play_sound, bool):
865
872
  raise TypeError("play_sound needs to be a bool")
866
873
  self._play_sound = play_sound
874
+
875
+ @property
876
+ def volume(self) -> int:
877
+ """
878
+ Get volume level (0-100).
879
+ """
880
+ return self._volume
881
+
882
+ @volume.setter
883
+ def volume(self, volume: int):
884
+ """
885
+ Set volume level (0-100).
886
+ """
887
+ if not isinstance(volume, int):
888
+ raise TypeError("volume needs to be an int")
889
+ if volume < 0 or volume > 100:
890
+ raise ValueError("volume must be between 0 and 100")
891
+ self._volume = volume
@@ -1587,6 +1587,11 @@ cross_file
1587
1587
  flutter_plugin_android_lifecycle
1588
1588
  shared_preferences_android
1589
1589
  shared_preferences_foundation
1590
+ url_launcher_android
1591
+ url_launcher_ios
1592
+ url_launcher_linux
1593
+ url_launcher_macos
1594
+ url_launcher_windows
1590
1595
 
1591
1596
  Copyright 2013 The Flutter Authors
1592
1597
 
@@ -5187,6 +5192,7 @@ found in the LICENSE file.
5187
5192
  --------------------------------------------------------------------------------
5188
5193
  flutter
5189
5194
  tonic
5195
+ url_launcher_web
5190
5196
 
5191
5197
  Copyright 2013 The Flutter Authors. All rights reserved.
5192
5198
 
@@ -5225,6 +5231,8 @@ shared_preferences_linux
5225
5231
  shared_preferences_platform_interface
5226
5232
  shared_preferences_web
5227
5233
  shared_preferences_windows
5234
+ url_launcher
5235
+ url_launcher_platform_interface
5228
5236
  xdg_directories
5229
5237
 
5230
5238
  Copyright 2013 The Flutter Authors. All rights reserved.
@@ -24874,6 +24882,211 @@ distributed under the License is distributed on an "AS IS" BASIS,
24874
24882
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
24875
24883
  implied. See the License for the specific language governing
24876
24884
  permissions and limitations under the License.
24885
+ --------------------------------------------------------------------------------
24886
+ platform_detect
24887
+
24888
+ Apache License
24889
+ Version 2.0, January 2004
24890
+ http://www.apache.org/licenses/
24891
+
24892
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
24893
+
24894
+ 1. Definitions.
24895
+
24896
+ "License" shall mean the terms and conditions for use, reproduction,
24897
+ and distribution as defined by Sections 1 through 9 of this document.
24898
+
24899
+ "Licensor" shall mean the copyright owner or entity authorized by
24900
+ the copyright owner that is granting the License.
24901
+
24902
+ "Legal Entity" shall mean the union of the acting entity and all
24903
+ other entities that control, are controlled by, or are under common
24904
+ control with that entity. For the purposes of this definition,
24905
+ "control" means (i) the power, direct or indirect, to cause the
24906
+ direction or management of such entity, whether by contract or
24907
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
24908
+ outstanding shares, or (iii) beneficial ownership of such entity.
24909
+
24910
+ "You" (or "Your") shall mean an individual or Legal Entity
24911
+ exercising permissions granted by this License.
24912
+
24913
+ "Source" form shall mean the preferred form for making modifications,
24914
+ including but not limited to software source code, documentation
24915
+ source, and configuration files.
24916
+
24917
+ "Object" form shall mean any form resulting from mechanical
24918
+ transformation or translation of a Source form, including but
24919
+ not limited to compiled object code, generated documentation,
24920
+ and conversions to other media types.
24921
+
24922
+ "Work" shall mean the work of authorship, whether in Source or
24923
+ Object form, made available under the License, as indicated by a
24924
+ copyright notice that is included in or attached to the work
24925
+ (an example is provided in the Appendix below).
24926
+
24927
+ "Derivative Works" shall mean any work, whether in Source or Object
24928
+ form, that is based on (or derived from) the Work and for which the
24929
+ editorial revisions, annotations, elaborations, or other modifications
24930
+ represent, as a whole, an original work of authorship. For the purposes
24931
+ of this License, Derivative Works shall not include works that remain
24932
+ separable from, or merely link (or bind by name) to the interfaces of,
24933
+ the Work and Derivative Works thereof.
24934
+
24935
+ "Contribution" shall mean any work of authorship, including
24936
+ the original version of the Work and any modifications or additions
24937
+ to that Work or Derivative Works thereof, that is intentionally
24938
+ submitted to Licensor for inclusion in the Work by the copyright owner
24939
+ or by an individual or Legal Entity authorized to submit on behalf of
24940
+ the copyright owner. For the purposes of this definition, "submitted"
24941
+ means any form of electronic, verbal, or written communication sent
24942
+ to the Licensor or its representatives, including but not limited to
24943
+ communication on electronic mailing lists, source code control systems,
24944
+ and issue tracking systems that are managed by, or on behalf of, the
24945
+ Licensor for the purpose of discussing and improving the Work, but
24946
+ excluding communication that is conspicuously marked or otherwise
24947
+ designated in writing by the copyright owner as "Not a Contribution."
24948
+
24949
+ "Contributor" shall mean Licensor and any individual or Legal Entity
24950
+ on behalf of whom a Contribution has been received by Licensor and
24951
+ subsequently incorporated within the Work.
24952
+
24953
+ 2. Grant of Copyright License. Subject to the terms and conditions of
24954
+ this License, each Contributor hereby grants to You a perpetual,
24955
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
24956
+ copyright license to reproduce, prepare Derivative Works of,
24957
+ publicly display, publicly perform, sublicense, and distribute the
24958
+ Work and such Derivative Works in Source or Object form.
24959
+
24960
+ 3. Grant of Patent License. Subject to the terms and conditions of
24961
+ this License, each Contributor hereby grants to You a perpetual,
24962
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
24963
+ (except as stated in this section) patent license to make, have made,
24964
+ use, offer to sell, sell, import, and otherwise transfer the Work,
24965
+ where such license applies only to those patent claims licensable
24966
+ by such Contributor that are necessarily infringed by their
24967
+ Contribution(s) alone or by combination of their Contribution(s)
24968
+ with the Work to which such Contribution(s) was submitted. If You
24969
+ institute patent litigation against any entity (including a
24970
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
24971
+ or a Contribution incorporated within the Work constitutes direct
24972
+ or contributory patent infringement, then any patent licenses
24973
+ granted to You under this License for that Work shall terminate
24974
+ as of the date such litigation is filed.
24975
+
24976
+ 4. Redistribution. You may reproduce and distribute copies of the
24977
+ Work or Derivative Works thereof in any medium, with or without
24978
+ modifications, and in Source or Object form, provided that You
24979
+ meet the following conditions:
24980
+
24981
+ (a) You must give any other recipients of the Work or
24982
+ Derivative Works a copy of this License; and
24983
+
24984
+ (b) You must cause any modified files to carry prominent notices
24985
+ stating that You changed the files; and
24986
+
24987
+ (c) You must retain, in the Source form of any Derivative Works
24988
+ that You distribute, all copyright, patent, trademark, and
24989
+ attribution notices from the Source form of the Work,
24990
+ excluding those notices that do not pertain to any part of
24991
+ the Derivative Works; and
24992
+
24993
+ (d) If the Work includes a "NOTICE" text file as part of its
24994
+ distribution, then any Derivative Works that You distribute must
24995
+ include a readable copy of the attribution notices contained
24996
+ within such NOTICE file, excluding those notices that do not
24997
+ pertain to any part of the Derivative Works, in at least one
24998
+ of the following places: within a NOTICE text file distributed
24999
+ as part of the Derivative Works; within the Source form or
25000
+ documentation, if provided along with the Derivative Works; or,
25001
+ within a display generated by the Derivative Works, if and
25002
+ wherever such third-party notices normally appear. The contents
25003
+ of the NOTICE file are for informational purposes only and
25004
+ do not modify the License. You may add Your own attribution
25005
+ notices within Derivative Works that You distribute, alongside
25006
+ or as an addendum to the NOTICE text from the Work, provided
25007
+ that such additional attribution notices cannot be construed
25008
+ as modifying the License.
25009
+
25010
+ You may add Your own copyright statement to Your modifications and
25011
+ may provide additional or different license terms and conditions
25012
+ for use, reproduction, or distribution of Your modifications, or
25013
+ for any such Derivative Works as a whole, provided Your use,
25014
+ reproduction, and distribution of the Work otherwise complies with
25015
+ the conditions stated in this License.
25016
+
25017
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
25018
+ any Contribution intentionally submitted for inclusion in the Work
25019
+ by You to the Licensor shall be under the terms and conditions of
25020
+ this License, without any additional terms or conditions.
25021
+ Notwithstanding the above, nothing herein shall supersede or modify
25022
+ the terms of any separate license agreement you may have executed
25023
+ with Licensor regarding such Contributions.
25024
+
25025
+ 6. Trademarks. This License does not grant permission to use the trade
25026
+ names, trademarks, service marks, or product names of the Licensor,
25027
+ except as required for reasonable and customary use in describing the
25028
+ origin of the Work and reproducing the content of the NOTICE file.
25029
+
25030
+ 7. Disclaimer of Warranty. Unless required by applicable law or
25031
+ agreed to in writing, Licensor provides the Work (and each
25032
+ Contributor provides its Contributions) on an "AS IS" BASIS,
25033
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
25034
+ implied, including, without limitation, any warranties or conditions
25035
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
25036
+ PARTICULAR PURPOSE. You are solely responsible for determining the
25037
+ appropriateness of using or redistributing the Work and assume any
25038
+ risks associated with Your exercise of permissions under this License.
25039
+
25040
+ 8. Limitation of Liability. In no event and under no legal theory,
25041
+ whether in tort (including negligence), contract, or otherwise,
25042
+ unless required by applicable law (such as deliberate and grossly
25043
+ negligent acts) or agreed to in writing, shall any Contributor be
25044
+ liable to You for damages, including any direct, indirect, special,
25045
+ incidental, or consequential damages of any character arising as a
25046
+ result of this License or out of the use or inability to use the
25047
+ Work (including but not limited to damages for loss of goodwill,
25048
+ work stoppage, computer failure or malfunction, or any and all
25049
+ other commercial damages or losses), even if such Contributor
25050
+ has been advised of the possibility of such damages.
25051
+
25052
+ 9. Accepting Warranty or Additional Liability. While redistributing
25053
+ the Work or Derivative Works thereof, You may choose to offer,
25054
+ and charge a fee for, acceptance of support, warranty, indemnity,
25055
+ or other liability obligations and/or rights consistent with this
25056
+ License. However, in accepting such obligations, You may act only
25057
+ on Your own behalf and on Your sole responsibility, not on behalf
25058
+ of any other Contributor, and only if You agree to indemnify,
25059
+ defend, and hold each Contributor harmless for any liability
25060
+ incurred by, or claims asserted against, such Contributor by reason
25061
+ of your accepting any such warranty or additional liability.
25062
+
25063
+ END OF TERMS AND CONDITIONS
25064
+
25065
+ APPENDIX: How to apply the Apache License to your work.
25066
+
25067
+ To apply the Apache License to your work, attach the following
25068
+ boilerplate notice, with the fields enclosed by brackets "[]"
25069
+ replaced with your own identifying information. (Don't include
25070
+ the brackets!) The text should be enclosed in the appropriate
25071
+ comment syntax for the file format. We also recommend that a
25072
+ file or class name and description of purpose be included on the
25073
+ same "printed page" as the copyright notice for easier
25074
+ identification within third-party archives.
25075
+
25076
+ Copyright 2017 Workiva Inc.
25077
+
25078
+ Licensed under the Apache License, Version 2.0 (the "License");
25079
+ you may not use this file except in compliance with the License.
25080
+ You may obtain a copy of the License at
25081
+
25082
+ http://www.apache.org/licenses/LICENSE-2.0
25083
+
25084
+ Unless required by applicable law or agreed to in writing, software
25085
+ distributed under the License is distributed on an "AS IS" BASIS,
25086
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25087
+ See the License for the specific language governing permissions and
25088
+ limitations under the License.
25089
+
24877
25090
  --------------------------------------------------------------------------------
24878
25091
  process_runner
24879
25092