All Projects → migueldemoura → Myazo

migueldemoura / Myazo

Licence: mit
Self-hosted, cross-platform Gyazo alternative

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Myazo

Screen capture lite
cross platform screen/window capturing library
Stars: ✭ 340 (+120.78%)
Mutual labels:  screenshot, cross-platform
Tools Ocr
树洞 OCR 文字识别(一款跨平台的 OCR 小工具)
Stars: ✭ 2,303 (+1395.45%)
Mutual labels:  screenshot, cross-platform
Lumo
Fast, cross-platform, standalone ClojureScript environment
Stars: ✭ 1,861 (+1108.44%)
Mutual labels:  self-hosted, cross-platform
Flameshot
Powerful yet simple to use screenshot software 🖥️ 📸
Stars: ✭ 15,429 (+9918.83%)
Mutual labels:  screenshot, cross-platform
Sparkleshare
Share and collaborate by syncing with any Git repository instantly. Linux, macOS, and Windows.
Stars: ✭ 4,661 (+2926.62%)
Mutual labels:  self-hosted, cross-platform
Screencloud
Screenshot sharing application for Windows, Mac and Linux.
Stars: ✭ 537 (+248.7%)
Mutual labels:  screenshot, cross-platform
Python Mss
An ultra fast cross-platform multiple screenshots module in pure Python using ctypes.
Stars: ✭ 582 (+277.92%)
Mutual labels:  screenshot, cross-platform
Photo Stream
Self-hosted, super simple photo stream
Stars: ✭ 1,839 (+1094.16%)
Mutual labels:  self-hosted
Komodoedit
Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
Stars: ✭ 1,972 (+1180.52%)
Mutual labels:  cross-platform
Dgle
Powerful independent cross-platform engine for 2D/3D games and visualizations. Young, strong and crazy!
Stars: ✭ 149 (-3.25%)
Mutual labels:  cross-platform
Algernon
🎩 Small self-contained pure-Go web server with Lua, Markdown, HTTP/2, QUIC, Redis and PostgreSQL support
Stars: ✭ 1,880 (+1120.78%)
Mutual labels:  cross-platform
Nana
a modern C++ GUI library
Stars: ✭ 1,961 (+1173.38%)
Mutual labels:  cross-platform
Subspace
A simple WireGuard VPN server GUI
Stars: ✭ 2,109 (+1269.48%)
Mutual labels:  self-hosted
Kastri
Cross-platform library for Delphi
Stars: ✭ 148 (-3.9%)
Mutual labels:  cross-platform
Protobuild
This project has been retired.
Stars: ✭ 153 (-0.65%)
Mutual labels:  cross-platform
Innocenceengine
Cross-platform modern game engine.
Stars: ✭ 149 (-3.25%)
Mutual labels:  cross-platform
Hakatime
Wakatime server implementation & analytics dashboard
Stars: ✭ 154 (+0%)
Mutual labels:  self-hosted
Ex money
A [work-in-progress] self-hosted personal finance app
Stars: ✭ 154 (+0%)
Mutual labels:  self-hosted
Kshare
The free and open source and cross platform screen sharing software.
Stars: ✭ 151 (-1.95%)
Mutual labels:  screenshot
Netflix clone
Netflix type clone app to learn animation and basic UI components..
Stars: ✭ 152 (-1.3%)
Mutual labels:  cross-platform

Myazo

Demo

Myazo is a self-hosted Gyazo alternative. It allows you to take a screenshot of part of your screen and automatically upload it to your own server.

It is comprised by a cross-platform client in Python which defers the actual taking of screenshot to OS built-in tools (macOS and Windows) or common utilities (GNU/Linux distributions). The server script, designed with cheap shared hosting in mind, is written with the ubiquitous PHP. Both the client and server are single files. You may separate the settings from the code if you wish.

It can also function as a mere Gyazo client, uploading directly to Gyazo's servers. In that case, you simply need the client and to set the configuration option gyazo_server to True. This mode won't send additional metadata like Gyazo's proprietary clients.

