-
Notifications
You must be signed in to change notification settings - Fork 3
/
ui.R
33 lines (31 loc) · 1.2 KB
/
ui.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
28
29
30
31
32
33
## -----
## ui.R
## -----
library("shiny")
library("plotly")
ui <- fluidPage(
h2("Count Words in a PDF Document", style = "text-align:center;"),
br(),
fluidRow(
column(3,
strong(p("Upload your file here:")),
fileInput("infile", label = NULL, accept = "application/pdf"),
textInput("pages", "Page numbers (e.g., 1:3,5:7):", "", width = "70%"),
strong(p("Additional options:")),
checkboxInput("count_numbers", "Count numbers?", TRUE),
checkboxInput("count_captions", "Count table/figure captions?", FALSE),
checkboxInput("count_equations", "Count equation lines?", FALSE),
checkboxInput("split_hyphenated", "Split hyphenated words?", FALSE),
checkboxInput("split_urls", "Tokenize URLs?", FALSE)
),
column(9,
strong(textOutput("grand_total")),
p(""),
strong(textOutput("page_counts")),
plotlyOutput("barplot", width = "100%", height = "500px")
)
),
br(),
tags$footer(
tags$p("Copyright Thomas J. Leeper (2018).", a("MIT-licensed.", href = "https://opensource.org/licenses/MIT"), "Source code and R package available from: ", a("https://github.com/leeper/pdfcount", href = "https://github.com/leeper/pdfcount")))
)