Xgist - Xcode extension to send code to GitHub's Gist

Overview

Xgist

Xgist is a Xcode extension to send code to GitHub's Gist. The extension will send your code selection to Gist and automatically copy the Gist URL into your Clipboard.

Be aware that it will replace your current clipboard with the Gist URL!

Authentication (Optional)

By default Xgist will post your gists as anonymous, but once you open the .app you'll see a login form where you can login to your GitHub account and post authenticated gists.

screenshot

After you login you'll need to restart Xcode so it will give you the authenticated gist option

screenshot

Note that Xcode might ask to use your keychain since that's how your GitHub access token is stored.

screenshot

Youtube demo video

screenshot

Installation

Easy way

Thanks to Rambo you can download a signed version of the app here:

After opening it, you might need to go to the system preferences app and enable Xgist plugin.

screenshot screenshot

Manual way

Note that by choosing this way you'll need to create your own GitHub app and add your app ID and Secret into the GitHubCredential.swift file

  1. Clone the repo and open Xgist.xcodeproj;
  2. Enable target signing for both the Application and the Source Code Extension using your own developer ID;
  3. Product > Archive;
  4. Right click archive > Show in Finder;
  5. Right click archive > Show Package Contents;
  6. Open Products/Applications;
  7. Drag Xgist.app to your Applications folder and double click on it;
  8. Xgist macOS app will open and install the extension;
  9. Close Xgist.app
  10. Done.
Comments
  • Keychain access

    Keychain access

    The extension should only ask for keychain access when signing in or if the user has a token stored. Currently it will ask on the first run since GitHubAPI().isAuthenticated is executed to define what options the extension should display to the user on SourceEditorExtension.swift

    opened by Bunn 2
  • Installation Section

    Installation Section

    opened by lfarah 1
  • Sign in with GitHub

    Sign in with GitHub

    Would be good to have an option to sign in on GitHub so the user could choose to save the gists on his/her account instead of always being a anonymous gist.

    This will probably require an macOS app for the settings and actual login

    opened by Bunn 0
  • [Brainstorm] Create snippets from gist

    [Brainstorm] Create snippets from gist

    Xcode save the snippets on this path ~/Library/Developer/Xcode/UserData/CodeSnippets

    And this is a snippet file format:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>IDECodeSnippetCompletionScopes</key>
        <array>
            <string>CodeBlock</string>
        </array>
        <key>IDECodeSnippetContents</key>
        <string>       //CODE GOES HERE
    </string>
        <key>IDECodeSnippetIdentifier</key>
        <string>5B59E4B8-2705-48CF-8104-F2EF4C6F7EE4</string>
        <key>IDECodeSnippetLanguage</key>
        <string>Xcode.SourceCodeLanguage.Objective-C</string>
        <key>IDECodeSnippetTitle</key>
        <string>SPIPPET_TITLE</string>
        <key>IDECodeSnippetUserSnippet</key>
        <true/>
        <key>IDECodeSnippetVersion</key>
        <integer>0</integer>
    </dict>
    </plist>
    

    The app could have a way for the user to select gists from an UI or maybe having some special "tag" on the gists to list as snippets.

    opened by Bunn 0
  • Automatic updates

    Automatic updates

    This is kind of related to #5 : we should add automatic updates to the app. This is kind of problematic because the app is just a container for the Xcode extension, but I think it's doable.

    I always use Sparkle on my apps (no need for a package manager, it works fine with just submodules haha). It only requires a XML file with feed of updates and the binary releases, both can be stored on the repo itself.

    opened by insidegui 1
  • Improve language detection

    Improve language detection

    Currently, the extension uses the content UTI to set the extension of the file on Gist, it would be better to detect the language based on the actual contents of the snippet.

    opened by insidegui 1
Releases(1.3)
Owner
Fernando Bunn
iOS @ DuckDuckGo
Fernando Bunn
SwiftInitializerGenerator - Xcode Source Code Extension to Generate Swift Initializers

Swift Initializer Generator This Xcode Source Code Extension will generate a Swift initializer based on the lines you've selected. Handy if you made a

Bouke Haarsma 718 Aug 21, 2022
XcodeEquatableGenerator - Xcode 8 Source Code Extension will generate conformance to Swift Equatable protocol based on type and fields selection.

Depricated! There is not need for it at the moment as Swift compiler can do that for us ?? Swift Equatable Generator Xcode 8 Source Code Extension wil

null 191 Dec 10, 2022
Import - Xcode extension for adding imports from anywhere in the code ☝️

