romainfrancois / css

Licence: other
tidy css manipulation

Programming Languages

C++
36643 projects - #6 most used programming language
r
7636 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to css

tidysq
tidy processing of biological sequences in R
Stars: ✭ 29 (+3.57%)
Mutual labels:  tidy, tibble
broomExtra
Helpers for regression analyses using `{broom}` & `{easystats}` packages 📈 🔍
Stars: ✭ 45 (+60.71%)
Mutual labels:  tidy
iterake
Create weights with iterative raking.
Stars: ✭ 17 (-39.29%)
Mutual labels:  tidy
gtfstidy
A tool for checking, sanitizing and minimizing GTFS feeds.
Stars: ✭ 75 (+167.86%)
Mutual labels:  tidy
furniture
The furniture R package contains table1 for publication-ready simple and stratified descriptive statistics, tableC for publication-ready correlation matrixes, and other tables #rstats
Stars: ✭ 43 (+53.57%)
Mutual labels:  tidy
tidygenomics
Tidy Verbs for Dealing with Genomic Data Frames https://const-ae.github.io/tidygenomics/
Stars: ✭ 97 (+246.43%)
Mutual labels:  tidy
tbltools
🗜🔢 Tools for Working with Tibbles
Stars: ✭ 34 (+21.43%)
Mutual labels:  tibble
datar
A Grammar of Data Manipulation in python
Stars: ✭ 142 (+407.14%)
Mutual labels:  tibble
tv
📺(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.
Stars: ✭ 1,763 (+6196.43%)
Mutual labels:  tibble

Travis-CI Build Status

css

css eases the manipulation of css files with the functions read_css and write_css.

Installation

You can install css from github with:

# install.packages("devtools")
devtools::install_github("romainfrancois/css")

Example

# one rstudio css theme
dracula <- paste0(
  "https://raw.githubusercontent.com/rstudio/rstudio/", 
  "0d9d49aa8671527370c6c261fc031ae8a8081c45/src/gwt/src/",   
  "org/rstudio/studio/client/workbench/views/source/editors/text/themes/dracula.css"
)

# reading it with read_css
data <- read_css(dracula)

# ... now it's a tibble ... 
glimpse(data)
#> Observations: 626
#> Variables: 3
#> $ rule     <chr> ".ace_gutter ", ".ace_gutter ", ".ace_print-margin ",...
#> $ property <chr> "background", "color", "width", "background", "backgr...
#> $ value    <chr> "#282a36", "rgb(144,145,148)", "1px", "#e8e8e8", "#28...
DT::datatable(data)

You can then tidyverse it a bit and then save it back to a file using write_css:

data <- data %>% 
  mutate( value = case_when(
    property == "background-color" ~ "#ff0000", 
    TRUE                           ~ value
  ))

tf <- tempfile()
write_css(data, tf)
writeLines( read_lines(tf, n_max = 10))
#> .ace_bracket  { 
#>    margin: 0 !important ; 
#>    border: 0 !important ; 
#>    background-color: #ff0000 ; 
#>    margin: 0 !important ; 
#>    border: 0 !important ; 
#>    background-color: #ff0000 ;  
#>  }
#> .ace_comment  { 
#>    color: #6272a4 ;
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].