-
Notifications
You must be signed in to change notification settings - Fork 8
/
aaa.R
28 lines (27 loc) · 1.06 KB
/
aaa.R
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
#' @importFrom tools R_user_dir
#' @importFrom utils str
.onAttach <- function(libname, pkgname) {
plantumlOptions(
jar_name = file.path( tools::R_user_dir(package = "plantuml", "cache"), "jar", "plantuml.jar"),
java_bin = Sys.which("java"),
java_opt = "-Djava.awt.headless=true -splash:no",
plantuml_opt = "-Playout=smetana",
server_url = "http://www.plantuml.com/plantuml/",
server_port = NULL
)
plantuml_knit_engine_register()
packageStartupMessage(
"The package is by default using the online plantuml server\n",
"at http://www.plantuml.com/plantuml/\n",
"If you want to use a different server or the local plantuml server,\n",
"please set the addresss and the port by e.g.\n\n",
" plantumlOptions(server_url = 'http://localhost/')\n",
" plantumlOptions(server_port = '8080')\n\n",
"If you are using the local plantuml server, you have to start it by\n\n",
" server_set(\"local\")\n",
" server_start()\n\n",
"and stop it t the end using\n\n",
" stop_server()",
" server_set(\"local\")"
)
}