Compatibility

Client

  • Python >= 3.6 (check with python --version or python3 --version)

The following OSes have off-the-shelf compatibility. You can add more back ends for missing systems or configurations.

  • GNU/Linux (presets for gnome-screenshot, xfce4-screenshooter, spectacle, scrot and import (ImageMagick))
  • macOS
  • Windows 10 >= 1703 Creators Update (check with winver - Build >= 10.0.15063.251)

Server

  • PHP >= 7.1 (check with php -v or php -r 'echo phpinfo();')

Installation

  • Install Python 3 and choose the version matching your CPU arch (x86 or x86-64);
  • Install client requirements:
pip3 install -r requirements.txt

Alternatively, you can use poetry:

pip3 install poetry
cd client/ && poetry install

You'll have to ensure that the python script is then ran with poetry run.

  • Choose or generate a secret key and fill in the variable secret at client/src/myazo.py;
  • Hash the secret key with bcrypt and fill in the variable secretBcrypt at server/src/upload.php; You can do so with PHP itself:
php -r "echo password_hash('yoursecrethere', PASSWORD_DEFAULT);"

If you don't have access to a php cli, create a hash.php file on your web server with <?php file_put_contents(__FILE__, '<?php ' . password_hash('yoursecrethere', PASSWORD_DEFAULT)); and open it on your browser. Then, grab the hash from the hash.php source and delete the file.

  • Upload server/src/upload.php to your web server;
  • Disable directory listing so the list of uploaded screenshots isn't visible. For Apache, this can be done by uploading server/src/.htaccess to your web server's web root (or possibly any other directory, as long as it is a parent of the one where screenshots are stored).
  • Enter the full public url of the server/src/upload.php script in the variable upload_script at client/myazo.py.

Alternatively, you may use the Docker and Docker Compose config files to deploy the server. Please note that you will need to configure HTTPS yourself.

Configuration

There are two ways of configuring Myazo: either change the options in the scripts themselves, or use an external config file.

If an external file is found, Myazo extends the default config with the provided values. The following tables contain all options and where the user config file must be placed.

Client

  • Example Config: client/src/config.ini.example
  • Placement Path: ~/.config/myazo/config.ini (~ refers to the user directory)
Key Default Description
gyazo_server False Controls whether to use Gyazo's servers
gyazo_direct_link True Controls whether to open Gyazo direct image url
upload_script 'https://myazo.example.com/upload.php' Full path to the upload.php file
secret 'hunter2' Secret token
clear_metadata True Controls clearing screenshot metadata before upload
open_browser True Controls open url in default browser after upload
copy_clipboard True Controls copy url to clipboard after upload
output_url True Controls print url to stdout after upload

Please note that if gyazo_server is set to True, upload_script and secret are ignored.

Server

  • Example Config: server/src/config.php.example
  • Placement Path: config.php (relative to upload.php)
Key Default Description
secretBcrypt '' Bcrypt hashed secret
saveDirName '/data/' Writable directory where screenshots will be stored
maxScreenshotSize 2 * 1048576 Maximum size in bytes of uploaded screenshot
screenshotMimeType 'image/png' MIME type of uploaded screenshot

Please note that maxScreenshotSize may be capped externally by PHP and the web server.

Desktop Icon/Shortcut

  • GNU/Linux

Make sure the file is executable by running chmod +x /path/to/myazo.py.

~/.local/share/applications/myazo.desktop

[Desktop Entry]
Name=Myazo
Comment=Screenshot
Exec=/path/to/myazo.py
Terminal=false
Type=Application
Icon=applets-screenshooter
Categories=Utility;Graphics;
StartupNotify=false
  • Windows

Rename myazo.py to myazo.pyw and create a new shortcut pointing to C:\path\to\myazo.pyw. Optionally, you can change the icon to a more fitting and better looking one (shell32.dll's scissors one is decent). You can then pin the shortcut to the taskbar or start menu.

License

MIT. See License.md for further information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].