Giter Site home page Giter Site logo

kaca's Introduction

kaca: RStudio Addin to Insert Pictures and Links from clipborad

kaca

In short, this package mainly contains two functions, kaca(sound of the camera shutter) and kada(sound of the camera rotation wheel), kaca is used to capture and insert the picture or link in the clipboard, and kada is used to switch the shutter mode.

Usage

kaca is a Rstudio addin, it is best to configure the shortcut keys for kaca and kada. Here I set the shortcut keys for kaca is Ctrl+Shift+Alt+C, and for kada it is Ctrl+Shift+Alt+D.

The first time we use it, we need to set the default storage folder via setPicTmpDir. This function will set the default path via options() and write the default path to .Rprofile.

setPicTmpDir("Your Temp Dir")

Then, we can take a screenshot, record a screen, or copy an image, or copy a link to an image. With just one kaca, the image can be automatically saved and a reference could be inserted into the document you are editing.

knitr::include_graphics('utils/images/screenshot1.gif')

For GIFs, whether gif or webp, copying the image directly is always unsatisfactory, and copying a web or local link is a good idea.

knitr::include_graphics('utils/images/screenshot2.gif')

For those who are strict with their work environment, we also provide four modes for managing pictures.

  • AutoMode: the automatic mode, images are stored in the default path with randomly generated file names
  • ManuMode: the manual mode. You need to manually provide the file name and path
  • SemiMode: the semi-automatic, which remembers the path provided in the last manual mode, but a file name is still needed
  • TextMode: Insert a link, if we know the link of an image, it is not necessary to download it

Plan

Currently kaca only supports windows platforms and does bad for relative paths support In the future, I will study python’s PIL project and explore how to support multiple platforms.

It’s just a toy for now, and the function is not complete. In the near future, I’ll add a small dashboard using shiny for more handy options in both ManuMode and SemiMode.

kaca's People

Contributors

vinnish-a avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

permishen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.