70 lines
2.8 KiB
Markdown
Raw Normal View History

2017-02-16 15:38:08 +10:30
# Automatically upload screenshots from your computer into a discord channel
2017-02-15 22:26:27 +10:30
2017-02-20 21:58:55 +10:30
This program automatically uploads new screenshots that appear in a folder on your computer to Discord and posts them in a channel:
2017-02-16 15:38:08 +10:30
![Screenshot](http://i.imgur.com/QPS9V6f.jpg)
Point it at your Steam screenshot folder, or similar, and shortly after you hit your screenshot hotkey the screenshot will appear in your discord chat.
## What you'll need
* A folder where screenshots are stored
* A [discord webhook](https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
2017-02-20 21:58:28 +10:30
* This program
2017-02-16 15:38:08 +10:30
## Getting started
2017-02-20 21:58:28 +10:30
### Binaries
2017-02-16 15:38:08 +10:30
2017-02-22 16:48:29 +10:30
Binaries are available for Mac, Linux and Windows [here](https://github.com/tardisx/discord-auto-upload/releases/latest).
2017-02-22 16:46:48 +10:30
Put them somewhere on your path and run from the command line.
2017-02-22 16:48:29 +10:30
The windows version comes with a .bat file to make this a little easier - edit the `dau.bat` file to include your webhook URL and
other parameters, then you can simply double click `dau.bat` to start `dau` running.
2017-02-16 22:27:35 +10:30
#### From source
2017-02-22 16:46:48 +10:30
You'll need to [download Go](https://golang.org/dl/) check the code out somewhere, and 'go build'.
2017-02-16 22:27:35 +10:30
2017-02-16 15:38:08 +10:30
## Using it
`dau` is a command line driven program. When executed, it will continually scan a directory for new images, and each time it finds one it will upload it to discord, via the discord web hook.
`dau` will only upload "new" screenshots, where "new" means a file that appears in a directory that it is watching, if it appears *after* it has started executing.
Thus, you do not have to worry about pointing `dau` at a directory full of images, it will only upload new ones.
If `dau` is on your path, you can run it from your screenshot folder and there is then no need to specify the path to your images.
2017-02-20 21:58:28 +10:30
The only two mandatory command line parameters are the discord webhook URL:
2017-02-16 15:38:08 +10:30
`--webhook URL` - the webhook URL (see [here](https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks) for details).
2017-02-20 21:58:28 +10:30
and the directory to watch:
2017-02-16 15:38:08 +10:30
2017-02-20 21:58:28 +10:30
`--directory /some/path/here` - the directory that screenshots will appear in.
2017-02-16 15:38:08 +10:30
2017-02-21 12:28:26 +10:30
You will have to quote the path on windows, or anywhere where the directory path contains spaces. Note that
subdirectories will also be scanned.
2017-02-16 15:38:08 +10:30
2017-02-20 21:58:28 +10:30
Other parameters are:
2017-02-16 22:46:29 +10:30
2017-02-20 21:58:28 +10:30
`--watch xx` - specify how many seconds to wait between scanning the directory. The default is 10 seconds.
2017-02-16 22:46:29 +10:30
2017-02-21 12:28:26 +10:30
`--username <username>` - an arbitrary string to show as the bot's username in the channel.
`--help` - show command line help.
`--version` - show the version.
2017-02-16 15:38:08 +10:30
## Limitations/bugs
2017-02-16 16:37:08 +10:30
* Only files ending jpg, gif or png are uploaded.
* If multiple screenshots occur quickly (<1 second apart) not all may be uploaded.
2017-02-16 15:38:08 +10:30
## TODO
This is just a quick hack. Open to suggestions on new features and improvements.
2017-02-16 16:37:08 +10:30
Open an [issue](https://github.com/tardisx/discord-auto-upload/issues/new) and let me know.