Crates.io | sampicore |
lib.rs | sampicore |
version | 0.4.0 |
source | src |
created_at | 2021-06-09 02:42:43.912859 |
updated_at | 2021-09-16 03:01:01.138625 |
description | 🐶 Take a screenshot get a shareable URL |
homepage | https://github.com/DanielVZ96/sampicore |
repository | https://github.com/DanielVZ96/sampicore.git |
max_upload_size | |
id | 408011 |
size | 134,502 |
Take a screenshot, get a shareable URL
It should be cross-compatible, but I haven't tested it. I've only installed it on PopOS (Ubuntu/Debian based), and I needed these deps:
sudo apt update && sudo apt install libxcb-randr0-dev build-essential libssl-dev libssl-dev pkg-config libxcb1-dev libxcb-shm0-dev
Currently it's only published in the releases page and cargo:
cargo install sampicore # will download and build sampic
It consists on a single sampic.toml
file with the following contents:
api_key = 'S3_API_KEY'
api_secret_key = 'S3_SECRET_API_KEY'
region = 'S3_REGION_'
endpoint = 'S3_ENDPOINT'
bucket = 'sampic-store'
local_path = '/tmp'
sampic_endpoint = 'https://api.sampic.xyz/upload'
Configuration will be saved locally depending on your OS in the following directories:
(According to the directories rust package)
- the XDG base directory and the XDG user directory specifications on Linux,
- the Known Folder system on Windows, and
- the Standard Directories on macOS.
sampic 0.1.0
Takes pictures and generates links
USAGE:
sampic <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
config Manage sampic configuration.
help Prints this message or the help of the given subcommand(s)
local Takes a screenshot, saves it locally and returns it's path.
s3 Takes a screenshot, saves it in s3 and returns it's link.
server Runs a sampic server.
upload Takes a screenshot, sends it to sampic and returns it's link.
The easiest way to use sampic. It takes a screenshot, sends it to my own sampic server, and copies it's URL to your clipboard.
$ sampic upload -h
sampic-upload
Takes a screenshot, sends it to sampic and returns it's link.
USAGE:
sampic upload
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
Similar to upload, but instead saves the screenshot to a local path and copies that to your clipboard.
$ sampic local -h
sampic-local
Takes a screenshot, saves it locally and returns it's path.
USAGE:
sampic local
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
If you have an s3-compatible bucket available, you can use this subcommand to send your screenshots there. You'll have to configure it in the sampic.toml file.
$ sampic s3 -h
sampic-s3
Takes a screenshot, saves it in s3 and returns it's link.
USAGE:
sampic s3
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
CLI interface to change configurations. Generally works ok, but it sometimes messes with my sampic.toml.
$ sampic config -h
sampic-config
Manage sampic configuration.
USAGE:
sampic config <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
help Prints this message or the help of the given subcommand(s)
list List current sampic configuration values.
set Set sampic configuration.
[Unit]
Description=Sampic server
After=network.target
[Service]
Type=simple
ExecStart=/path/sampic server
Restart=always
# Other restart options: always, on-abort, etc
[Install]
WantedBy=default.target
There are some things I'd like to do in order to make sampic feature complete for my use-case:
I'd love to do them all, but I'm currently working full-time, so I just work sporadically on sampic when I can during my free time.