We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PovedaAqui/auto-snap-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
capture.cpython-312.pyc•74 kB
�
�h� � �� � d Z ddlZddlZddlZddlZddlmZmZmZm Z ddl
mZ ddlZ
ddlmZ ddlZddlmZmZmZ ej* e� Zdefd�Z G d � d
� Z G d� d� Z G d
� d� Zdee fd�Zy)z�
Screenshot capture functionality for Linux systems and Windows (via WSL2).
Uses pyscreenshot for cross-platform screenshot capability.
� N)�List�Dict�Optional�Tuple)�Path)�Image)�
get_config�get_output_directory�generate_page_filename�returnc �t � t j j d� rFt dd� 5 } | j � j � }d|v sd|v r
ddd� y ddd� t
j � dk( ryy# 1 sw Y �"xY w# t $ r"}t j d |� �� Y d}~yd}~ww xY w)
z�
Detect the current runtime environment.
Returns:
'wsl' if running in WSL (can access Windows)
'linux' if running in native Linux
'windows' if running in native Windows
z
/proc/version�r� microsoft�wslN�Windows�windows�linuxzCould not detect environment: )�os�path�exists�open�read�lower�platform�system� Exception�logger�warning)�f�version_info�es �+/home/luispoveda93/auto-snap-mcp/capture.py�detect_environmentr# s� � ��
�7�7�>�>�/�*��o�s�+�
!�q� �v�v�x�~�~�/���,�.�%�<�2G� �
!�
!�2G�
!� �?�?�� �)�� �
!�
!�� � ����7��s�;�<����s4 �+B �(B �B �B � B �B � B7�B2�2B7c � � e Zd ZdZd� Zdefd�Zdeee e f fd�Z
dde dee de fd �Zd
e de fd�Z
ddee de fd�Zdee ef fd
�Zde de fd�Zde de defd�Z dde dedee de dedee fd�Zde defd�Zde dedefd�Zy)�WindowsWindowManagerzIHandles Windows application enumeration and screenshot capture from WSL2.c �. � | j � | _ y �N)�_check_powershell�powershell_available��selfs r"