Skip to content
/ octolo Public

Octo To Local, Open files with local editor from GitHub web.

License

Notifications You must be signed in to change notification settings

rail44/octolo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Octolo

Build Status crates.io

Octo To Local, Open files with local editor from GitHub web.

Supported Platforms

Operating Systems

  • Linux
  • Mac OS

Editors

  • Neovim
  • Visual Studio Code
  • JetBrains IDEs

And, you can execute any command with editor kind cmd .

Browsers

  • Firefox
  • Chrome
  • Chromium

note: Although not well tested, Opera, Edge and Vivaldi may run with configuration that same as Chrome.

Installation

Install Native Application

Because we use Native Messaging API, you should install native application.

with curl

Executable binary is available for each releases.

for Linux
# In any directory conteined in $PATH
$ curl -Lo octolo https://github.com/rail44/octolo/releases/latest/download/octolo-x86_64-unknown-linux-musl
$ chmod a+x octolo
for Mac OS
# In any directory conteined in $PATH
$ curl -Lo octolo https://github.com/rail44/octolo/releases/latest/download/octolo-x86_64-apple-darwin
$ chmod a+x octolo

with Cargo

$ cargo install octolo

Configuration

Create ~/.config/octolo/octolo.toml like bellow.

# Comment out browsers your using
browser_list = [
    # "Firefox",
    # "Chromium",
    # "Chrome"
]

# If you have configuration ghq.root, Octolo will use it as default
# root = "/home/john/src"

# path = github.com/{{user}}/{{repository}}

# Use configurations for editor your using
[[editors]]
kind = "neovim"
# The address that nvim listening. By default, Octolo uses $NVIM_LISTEN_ADDRESS 
# address = "" 

[[editors]]
kind = "visual-studio-code"
bin = "/usr/local/bin/code" # Path of $(which code)

[[editors]]
kind = "jetbrains-ide"
name = "IntelliJ IDEA" # or "PHPStorm", "RubyMine" ... 
bin = "/usr/local/bin/idea" # Path of $(which idea)

# Or, you can execute any commands.
# cmd should be defined with handlebars syntax.
[[editors]]
kind = "cmd"
cmd = [
    "your-favorite-cli",
    "-f {{path}}",
    "-l {{line}}"
]

Once creating configuration, run bellow

$ octolo cofig dump
# Dump full config with optional fields...

$ octolo manifest
# Dump Native Messaging Manifests for each browsers

$ octolo manifest -w
# And place it!

Manifests contains absolute path for octolo. When you change location of it, you should redo above.

Install WebExtension

Firefox: https://addons.mozilla.org/ja/firefox/addon/octolo/
Chrome: https://chrome.google.com/webstore/detail/octolo/igdmgdknajejkdpaonpnpjedakhppiob

Then, you can open files by right-click menu from GitHub Web!

Bulid

WebExtension

# In `extension` dir
$ npm install
$ npm run build

Native

# In `native` dir
$ cargo build