{"id":28994063,"url":"https://github.com/phstudy/turing-screen-cli","last_synced_at":"2025-06-25T03:10:44.954Z","repository":{"id":296220560,"uuid":"974775615","full_name":"phstudy/turing-screen-cli","owner":"phstudy","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-29T14:14:17.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T15:51:16.397Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phstudy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-29T09:36:55.000Z","updated_at":"2025-05-29T14:14:20.000Z","dependencies_parsed_at":"2025-05-29T16:06:27.522Z","dependency_job_id":null,"html_url":"https://github.com/phstudy/turing-screen-cli","commit_stats":null,"previous_names":["phstudy/turing-screen-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phstudy/turing-screen-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstudy%2Fturing-screen-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstudy%2Fturing-screen-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstudy%2Fturing-screen-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstudy%2Fturing-screen-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phstudy","download_url":"https://codeload.github.com/phstudy/turing-screen-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstudy%2Fturing-screen-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261795344,"owners_count":23210621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-25T03:10:44.267Z","updated_at":"2025-06-25T03:10:44.930Z","avatar_url":"https://github.com/phstudy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Turing Smart Screen CLI\n\nA command-line interface tool for controlling Turing Smart Screen 8.8 inch V1.1 device via USB.\n\n## Overview\n\nThis CLI tool allows you to interact with Turing Smart Screen device (VENDOR_ID: 0x1cbe, PRODUCT_ID: 0x0088) from your computer. You can send various commands including displaying images, playing videos, adjusting brightness, and configuring device settings.\n\n## Requirements\n\n- Python 3.7+\n- Dependencies:\n  - pyusb\n  - pycryptodome\n  - Pillow (PIL)\n  - pytest (for testing)\n  - mypy, black, flake8 (for development)\n- FFmpeg (for video processing)\n\n## Installation\n\n1. Clone this repository:\n   ```sh\n   git clone https://github.com/phstudy/turing_screen_cli.git\n   cd turing_screen_cli\n   ```\n\n2. Install the required Python packages:\n   ```sh\n   pip install -r requirements.txt\n   ```\n\n3. (Optional, for development) Install in editable mode:\n   ```sh\n   pip install -e .\n   ```\n\n4. Make sure FFmpeg is installed on your system (required for video functionality).\n\n## Usage\n\nAfter installation, you can use the CLI as follows:\n\n```sh\nturing-screen [command] [options]\n```\n\n### Available Commands\n\n#### Image Operations\n- **Display an image on the screen**\n  ```sh\n  turing-screen image /path/to/image.png\n  ```\n- **Clear the current image**\n  ```sh\n  turing-screen image /path/to/image.png --clear\n  ```\n\n#### Video Operations\n- **Play a video on the screen**\n  ```sh\n  turing-screen video /path/to/video.mp4\n  ```\n- **Loop the video**\n  ```sh\n  turing-screen video /path/to/video.mp4 --loop\n  ```\n- **Stop video playback**\n  ```sh\n  turing-screen video /path/to/video.mp4 --stop\n  ```\n\n#### File Operations\n- **Upload a file to device storage**\n  ```sh\n  turing-screen file upload /path/to/file.png\n  ```\n- **Delete a file from device storage**\n  ```sh\n  turing-screen file delete filename.png\n  ```\n- **List files in device storage**\n  ```sh\n  turing-screen file list /path/on/device\n  ```\n\n#### Device Operations\n- **Send sync command**\n  ```sh\n  turing-screen device sync\n  ```\n- **Restart the device**\n  ```sh\n  turing-screen device restart\n  ```\n- **Set screen brightness (0-102)**\n  ```sh\n  turing-screen device brightness 50\n  ```\n- **Set frame rate**\n  ```sh\n  turing-screen device frame-rate 30\n  ```\n\n### Help\n\n```sh\nturing-screen --help\n```\n\n## Device Storage Structure\n\nThe Turing Smart Screen has the following storage structure:\n- Images are stored in: `/tmp/sdcard/mmcblk0p1/img/`\n- Videos are stored in: `/tmp/sdcard/mmcblk0p1/video/`\n\n## Image and Video Requirements\n\n- Images:\n  - Format: PNG only\n  - Resolution: 480x1920 pixels\n- Videos:\n  - For direct streaming: MP4 format (will be converted to H264)\n  - For storage: H264 format\n\n## Development \u0026 Testing\n\n- **Run tests:**\n  ```sh\n  pytest\n  ```\n- **Type checking:**\n  ```sh\n  mypy src/turing_screen_cli\n  ```\n- **Code formatting:**\n  ```sh\n  black src/turing_screen_cli\n  ```\n- **Linting:**\n  ```sh\n  flake8 src/turing_screen_cli\n  ```\n\n## Troubleshooting\n\n- If you get \"USB device not found\" error, make sure the device is properly connected\n- For permission issues on Linux, try running with sudo or configure udev rules\n  - Linux users may need to detach the kernel driver using `dev.detach_kernel_driver(0)`\n- Make sure FFmpeg is installed and in your system PATH for video functionality\n- For video playback issues, ensure the video has been properly converted to H264 format\n\n## License\n\nThis project is licensed under the MIT License - see the text below for details:\n\n```\nMIT License\n\nCopyright (c) 2025\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphstudy%2Fturing-screen-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphstudy%2Fturing-screen-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphstudy%2Fturing-screen-cli/lists"}