Code Monkey home page Code Monkey logo

read-only-coding's Introduction

read-only-coding

Automator services to make coding in Xcode easier. Written mostly in AppleScript, the read-only language.

Services

Open Selection in GitHub

If a Git-managed source code file is open in Xcode, this service opens a checked-in copy of the file on GitHub in your default Web browser, with the selected line or lines highlighted. The clone containing the file must have a remote named origin that points to GitHub via HTTPS.

Installation

To install these services:

  1. Download a ZIP of this repository.
  2. Double-click each .workflow bundle and click Install. (Or drop each .workflow bundle into ~/Library/Services/.)

To assign keyboard shortcuts to these services:

  1. Open System Preferences and go to the Keyboard preference pane.
  2. Switch to the Keyboard Shortcuts tab and select Services from the pane on the left.
  3. Select a service and click “add shortcut”.

read-only-coding's People

Contributors

1ec5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

brunogama

read-only-coding's Issues

Error -10000 in Xcode 11

In Xcode 11.0 beta 1, running the “Open in GitHub” service fails with error number -10000. Specifically, this expression fails:

get every source document

Error if remote uses SSH

The Open in GitHub workflow assumes the remote uses an HTTPS URL, which is what GitHub recommends by default. But it should also be possible to ascertain the webpage URL if the remote uses an SSH URL.

Link to specific columns within lines

GitHub’s new code viewing UI supports an alternative URL format for permalinking to specific columns within a line. For example:

https://github.com/maplibre/maplibre-native/blob/749458d6c866223c4966b0c6734b8d5cd8ad9744/platform/ios/platform/darwin/test/MLNExpressionTests.mm#LL1168C81-L1171C50

links to the range from line 1168, column 81 to line 1171, column 50.

The Open in GitHub service should use this format to reflect the more specific selection in Xcode.

Make sure the commit hash is on the origin

The Open Selection in GitHub service assumes the HEAD has been pushed to the origin; otherwise, it leads you to a 404. If HEAD is not in origin, the service should use the latest commit shared in common between the local and the remote.

Quote paths when determining GitHub URL

Thank you for the idea, it would be so great if I could open code-pieces directly via Xcode -> Github.

I get the following warning when trying your script (Via Xcode-> Services -> Open Selection in Github:
screen shot 2018-09-03 at 16 46 57

Error if no remote named origin

Hi, @1ec5!
I'm looking forward to start using your script. But, unfortunately, I can't
Every time I'm trying to use it alert pops-up with text:
There is no application set to open the URL /blob/fc06c53be87c67b74b3dfa14e44356280c54700f/ProjectDir/Flows/Feed/Feed.swift#L12.
Probably I need to setup some bindings for such scheme. Could you help me with that?

Open in GitHub: error when in Version Editor

When Xcode is in the Version Editor, the Open Selection in GitHub service encounters an error:

error "Không thể đổi item 1 of missing value thành loại Unicode text." number -1700 from item 1 of missing value to Unicode text

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.