Giter Site home page Giter Site logo

scpaste's Introduction

SCPaste

This will place an HTML copy of a buffer on the web on a server to which the user has SSH access.

It's similar in purpose to services such as Gist or Pastebin, but it's much simpler since it assumes the user has an account on a publicly-accessible HTTP server. It uses scp as its transport and uses Emacs' font-lock as its syntax highlighter instead of relying on a third-party syntax highlighter for which individual language support must be added one-by-one.

Requires htmlize library.

Configuration

You'll need to configure your destination:

(setq scpaste-http-destination "https://p.hagelb.org"
      scpaste-scp-destination "p.hagelb.org:p.hagelb.org")

scpaste-scp-destination should be an scp-accessible directory that is also served over HTTP. scpaste-http-destination should be the URL that corresponds to that directory.

Optionally you can set the displayed name and where it should link to:

(setq scpaste-user-name "Technomancy"
      scpaste-user-address "https://technomancy.us/")

You probably want to set up SSH keys for your destination to avoid having to enter your password once for each paste. Also be sure the key of the host referenced in scpaste-scp-destination is in your known hosts file--scpaste will not prompt you to add it but will simply hang.

Usage

M-x scpaste, (or scpaste-region) enter a name, and press return. The name will be incorporated into the URL by escaping it and adding it to the end of scpaste-http-destination. The URL for the pasted file will be pushed onto the kill ring.

Two files will be uploaded: the HTML version as well as the raw version. The HTML version simply has ".html" on the end of the name, and it includes a link to the raw version at the bottom.

You can autogenerate a splash page that gets uploaded as index.html in scpaste-http-destination by invoking M-x scpaste-index. This will upload an explanation as well as a listing of existing pastes. If a paste's filename includes "private" it will be skipped.

Copyright

Copyright © 2008-2018 Phil Hagelberg and contributors. Distributed under the same terms as GNU Emacs.

scpaste's People

Contributors

jehops avatar justinabrahms avatar mattdeboard avatar profpatsch avatar shoover avatar technomancy avatar thblt avatar

Watchers

 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.