Ver código fonte

Revove purrr, adjust dependencies, update license

tags/v0.1.2
Garrick Aden-Buie 7 anos atrás
pai
commit
a9d9f6cd28
6 arquivos alterados com 36 adições e 9 exclusões
  1. +1
    -0
      .Rbuildignore
  2. +1
    -2
      DESCRIPTION
  3. +2
    -0
      LICENSE
  4. +21
    -0
      LICENSE.md
  5. +2
    -0
      NAMESPACE
  6. +9
    -7
      R/ermoji_gadget.R

+ 1
- 0
.Rbuildignore Ver arquivo

@@ -1,3 +1,4 @@
^LICENSE\.md$
^ermoji\.Rproj$
^\.Rproj\.user$
^README\.Rmd$

+ 1
- 2
DESCRIPTION Ver arquivo

@@ -4,14 +4,13 @@ Title: RStudio Addin to Search and Copy Emoji
Description: RStudio addin to search through emoji and copy the emoji name,
unicode string or gliph to the clipboard.
Authors@R: "Garrrick Aden-Buie <g.adenbuie@gmail.com> [aut, cre]"
License: MIT
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
ByteCompile: true
Imports:
emo,
DT,
purrr,
clipr
Remotes: hadley/emo
Depends:

+ 2
- 0
LICENSE Ver arquivo

@@ -0,0 +1,2 @@
YEAR: 2018
COPYRIGHT HOLDER: Garrick Aden-Buie

+ 21
- 0
LICENSE.md Ver arquivo

@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2018 Garrick Aden-Buie

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

+ 2
- 0
NAMESPACE Ver arquivo

@@ -2,3 +2,5 @@

export(ermoji_gadget)
export(ermoji_shiny)
import(miniUI)
import(shiny)

+ 9
- 7
R/ermoji_gadget.R Ver arquivo

@@ -7,18 +7,16 @@
#' @param ... Ignored at this time
#' @name ermoji
#' @return nothing
#' @import shiny
#' @import miniUI
#' @export
ermoji_gadget <- function(clipout = clipr::clipr_available(), ...) {
require(shiny)
require(miniUI)
runGadget(ermoji_ui, ermoji_server(clipout, ...), viewer = paneViewer(500), stopOnCancel = FALSE)
}

#' @rdname ermoji
#' @export
ermoji_shiny <- function(clipout = clipr::clipr_available(), ...) {
require(shiny)
require(miniUI)
shinyApp(ui = ermoji_ui, server = ermoji_server(clipout, ...))
}

@@ -77,8 +75,8 @@ ermoji_server <- function(clipout = clipr::clipr_available()) {
output$emojis <- DT::renderDataTable({
emojis <- emo::jis
emojis <- emojis[, c('emoji', 'name', "group", "keywords", "aliases")]
emojis$keywords <- purrr::map_chr(emojis$keywords, ~ paste(., collapse = ", "))
emojis$aliases <- purrr::map_chr(emojis$aliases, ~ paste(., collapse = ", "))
emojis$keywords <- vapply(emojis$keywords, function(x) paste(x, collapse = ", "), character(1))
emojis$aliases <- vapply(emojis$aliases, function(x) paste(x, collapse = ", "), character(1))
DT::datatable(
emojis,
rownames = FALSE,
@@ -117,7 +115,7 @@ ermoji_server <- function(clipout = clipr::clipr_available()) {
})

this_emoji_html <- reactive({
gsub("([0-9A-F]{4,8}) ?", "&#x\\1;", this_emoji()$runes)
rune2html(this_emoji()$runes)
})

truncate <- function(x, n = 10) {
@@ -177,3 +175,7 @@ escape_html <- function(x) {
x = gsub('"', '&quot;', x)
x
}

rune2html <- function(runes) {
gsub("([0-9A-F]{4,8}) ?", "&#x\\1;", runes)
}

Carregando…
Cancelar
Salvar