Import ☝️ Xcode extension for adding imports from anywhere in the code. Now available on App Store Why? Because sometimes you are on 300th line of cod

Marko Hlebar 839 Nov 10, 2022
XShared - Xcode extension that allows you copying the code with special formatting quotes for social (Slack, Telegram)

This extension is for those who like to show code to the public ?? Xcode extension which allows you copying the code with special formatting quotes fo

Nikita Ermolenko 75 Jun 18, 2022
Comment-Spell-Checker - Xcode extension for spell checking and auto-correcting code comments.

Comment Spell Checker An Xcode Source Editor extension that runs spell check and auto correct on your code comments. Features Supports mutliple commen

Velislava Yanchina 157 Aug 28, 2022
CleanClosureXcode - An Xcode Source Editor extension to clean the closure syntax.

Clean Closure - Xcode Source Editor Extension Clean Closure is a simple Xcode Source Editor Extension for Xcode 8. It parses each line of a file to si

Patrick Balestra 188 Jun 18, 2022
Mark - Xcode extension for generating MARK comments.

Mark Xcode extension for automatic generation of MARK comments. Why? If you would like to organize your code with MARK comments, this will save you so

Velislava Yanchina 160 Dec 17, 2022
DocumenterXcode - Attempt to give a new life for VVDocumenter-Xcode as source editor extension.

DocumenterXcode Xcode source editor extension which helps you write documentation comment easier, for both Objective-C and Swift. This project is an a

Serhii Londar 34 Dec 17, 2022
Nef-plugin - 🔌 an Xcode extension to use nef features easily

This project provides an extension for Xcode to integrate some nef features directly in the IDE. Using the core of nef, you can export snippets from y

Bow 188 Dec 23, 2022
Multiliner - An Xcode source extension to expand lengthy lines

Multiliner An Xcode source extension to expand lengthy lines. Super lightweight, 1 file. It expands long lines. That's it! Works with: Initializers Fu

Andrew Zheng 629 Jan 4, 2023
This Xcode plugin shows Xcode app version in the Dock and App Switcher icon

Xcode Icon Version Tired of this Xcode icon always showing multiple times in your App Switch with no help watshoever as to which version you are curre

Stanislas Chevallier 94 Sep 11, 2022
Xcode plugin which help you write code faster.

MLAutoReplace Xcode plugin, Re-Intent, make you write code more quickly. Use a portion code of VVDocumenter-Xcode. ##Overview You can use shortcut key

molon 233 Sep 9, 2022
Snowonder - 🔮 Magical import declarations formatter for Xcode

Snowonder is Xcode Extension that adds some convenient formatting operations for Import Declarations. This extension is created with latest stable Swi

Alexey Karetski 104 Jan 4, 2023
XVim2 - Vim key-bindings for Xcode 9

XVim2 XVim2 is a Vim plugin for Xcode intending to offer a compelling Vim experience without the need to give up any Xcode features. Xcode 9 or above,

null 2.3k Jan 1, 2023
Xcode plugin to let you jump to GitHub History, Blame, PRs, Issues, Notifications of any GitHub repo with one shortcut.

Reveal-In-GitHub Xcode plugin to let you jump to GitHub History, Blame, PRs, Issues, Notifications of current repo in one second. My company work on G

lzwjava 257 May 17, 2022
Plugin for Xcode to integrate the Reveal App to your project automatic.

Reveal-Plugin-for-Xcode Plugin for Xcode to integrate the Reveal App to your project automatic(Without any modifications to your project). Please note

Eric 229 Jun 29, 2022
An Xcode Plugin to upload code snippets directly into Slack and Gist

XCSnippetr Share code snippets to Slack and Gist without leaving Xcode ever again! ?? Features Upload code snippets using Slack's and Github's APIs. T

Ignacio Romero Zurbuchen 100 Nov 29, 2022
A decoupled TestRail integration for your Xcode project to easily send results to TestRail.

(Super Easy) Xcode TestRail Integration This integration helps you to automatically send test results to TestRail. And yes, super easy and simple! Add

Christian 2 Oct 21, 2022
XTextHandler - Xcode Source Editor Extension Tools (Xcode 8 Plugins)

Download Let's Swift! xTextHandler has been rewritten in Swift. The Objective-C version can be found in: https://github.com/cyanzhong/xTextHandler-obj

Ying Zhong (Inactive) 1.5k Sep 7, 2022
A command-line tool and Xcode Extension for formatting Swift code

Table of Contents What? Why? How? Command-line tool Xcode source editor extension Xcode build phase Via Applescript VSCode plugin Sublime Text plugin

Nick Lockwood 6.3k Jan 8, 2023