Git Product home page Git Product logo

bhanditz / xopen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cran/xopen

0.0 2.0 0.0 12 KB

:exclamation: This is a read-only mirror of the CRAN R package repository. xopen — Open System Files, 'URLs', Anything. Homepage: https://github.com/r-lib/xopen#readme Report bugs for this package: https://github.com/r-lib/xopen/issues

License: Other

R 17.63% Shell 82.37%

xopen's Introduction

xopen

Open System Files, URLs, Anything

Linux Build Status Windows Build status CRAN RStudio mirror downloads

Cross platform solution to open files, directories or URLs with their associated programs. Inspired by shell.exec(), https://github.com/pwnall/node-open and https://github.com/sindresorhus/opn

Installation

Once released, you can install xopen from CRAN:

install.packages("xopen")

Usage

library(xopen)

Open a file:

xopen("test.R")

Open a URL:

xopen("https://ps.r-lib.org")

URL with given app:

chrome <- function() {
  switch(
    get_os(),
    win = "Chrome",
    macos = "google chrome",
    other = "google-chrome")
}
xopen("https://processx.r-lib.org", app = chrome())

Open a given app (or switch to it, if already open):

xopen(app = chrome())

App and arguments. (You need to quit Chrome for this to work):

xopen(app = c(chrome(), "--incognito", "https://github.com"))

License

MIT © RStudio

xopen's People

Contributors

gaborcsardi avatar

Watchers

James Cloos avatar  avatar

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.