Skip to content

Configuration

Mark Polyakov edited this page Oct 20, 2017 · 3 revisions

Location

The configuration file is usually located at ~/.config/anypaste.conf, and is created automatically the first time you run Anypaste.

Technically, it's at $XDG_CONFIG_HOME/anypaste.conf, or at $HOME/.config/anypaste.conf if $XDG_CONFIG_HOME is not set.

Syntax

Strings and Numbers: export var_name='value'

Arrays: export arr_name=('val1' 'val2' 'val3')

Comments: # Comment here

Any configuration options that need to be read by plugins (such as authentication details) need to have export. The only options which don't need export are ones read directly by Anypaste Core. Basically, everything but ap_plugins needs export

Important Options

The only configuration option which is required to run Anypaste is ap_plugins. This is an array of all enabled plugins, in order of precedence. If your configuration file has this in it:

ap_plugins=(
'gfycat'
'sendvid'
'tinyimg'
)

and you tried to upload a video, both gfycat and sendvid would be compatible. Gfycat would be selected for uploading because it's listed first. If gfycat failed, it would still fall back to sendvid.

Many plugins need authentication (such as API keys or user/password pairs) in order to function, or have configuration options that change how they work. Head to the plugin page to see how those work.

Clone this wiki locally