Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yonicd/carbonace
convert ace editor as high resolution images to share
https://github.com/yonicd/carbonace
ace-editor r shiny
Last synced: 27 days ago
JSON representation
convert ace editor as high resolution images to share
- Host: GitHub
- URL: https://github.com/yonicd/carbonace
- Owner: yonicd
- License: other
- Created: 2020-04-24T09:27:46.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-04T10:52:28.000Z (over 4 years ago)
- Last Synced: 2024-08-13T07:14:58.618Z (3 months ago)
- Topics: ace-editor, r, shiny
- Language: R
- Homepage:
- Size: 1.41 MB
- Stars: 22
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - yonicd/carbonace - convert ace editor as high resolution images to share (R)
README
# carbonace
Wanna tweet a pretty screenshot of your code like the pros?
Script inspired from @nujcharee baby :shark: loop [tweet](https://twitter.com/Nujcharee/status/1102607275989049346) ht @maelle
**What it is**:
A shiny app that converts the ace editor as high resolution images to share that are as pretty and crisp as [carbon](https://carbon.now.sh/), but simplified for `R`! The app is built on top of a more general package that can snap images of any element in a shiny app called [snapper](https://github.com/yonicd/snapper).
**Pluses**:
- Do not have to be online
- Do not have to go to a specific site
- Host locally with your own R installation
- Seamlessly move from source editor to image**Minuses**:
- ace (via [shinyAce](https://github.com/trestletech/shinyAce)) can manipulate less features than [carbon](https://carbon.now.sh/)
## installation
```r
remotes::install_github('yonicd/carbonace')
```## How to Run
### Rstudio Addin
Highlight text in source editor and then invoke the carbonace addin.
The highlighted text will be used as the initial value
### Console
```r
library(carbonace)
``````{r}
carbonace()
``````r
init <- "family <- c('Baby','Mommy','Daddy','Grandma','Lets go hunt')for(f in family){
if(grepl('hunt',f)){
print(sprintf('%s!',f))
}else{
print(sprintf('%s shark doo doo doo doo!',f))
}
}# [1] 'Baby shark doo doo doo doo!'
# [1] 'Mommy shark doo doo doo doo!'
# [1] 'Daddy shark doo doo doo doo!'
# [1] 'Grandma shark doo doo doo doo!'
# [1] 'Lets go hunt!'"carbonace(init = init)
```Changing the mode (language)
Changing the theme