[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste ddfe2c6 015/298: Added dpaste support
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste ddfe2c6 015/298: Added dpaste support |
Date: |
Thu, 9 Dec 2021 18:59:35 -0500 (EST) |
branch: elpa/webpaste
commit ddfe2c67a295a3819f45812312dc3437b017f460
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>
Added dpaste support
---
webpaste.el | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/webpaste.el b/webpaste.el
index fc644b5..10c11eb 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -83,6 +83,30 @@
nil)
+;; Provider for http://dpaste.com/
+(defun webpaste-providers-dpaste.com (text)
+ "Paste TEXT to http://dpaste.com/."
+
+ ;; Prepare post fields
+ (let ((post-data '(("syntax" . "text")
+ ("title" . "")
+ ("poster" . "")
+ ("expiry_days" . "1"))))
+
+ ;; Add text as content
+ (add-to-list 'post-data (cons "content" text))
+
+ ;; Use request.el to do request to dpaste.com to submit data
+ (request "http://dpaste.com/api/v2/"
+ :type "POST"
+ :data post-data
+ :parser 'buffer-string
+ :success
+ (function* (lambda (&key response &allow-other-keys)
+ (webpaste-return-url
+ (request-response-header response "Location"))))))
+ nil)
+
(provide 'webpaste)
;;; webpaste.el ends here
- [nongnu] elpa/webpaste 0423f3f 024/298: Reorder file overall to have autoloads at the end, (continued)
- [nongnu] elpa/webpaste 0423f3f 024/298: Reorder file overall to have autoloads at the end, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 5b34fda 027/298: Rename providers list, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 3d18f0b 028/298: Added code to auto-populate webpaste-provider-priority if needed, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste e1b98bd 032/298: Updated readme, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 25f0b32 033/298: More documentation for webpaste-paste-text function, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 4fb8873 037/298: Changed emacs version requires from 25 to 24, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d4357d7 042/298: Autoload excursion-wrapper as well, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste e579ecb 044/298: Specify parent group, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste aaa690a 016/298: Spelling in comments, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste c298428 043/298: Reset tested-providers list after successful paste, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste ddfe2c6 015/298: Added dpaste support,
ELPA Syncer <=
- [nongnu] elpa/webpaste 9632f3f 026/298: Lines, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 7b0859f 029/298: Populate tested providers list, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste c6eb2a1 031/298: Add error callbacks to try to paste again (to, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste e354e30 034/298: Update commentary, package-version, keywords and readme, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste ac1f772 035/298: Commentary style, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste b2bd161 036/298: Changed keywords for package to match guidelines, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 81d3f9b 038/298: Namespace wrapper for save-mark-and-excursion, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste ba59c4e 039/298: Added comment for checkdock prettyness, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 4459071 040/298: Added description to group, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 6fc4065 041/298: Added install instructions and melpa images, ELPA Syncer, 2021/12/09