neocities_upload: Upload a file to your Neocities site.

Description Usage Arguments Examples

Description

Upload a file to your Neocities site.

Usage

1
2
neocities_upload(path, ..., user = neocities_user(),
  pass = neocities_pass(), filename = NULL)

Arguments

path

The path to the file you want to upload.

...

Arguments that will be passed to the underlying httr POST request.

user

The username for your neocities account. See ?neocities_user for more details.

pass

The password for your neocities account. See ?neocities_pass for more details.

filename

The name of the file as it will appear on neocities.org. If NULL, the base name of the file will be used. The default value is NULL.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 

## Username and password have not been set as environmental variables, so
## the user will be prompted to enter their username and password if in
## interactive mode. This file will appear on neocities.org at
## http://username.neocities.org/report.html

neocities_upload("~/Desktop/report.html")

## Setting username and password as environmental variables is wise when not
## in interactive mode, but be sure not to distribute them with your code.

Sys.setenv(NEOCITIES_USERNAME = "username")
Sys.setenv(NEOCITIES_PASSWORD = "password")
neocities_upload("~/Desktop/report.html")

## You can also pass your username and password as function arguments.

neocities_upload("~/Desktop/report.html", user="username", pass="password")

## You can change what the filename will be on your neocities domain. This
## file will appear at http://username.neocities.org/october.html

neocities_upload("~/Desktop/report.html", filename="october.html")


## End(Not run)

seankross/neocities documentation built on May 29, 2019, 4:55 p.m.