[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste 2dc2206 126/298: Added github anonymous gists as
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste 2dc2206 126/298: Added github anonymous gists as provider. This fixes #8. |
Date: |
Thu, 9 Dec 2021 18:59:58 -0500 (EST) |
branch: elpa/webpaste
commit 2dc220686e92ab0c2cadc98fa055a38da40b37ab
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>
Added github anonymous gists as provider. This fixes #8.
---
README.org | 3 ++-
webpaste.el | 22 +++++++++++++++++++---
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
index 760b1e3..b1c8b0c 100644
--- a/README.org
+++ b/README.org
@@ -22,7 +22,7 @@ easiest way to install and configure packages.
("C-c C-p C-r" . webpaste-paste-region)))
#+END_SRC
-** TODO Providers to implement [5/8]
+** TODO Providers to implement [6/9]
- [X] ptpb.pw
- [X] ix.io
- [X] dpaste.com
@@ -31,3 +31,4 @@ easiest way to install and configure packages.
- [ ] paste.pound-python.org
- [ ] paste.debian.net
- [ ] bpaste.net
+ - [X] gist.github.com
diff --git a/webpaste.el b/webpaste.el
index 70320f5..b2053aa 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -7,7 +7,7 @@
;; Package-Version: 1.2.1
;; Version: 1.2.1
;; Keywords: convenience, comm, paste
-;; Package-Requires: ((emacs "24.4") (request "0.2.0") (cl-lib "0.5"))
+;; Package-Requires: ((emacs "24.4") (request "0.2.0") (cl-lib "0.5") (json
"1.4"))
;;; Commentary:
@@ -36,6 +36,7 @@
;;; Code:
(require 'request)
(require 'cl-lib)
+(require 'json)
@@ -98,7 +99,6 @@ each run.")
post-data)
"Predefined lambda for building post fields.")
-
(cl-defun webpaste-provider (&key uri
@@ -196,7 +196,23 @@ Optional params:
("format" . "url")
("expires" . 86400))
:post-field "content"
- :success-lambda webpaste/providers-success-returned-string)))
+ :success-lambda webpaste/providers-success-returned-string))
+
+ ("gist.github.com"
+ ,(webpaste-provider
+ :uri "https://api.github.com/gists"
+ :post-field nil
+ :post-field-lambda (lambda (text post-field post-data)
+ (json-encode `(("description" . "Pasted from Emacs
with webpaste.el")
+ ("public" . "true")
+ ("files" .
+ (("file.txt" .
+ (("content" . ,text))))))))
+ :success-lambda (cl-function (lambda (&key data &allow-other-keys)
+ (message "fubar")
+ (when data
+ (webpaste-return-url
+ (cdr (assoc 'html_url
(json-read-from-string data))))))))))
"Define all webpaste.el providers.
Consists of provider name and lambda function to do the actuall call to the
- [nongnu] elpa/webpaste 6e116ea 166/298: Merge branch 'refactor-away-defvars', (continued)
- [nongnu] elpa/webpaste 6e116ea 166/298: Merge branch 'refactor-away-defvars', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 1677cd2 171/298: Added stuff to Makefile to run integration tests, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 51a6a07 174/298: Fixed broken message format, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 6086556 180/298: Added integration tests for dpaste.com, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 44364f4 109/298: Rename parameter domain to uri for webpaste-provider, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 1a1144f 110/298: Exposed sync parameter of request for debugging/test purposes, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d9529de 112/298: Replaced (if (eq VAR nil)) with (unless VAR), ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 1bfa9ec 120/298: Bump version for stable release and copyright year, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 6ea53d0 123/298: Added support for custom handler of how to build the post data for providers, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste aff4e42 124/298: The error-lambda now has a default value and is now optional, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 2dc2206 126/298: Added github anonymous gists as provider. This fixes #8.,
ELPA Syncer <=
- [nongnu] elpa/webpaste b3bcde1 128/298: Updated some docs that was missed before release..., ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 0fa48e2 129/298: Switch github pastes to not be public. This fixes #9., ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 4e58b0a 131/298: Fix bug in link returned from dpaste.de, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste b35b30d 134/298: Added documentation for how to configure provider priority, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 70e8fd0 135/298: Bump version for new release, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste b03b90f 138/298: Add confirmation dialog of paste, before pasting, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste f0a36e2 140/298: Added some docs of how to enable the confirmation dialog before pasting, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 272757b 056/298: Change documentation string, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 58f66ef 069/298: Bump version to prepare for melpa stable, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 6e34759 072/298: Added another privider to list to implement, ELPA Syncer, 2021/12/09