mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-18 22:18:00 +00:00
Merge pull request #86 from thomasjsn/master
Add commandline alias examples and modifiers documentation
This commit is contained in:
38
rtfm/API.md
38
rtfm/API.md
@@ -37,6 +37,25 @@ Answer from the server:
|
|||||||
{"status":"ok","hash":"y1b6hr.jpg","url":"https://pictshare.net/y1b6hr.jpg"}
|
{"status":"ok","hash":"y1b6hr.jpg","url":"https://pictshare.net/y1b6hr.jpg"}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
2. Uploading from the commandline using alias, requires `jq` package for json response decoding
|
||||||
|
|
||||||
|
Put this in your `.bashrc` or `.zshrc`:
|
||||||
|
```
|
||||||
|
pict () {
|
||||||
|
curl -s -F "file=@${1:--}" https://pictshare.net/api/upload.php | jq -r '.url';
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
```
|
||||||
|
$ cat path/to/image.jpg | pict
|
||||||
|
```
|
||||||
|
|
||||||
|
Repsonse:
|
||||||
|
```
|
||||||
|
https://pictshare.net/y1b6hr.jpg
|
||||||
|
```
|
||||||
|
|
||||||
# geturl.php
|
# geturl.php
|
||||||
|
|
||||||
- URL https://pictshare.net/api/geturl.php
|
- URL https://pictshare.net/api/geturl.php
|
||||||
@@ -100,6 +119,25 @@ Answer from the server:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
3. Uploading from the commandline using alias, requires `jq` package for json response decoding
|
||||||
|
|
||||||
|
Put this in your `.bashrc` or `.zshrc`:
|
||||||
|
```
|
||||||
|
pictget () {
|
||||||
|
curl -s "hhttps://pictshare.net/api/geturl.php?url=$1" | jq -r '.url';
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
```
|
||||||
|
$ pictget https://i.imgur.com/qQstLQt.mp4
|
||||||
|
```
|
||||||
|
|
||||||
|
Repsonse:
|
||||||
|
```
|
||||||
|
https://pictshare.net/u0ni1m.mp4
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# pasetebin.php
|
# pasetebin.php
|
||||||
|
|||||||
34
rtfm/MODIFIERS.md
Normal file
34
rtfm/MODIFIERS.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
## Images
|
||||||
|
|
||||||
|
### Resize
|
||||||
|
```
|
||||||
|
/800x600/d8c01b45a6.png
|
||||||
|
```
|
||||||
|
|
||||||
|
width x height
|
||||||
|
|
||||||
|
### Rotate
|
||||||
|
```
|
||||||
|
/upside|left|right/d8c01b45a6.png
|
||||||
|
```
|
||||||
|
|
||||||
|
* `upside`: 180°
|
||||||
|
* `left`: 90°
|
||||||
|
* `right`: -90°
|
||||||
|
|
||||||
|
### WebP conversion
|
||||||
|
```
|
||||||
|
/webp/d8c01b45a6.jpeg
|
||||||
|
```
|
||||||
|
|
||||||
|
### Gif to mp4
|
||||||
|
```
|
||||||
|
/mp4/d8c01b45a6.gif
|
||||||
|
```
|
||||||
|
|
||||||
|
### Filters
|
||||||
|
```
|
||||||
|
/filter/d8c01b45a6.png
|
||||||
|
```
|
||||||
|
|
||||||
|
[See available filters](IMAGEFILTERS.md)
|
||||||
Reference in New Issue
Block a user