Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

venue = "carbon" (or some equivalent) #392

Open
bwiernik opened this issue Aug 27, 2021 · 5 comments
Open

venue = "carbon" (or some equivalent) #392

bwiernik opened this issue Aug 27, 2021 · 5 comments
Labels
feature a feature request or enhancement

Comments

@bwiernik
Copy link

bwiernik commented Aug 27, 2021

I frequently use the Carbon tool (https://carbon.now.sh/) to create images of R code to share on Twitter. Currently, my workflow is to use reprex::reprex() to create the reprex, paste it to https://carbon.now.sh, copy the image from there, and paste the image and alt-text to Twitter. It would be really nice if I could streamline this to directly create a Carbon image with reprex().

There is an R package interface to Carbon carbonate. I tried to use reprex and carbonate together, but I was unable to get the versions of ChromeDriver and chrome.exe inovked by reprex and RSelenium to play well together.

@shannonpileggi
Copy link

Hi! @bwiernik! I was actually just thinking the same thing, but more like venue = "image" or venue = "twitter", without the carbon interface. And agreed, it would be fantastic if the image could come pre-loaded with alt text of the code!

Having the styling options of carbonate on top would be such a nice bonus!

For an example, in this tweet I just took a screenshot of the reprex results and copied and pasted code into alt text.

Lovely reprex developers - please share if there are already other ways to achieve this that I am missing! And thank you for all that you do!

@cderv
Copy link
Contributor

cderv commented Dec 8, 2021

For reference, just to connect the discussion, there was one some time ago about publishing reprex on the web
#190

And also a related dicussion with reprex and carbon.now with the R carbonate package: in yonicd/carbonate#14

Some demos of carbonate + reprex where made in https://github.com/maelle/reprex_demo

It is quite old but always interesting to have previous thoughts and ressources available

@shannonpileggi
Copy link

Thank you for flagging the discussion @cderv! As discussed by @maelle, a URL to a gist that has the code/carbonate image stored as metadata to appear when sharing the link, if possible, would also be a cool solution! The idea of putting code in an image felt a bit off to me.

@jennybc
Copy link
Member

jennybc commented Dec 8, 2021

I'm not working on or thinking about reprex at the moment.

But I've definitely thought about carbon support in the past. It would be really nice, I agree! Unfortunately, the most in-depth discussion I've had around this may have happened in Slack, though, not on GitHub.

One big blocker (or at least turn-off) for me is that, last I checked, the Carbon tool is quite unfriendly for programmatic use. Hence the need for what the carbonate R package is doing. Which is sufficiently 😬 that I've never been eager to pursue this with real vigor.

@jennybc jennybc changed the title venue = "carbon" venue = "carbon" (or some equivalent) Aug 16, 2022
@jennybc jennybc added the feature a feature request or enhancement label Aug 16, 2022
@jennybc
Copy link
Member

jennybc commented Aug 16, 2022

This has been here for a while and it's still a neat idea. If anyone knows of changes in the Carbon situation (ie programmatic access has gotten easier) or of a new, similar tool that is friendly for programmatic access, please comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants