blob: afadb0a6054f791a032f8988e47d11374d07d00d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
** Build and Run
There is a =build.lisp= file in this repo, build an executable like so:
#+begin_src shell
sbcl --load build.lisp
#+end_src
Run the pastiche executable like so:
#+begin_src shell
./pastiche /path/to/pastiche.conf
#+end_src
There is an example of what =pastiche.conf= looks like in this directory.
** Using With Emacs
First, this uses ~http-post-simple.el~, a copy of which can be found in the ~emacs/~ subdirectory.
Make sure that is loaded, then:
#+begin_src elisp
(defvar pastiche-paste-url "the real url here")
(defun pastiche-paste-current-buffer ()
(interactive)
(let* ((content
(buffer-string))
(title
(buffer-name))
(result
(http-post-simple
pastiche-paste-url
(list (cons 'title title)
(cons 'content content)))))
(let ((url (first result)))
(kill-new url)
(message url))))
#+end_src
|