{"id":18030318,"url":"https://github.com/laggykiller/moticdownloader","last_synced_at":"2025-04-04T21:16:14.491Z","repository":{"id":108186736,"uuid":"313614912","full_name":"laggykiller/MoticDownloader","owner":"laggykiller","description":"Download slides from Motic Gallery","archived":false,"fork":false,"pushed_at":"2021-05-23T14:13:55.000Z","size":231,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T05:43:35.585Z","etag":null,"topics":["bot","downloader","python3","scraper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laggykiller.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-11-17T12:37:56.000Z","updated_at":"2021-05-23T14:13:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"17dd0812-ebd4-4807-ac12-ca7490b61bd7","html_url":"https://github.com/laggykiller/MoticDownloader","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laggykiller%2FMoticDownloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laggykiller%2FMoticDownloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laggykiller%2FMoticDownloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laggykiller%2FMoticDownloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laggykiller","download_url":"https://codeload.github.com/laggykiller/MoticDownloader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249544,"owners_count":20908212,"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":["bot","downloader","python3","scraper"],"created_at":"2024-10-30T09:14:01.991Z","updated_at":"2025-04-04T21:16:14.462Z","avatar_url":"https://github.com/laggykiller.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MoticDownloader\nA python script for downloading microscopic slides from Motic Gallery.\n\n![alt text](https://github.com/laggykiller/MoticDownloader/blob/main/Demo.png?raw=true)\n\n## Download\nPre-compiled versions are available for Windows, MacOS and Linux.\n\u003chttps://github.com/laggykiller/MoticDownloader/releases/\u003e\n\n## Features\n - User-friendly tkinter GUI\n - CLI available for mass downloading microscopic slides\n - Download multiple microscopic slides from Motic Gallery at one go\n - Reduce bandwidth usage by not downloading white tiles\n - Auto trimming white edges\n - Rotate image\n - Free to choose zoom level (resolution of image)\n\n## How does it work?\nMotic Gallery send microscopic slides in square tiles. This program downloads and stitches the tiles together.\n\n## CLI\nMoticDownloader start in GUI mode by default. Supply any arguments to start in CLI mode.\n\nThe syntax of CLI is as below:\n\n```\nusage: MoticDownloader.py [-h] [-q] [-n] [-l LOGINPAGE] [-u USERNAME] [-p PASSWORD] [-z ZOOM]\n                          [-r {0,90,180,270}] [-m {n,none,a,auto,m,manual}] [-t x1 x2 y1 y2]\n                          [target_urls ...]\n\nDownload slides from MoticGallery. Supply any arguments to start in CLI mode instead of GUI mode.\n\npositional arguments:\n  target_urls           URL of slide to download\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -q, --quiet           Do not show any message\n  -n, --dryrun          Show slide metadata only\n  -l LOGINPAGE, --loginpage LOGINPAGE\n                        Specify login page URL for login\n  -u USERNAME, --username USERNAME\n                        Set username for login\n  -p PASSWORD, --password PASSWORD\n                        Set password for login\n  -z ZOOM, --zoom ZOOM  Set zoom level (0-13)\n  -r {0,90,180,270}, --rotation {0,90,180,270}\n                        Set counterclockwise rotation (0 | 90 | 180 | 270)\n  -m {n,none,a,auto,m,manual}, --trim_mode {n,none,a,auto,m,manual}\n                        Set trim mode ([n]one | [a]uto | [m]anual)\n  -t x1 x2 y1 y2, --trim x1 x2 y1 y2\n                        Set trim range on full image (x1, x2, y1, y2)\n```\n\nNote that if you do not give an argument, values from config.ini or default values would be used.\n\nExample 1:\n\n```\nMoticDownloader.py -u simon -p password -z 3 -r 90 -m a http://www.example.com/MoticGallery/Slides/F2CA1BB6-06DA-4715-7E57-22DA52E6CCC2\n```\n\nThis downloads slide at zoom level 3, rotation 90 degrees counterclockwise and auto trim.\n\nExample 2:\n\n```\nMoticDownloader.py -z 5 -t 20 60 30 50 http://www.example.com/MoticGallery/Slides/F2CA1BB6-06DA-4715-7E57-22DA52E6CCC2 http://www.example.com/MoticGallery/Slides/D21BB4FC-DF08-2D5D-E846-7163AF34D082\n```\n\nThis downloads 2 slides at zoom level 5 and manual trim from (20, 30) to (60, 50). Username, password and zoom level from config.ini would be used if available.\n\n## FAQ\n### Program crashed when downloading high resolution image\nYou probably ran out of RAM. Try to download without trimming, as trimming requires more RAM.\n\nIf it still fails, try to download with higher zoom level (lower resolution).\n\n### Is this program safe?\nYes it is. You may check the source code.\n\nIf you do not trust the pre-compiled binaries, you may download and run the py file directly or compile it yourself.\n\nNote that the windows program maybe marked suspicious by Windows SmartScreen, as the program is not code signed with certificate.\n\nSome antivirus may detect it as a virus, as this program needs to collect your username and password and send it to Motic Gallery server.\n\nNote that the windows msi installer is built with Advanced Installer, a non-opensource program. If you do not trust it, use exe or py file instead.\n\n### I found a bug!\nSubmit a bug report to 'Issues'. Make sure you include the error message.\n\n### Can you add XXX/YYY features?\nSubmit a request to 'Issues'. Also, feel free to submit pull requests.\n\n### How to compile?\nInstall python and pip, then install libraries used by MoticDownloader with `pip install mechanize beautifulsoup4 lxml Pillow tqdm`\n\nFinally, depending on OS, run one of the following command to compile:\n\nWindows:\n```\npip3 install pyinstaller\npyinstaller -n MoticDownloader-Windows --clean --onefile --icon=icon/app.ico --windowed --add-data icon/*;icon MoticDownloader.py\n```\n\nMacOS:\n```\npython3 -m pip install py2app\npython3 setup-mac.py py2app\n```\n(Note: For MacOS, using pyinstaller to compile with --windowed option cause the app to crash on launch)\n\nLinux:\n```\npip3 install pyinstaller\npyinstaller -n MoticDownloader-Linux --clean --onefile --windowed --add-data icon/*:icon MoticDownloader.py\n```\n\n### Compiling on MacOS gives an app with buggy GUI\nYou might had installed python3 via homebrew.\n\nUninstall python3 and reinstall python3 using pkg supplied by python.org\n\n### Compiling on linux failed with `pyinstaller 'NoneType' object has no attribute 'groups'`\nUse the patch provided here: https://github.com/pyinstaller/pyinstaller/issues/5540#issuecomment-776995969\n\n## Libraries used\nLibraries below are required if you want to run the py file directly or compile it yourself. Install them with pip.\n - mechanize\n - beautifulsoup4\n - lxml\n - Pillow\n - tqdm\n\n## Icon source\nApp icon is from [Remix Icon](https://remixicon.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaggykiller%2Fmoticdownloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaggykiller%2Fmoticdownloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaggykiller%2Fmoticdownloader/lists"}