Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
orca /
[ HOME SHELL ]
Name
Size
Permission
Action
backends
[ DIR ]
drwxr-xr-x
__pycache__
[ DIR ]
drwxr-xr-x
scripts
[ DIR ]
drwxr-xr-x
acss.py
3.49
KB
-rw-r--r--
bookmarks.py
8.37
KB
-rw-r--r--
braille_generator.py
21
KB
-rw-r--r--
braille.py
70.54
KB
-rw-r--r--
braille_rolenames.py
10.33
KB
-rw-r--r--
brlmon.py
6.45
KB
-rw-r--r--
brltablenames.py
7.3
KB
-rw-r--r--
caret_navigation.py
13.66
KB
-rw-r--r--
chat.py
33.71
KB
-rw-r--r--
chnames.py
23.03
KB
-rw-r--r--
cmdnames.py
55.23
KB
-rw-r--r--
colornames.py
38.13
KB
-rw-r--r--
common_keyboardmap.py
6.64
KB
-rw-r--r--
debug.py
17.79
KB
-rw-r--r--
desktop_keyboardmap.py
4.62
KB
-rw-r--r--
event_manager.py
41.45
KB
-rw-r--r--
eventsynthesizer.py
18.13
KB
-rw-r--r--
find.py
12.77
KB
-rw-r--r--
flat_review.py
48.16
KB
-rw-r--r--
formatting.py
55.22
KB
-rw-r--r--
generator.py
60.81
KB
-rw-r--r--
guilabels.py
46.35
KB
-rw-r--r--
__init__.py
115
B
-rw-r--r--
input_event.py
40.29
KB
-rw-r--r--
keybindings.py
17.82
KB
-rw-r--r--
keynames.py
9.71
KB
-rw-r--r--
label_inference.py
21.29
KB
-rw-r--r--
laptop_keyboardmap.py
4.61
KB
-rw-r--r--
liveregions.py
21.77
KB
-rw-r--r--
logger.py
1.97
KB
-rw-r--r--
mathsymbols.py
88.14
KB
-rw-r--r--
messages.py
141.35
KB
-rw-r--r--
mouse_review.py
21.57
KB
-rw-r--r--
notification_messages.py
6.18
KB
-rw-r--r--
object_properties.py
33.38
KB
-rw-r--r--
orca_gtkbuilder.py
5.35
KB
-rw-r--r--
orca_gui_commandlist.py
4.19
KB
-rw-r--r--
orca_gui_find.py
8.12
KB
-rw-r--r--
orca_gui_navlist.py
6.66
KB
-rw-r--r--
orca_gui_prefs.py
139.1
KB
-rw-r--r--
orca_gui_profile.py
4.06
KB
-rw-r--r--
orca_i18n.py
3.18
KB
-rw-r--r--
orca_platform.py
1.44
KB
-rw-r--r--
orca.py
27.86
KB
-rw-r--r--
orca_state.py
2.4
KB
-rw-r--r--
phonnames.py
2.76
KB
-rw-r--r--
pronunciation_dict.py
2.61
KB
-rw-r--r--
punctuation_settings.py
13.64
KB
-rw-r--r--
script_manager.py
14.37
KB
-rw-r--r--
script.py
19.04
KB
-rw-r--r--
script_utilities.py
201.5
KB
-rw-r--r--
settings_manager.py
24.55
KB
-rw-r--r--
settings.py
12.88
KB
-rw-r--r--
sound_generator.py
11.99
KB
-rw-r--r--
sound.py
5.47
KB
-rw-r--r--
speechdispatcherfactory.py
26.19
KB
-rw-r--r--
speech_generator.py
113.82
KB
-rw-r--r--
speech.py
10.22
KB
-rw-r--r--
speechserver.py
6.92
KB
-rw-r--r--
spellcheck.py
10.07
KB
-rw-r--r--
structural_navigation.py
124.25
KB
-rw-r--r--
text_attribute_names.py
28.62
KB
-rw-r--r--
tutorialgenerator.py
30.41
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : sound_generator.py
# Orca # # Copyright 2016 Igalia, S.L. # # Author: Joanmarie Diggs <jdiggs@igalia.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., Franklin Street, Fifth Floor, # Boston MA 02110-1301 USA. """Utilities for obtaining sounds to be presented for objects.""" __id__ = "$Id:$" __version__ = "$Revision:$" __date__ = "$Date:$" __copyright__ = "Copyright (c) 2016 Igalia, S.L." __license__ = "LGPL" import gi gi.require_version('Atspi', '2.0') from gi.repository import Atspi import os import pyatspi from . import generator from . import settings_manager _settingsManager = settings_manager.getManager() METHOD_PREFIX = "_generate" class Icon: """Sound file representing a particular aspect of an object.""" def __init__(self, location, filename): self.path = os.path.join(location, filename) def __str__(self): return 'Icon(path: %s, isValid: %s)' % (self.path, self.isValid()) def isValid(self): return os.path.isfile(self.path) class Tone: """Tone representing a particular aspect of an object.""" SINE_WAVE = 0 SQUARE_WAVE = 1 SAW_WAVE = 2 TRIANGLE_WAVE = 3 SILENCE = 4 WHITE_UNIFORM_NOISE = 5 PINK_NOISE = 6 SINE_WAVE_USING_TABLE = 7 PERIODIC_TICKS = 8 WHITE_GAUSSIAN_NOISE = 9 RED_NOISE = 10 INVERTED_PINK_NOISE = 11 INVERTED_RED_NOISE = 12 def __init__(self, duration, frequency, volumeMultiplier=1, wave=SINE_WAVE): self.duration = duration self.frequency = min(max(0, frequency), 20000) self.volume = _settingsManager.getSetting('soundVolume') * volumeMultiplier self.wave = wave def __str__(self): return 'Tone(duration: %s, frequency: %s, volume: %s, wave: %s)' \ % (self.duration, self.frequency, self.volume, self.wave) class SoundGenerator(generator.Generator): """Takes accessible objects and produces the sound(s) to be played.""" def __init__(self, script): super().__init__(script, 'sound') self._sounds = os.path.join(_settingsManager.getPrefsDir(), 'sounds') def _convertFilenameToIcon(self, filename): icon = Icon(self._sounds, filename) if icon.isValid(): return icon return None def generateSound(self, obj, **args): """Returns an array of sounds for the complete presentation of obj.""" return self.generate(obj, **args) ##################################################################### # # # State information # # # ##################################################################### def _generateAvailability(self, obj, **args): """Returns an array of sounds indicating obj is grayed out.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateAvailability(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateCheckedState(self, obj, **args): """Returns an array of sounds indicating the checked state of obj.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateCheckedState(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateClickable(self, obj, **args): """Returns an array of sounds indicating obj is clickable.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateClickable(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateExpandableState(self, obj, **args): """Returns an array of sounds indicating the expanded state of obj.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateExpandableState(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateHasLongDesc(self, obj, **args): """Returns an array of sounds indicating obj has a longdesc.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateHasLongDesc(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateMenuItemCheckedState(self, obj, **args): """Returns an array of sounds indicating the checked state of obj.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateMenuItemCheckedState(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateMultiselectableState(self, obj, **args): """Returns an array of sounds indicating obj is multiselectable.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateMultiselectableState(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateRadioState(self, obj, **args): """Returns an array of sounds indicating the selected state of obj.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateRadioState(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateReadOnly(self, obj, **args): """Returns an array of sounds indicating obj is read only.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateReadOnly(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateRequired(self, obj, **args): """Returns an array of sounds indicating obj is required.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateRequired(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateSwitchState(self, obj, **args): """Returns an array of sounds indicating the on/off state of obj.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateSwitchState(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateToggleState(self, obj, **args): """Returns an array of sounds indicating the toggled state of obj.""" if not _settingsManager.getSetting('playSoundForState'): return [] filenames = super()._generateToggleState(obj, **args) result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateVisitedState(self, obj, **args): """Returns an array of sounds indicating the visited state of obj.""" if not _settingsManager.getSetting('playSoundForState'): return [] if not args.get('mode', None): args['mode'] = self._mode args['stringType'] = 'visited' if obj.getState().contains(pyatspi.STATE_VISITED): filenames = [self._script.formatting.getString(**args)] result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] ##################################################################### # # # Value interface information # # # ##################################################################### def _generatePercentage(self, obj, **args): """Returns an array of sounds reflecting the percentage of obj.""" if not _settingsManager.getSetting('playSoundForValue'): return [] percent = self._script.utilities.getValueAsPercent(obj) if percent is None: return [] return [] def _generateProgressBarValue(self, obj, **args): """Returns an array of sounds representing the progress bar value.""" if args.get('isProgressBarUpdate'): if not self._shouldPresentProgressBarUpdate(obj, **args): return [] elif not _settingsManager.getSetting('playSoundForValue'): return [] percent = self._script.utilities.getValueAsPercent(obj) if percent is None: return [] # To better indicate the progress completion. if percent >= 99: duration = 1 else: duration = 0.075 # Reduce volume as pitch increases. volumeMultiplier = 1 - (percent / 120) # Adjusting so that the initial beeps are not too deep. if percent < 7: frequency = int(98 + percent * 5.4) else: frequency = int(percent * 22) return [Tone(duration, frequency, volumeMultiplier, Tone.SINE_WAVE)] def _getProgressBarUpdateInterval(self): interval = _settingsManager.getSetting('progressBarBeepInterval') if interval is None: return super()._getProgressBarUpdateInterval() return int(interval) def _shouldPresentProgressBarUpdate(self, obj, **args): if not _settingsManager.getSetting('beepProgressBarUpdates'): return False return super()._shouldPresentProgressBarUpdate(obj, **args) ##################################################################### # # # Role and hierarchical information # # # ##################################################################### def _generatePositionInSet(self, obj, **args): """Returns an array of sounds reflecting the set position of obj.""" if not _settingsManager.getSetting('playSoundForPositionInSet'): return [] position, setSize = self._script.utilities.getPositionAndSetSize(obj) percent = int((position / setSize) * 100) return [] def _generateRoleName(self, obj, **args): """Returns an array of sounds indicating the role of obj.""" if not _settingsManager.getSetting('playSoundForRole'): return [] role = args.get('role', obj.getRole()) filename = Atspi.role_get_name(role).replace(' ', '_') result = self._convertFilenameToIcon(filename) if result: return [result] return []
Close