Skip to content

Commit

Permalink
fix!: remove screenshot intent (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Nov 17, 2024
1 parent 4385a0e commit 1d1e5fc
Show file tree
Hide file tree
Showing 22 changed files with 2 additions and 239 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/sync_tx.yml

This file was deleted.

32 changes: 2 additions & 30 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# limitations under the License.

import datetime
import os
import tempfile
from typing import Dict, List, Tuple

from ovos_bus_client import Message
Expand All @@ -24,7 +22,7 @@
from ovos_utils.log import LOG
from ovos_utils.process_utils import RuntimeRequirements
from ovos_utils.time import now_local
from ovos_workshop.decorators import intent_handler, resting_screen_handler
from ovos_workshop.decorators import resting_screen_handler
from ovos_workshop.skills.api import SkillApi
from ovos_workshop.skills.ovos import OVOSSkill

Expand Down Expand Up @@ -107,9 +105,6 @@ def initialize(self):
self.bus.on("mycroft.internet.connected", self.on_internet_connected)
self.bus.on("enclosure.notify.no_internet", self.on_no_internet)

# Handle Screenshot Response
self.bus.on("ovos.display.screenshot.get.response", self.screenshot_taken)

SkillApi.connect_bus(self.bus)
self._load_skill_apis()

Expand Down Expand Up @@ -427,27 +422,4 @@ def handle_media_player_widget_update(self, message=None):
"enabled": True,
"widget": message.data,
"state": self.media_widget_player_state
})

######################################################################
# Handle Screenshot
@intent_handler("take.screenshot.intent")
def take_screenshot(self, message):
folder_path = self.settings.get("screenshot_folder", "")

if not folder_path:
folder_path = os.path.expanduser('~') + "/Pictures"

if not os.path.exists(folder_path):
try:
os.makedirs(folder_path, exist_ok=True)
except OSError as e:
LOG.error("Could not create screenshot folder: " + str(e))
folder_path = tempfile.gettempdir()

self.bus.emit(Message("ovos.display.screenshot.get", {"folderpath": folder_path}))

def screenshot_taken(self, message):
result = message.data.get("result")
display_message = f"Screenshot saved to {result}"
self.gui.show_notification(display_message)
})
2 changes: 0 additions & 2 deletions locale/ca-es/take.screenshot.intent

This file was deleted.

1 change: 0 additions & 1 deletion locale/da-dk/take.screenshot.intent

This file was deleted.

2 changes: 0 additions & 2 deletions locale/de-de/take.screenshot.intent

This file was deleted.

2 changes: 0 additions & 2 deletions locale/en-us/take.screenshot.intent

This file was deleted.

2 changes: 0 additions & 2 deletions locale/es-es/take.screenshot.intent

This file was deleted.

2 changes: 0 additions & 2 deletions locale/fr-fr/take.screenshot.intent

This file was deleted.

2 changes: 0 additions & 2 deletions locale/it-it/take.screenshot.intent

This file was deleted.

2 changes: 0 additions & 2 deletions locale/nl-nl/take.screenshot.intent

This file was deleted.

2 changes: 0 additions & 2 deletions locale/pt-pt/take.screenshot.intent

This file was deleted.

23 changes: 0 additions & 23 deletions res/desktop/skill.json

This file was deleted.

78 changes: 0 additions & 78 deletions scripts/sync_translations.py

This file was deleted.

6 changes: 0 additions & 6 deletions translations/ca-es/intents.json

This file was deleted.

6 changes: 0 additions & 6 deletions translations/da-dk/intents.json

This file was deleted.

6 changes: 0 additions & 6 deletions translations/de-de/intents.json

This file was deleted.

6 changes: 0 additions & 6 deletions translations/en-us/intents.json

This file was deleted.

6 changes: 0 additions & 6 deletions translations/es-es/intents.json

This file was deleted.

6 changes: 0 additions & 6 deletions translations/fr-fr/intents.json

This file was deleted.

6 changes: 0 additions & 6 deletions translations/it-it/intents.json

This file was deleted.

6 changes: 0 additions & 6 deletions translations/nl-nl/intents.json

This file was deleted.

6 changes: 0 additions & 6 deletions translations/pt-pt/intents.json

This file was deleted.

0 comments on commit 1d1e5fc

Please sign in to comment.