Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
80ca574
tiny changes to unbreak
Apr 4, 2023
486bd8b
readme notice
Apr 4, 2023
21b2b7e
I had some issues with view-post-at-point and reblog-post-at-point an…
Jul 7, 2023
cf80d98
I got errors in the json processing; a bit of brute force, change (se…
Jul 7, 2023
e65e3c8
Merge pull request 'three fixes in total. view-post-at-point and reb…
Jul 17, 2023
164084d
add a function in the api to list out all notifications, and provide …
Aug 18, 2023
f39e683
add a function in the api to list out all notifications, and provide …
Aug 18, 2023
3842e96
do not list out the question in the header, do not change the face
Aug 18, 2023
bc29755
no more extra newline after the subtitle asks:, identation at 32 inst…
Aug 18, 2023
1190772
key "a" will get us the list of notifications
Aug 18, 2023
2b1c07d
Notifications in a seperate let block with font-lock-comment-face
Aug 18, 2023
3ce9841
my modifications to reblog-post-at-point and view-post-at-point
Aug 18, 2023
5c71752
Merge pull request 'list out all notifications (it's called activity …
Aug 18, 2023
b8e282a
Update the README.md file with a screenshot
Aug 18, 2023
9ad0c50
The full url of the image
Aug 18, 2023
e420093
Merge pull request 'update the README.md file' (#4) from gargle/tumbl…
Aug 18, 2023
56953dc
show the tags of a post
Aug 18, 2023
94aa035
Merge branch 'fix' of https://codeberg.org/gargle/tumblesocks into fix
Aug 18, 2023
acdca29
Merge pull request 'show tags' (#5) from gargle/tumblesocks:fix into fix
Aug 18, 2023
2482fb7
no more commas between tags, and no : after the blog name
Aug 18, 2023
604f7fa
a new image for the readme file
Aug 18, 2023
158c213
Merge pull request 'a new image' (#6) from gargle/tumblesocks:fix int…
Aug 18, 2023
3138f12
a divider line between each post and each notification
Aug 18, 2023
85aadef
a divider line between each post and each notification
Aug 18, 2023
1cb60c7
Merge pull request 'a dividing line between posts and between notific…
Aug 18, 2023
4307061
remove extra newline after the tags
Aug 18, 2023
ab4f652
Merge pull request 'remove extra newline after the tags' (#8) from ga…
Aug 18, 2023
f049cd6
a new image
Aug 18, 2023
e8247c6
a new image
Aug 18, 2023
2943ed1
Merge pull request 'last time I change the image' (#9) from gargle/tu…
Aug 18, 2023
fff776d
change the timestamp of notifications so that the timezone is gone
Aug 19, 2023
de1aa30
Merge pull request 'My first release; a new layout, better I think, a…
Aug 19, 2023
41ae6a7
A modified README
Aug 19, 2023
0e52f0f
A modified README
Aug 19, 2023
dbfbc39
A modified README, wrong image!
Aug 19, 2023
08fea8b
Merge pull request 'My first 'release'' (#11) from gargle/tumblesocks…
Aug 19, 2023
6186b65
Add my name and copyright to the code
Aug 19, 2023
f93ae7d
Merge branch 'master' of https://codeberg.org/martianh/tumblesocks
Aug 19, 2023
b956bce
my email is johan.laenen+codeberg@gmail.com
Aug 19, 2023
f7b0284
do not show the caption because it would appear twice
Aug 21, 2023
a0a72f1
date and time for notifications in the locale format
Aug 21, 2023
5384204
Merge pull request 'My first hotfix. Do not show the caption as it w…
Aug 21, 2023
ec0cfcf
use %c instead of %x %X for the date and time in notifications
Aug 22, 2023
02c130e
Merge pull request 'use %c instead of %x %X for the date and time in …
Aug 22, 2023
c6b667b
show the title in bold and highlighted if it exists, and show the tim…
Aug 22, 2023
16c1556
show the title on the same line as the blogname, with a : to seperate…
Aug 22, 2023
55bb6b5
try to list out our notifications as raw instead of html
Aug 28, 2023
56f6663
eln-cache still has make-oauth-t and make-oauth-access-token in my .e…
Aug 29, 2023
8b748e0
update the version numbers of our dependencies as of 30/08/2023
Aug 30, 2023
4d329e3
make the separator line between posts fill the (frame-width) and inse…
Sep 7, 2023
01f03a9
we use markdown-mode 20230830.1338 now
Sep 7, 2023
1eaa6bd
this is tumblesocks v1.1.8
Sep 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@

tumblesocks - un-break it fork
==============================

`tumblesocks.el` old, crazy, messy, awesome, abandoned, and broken, and it depends on `emacs-oauth`,
which is much the same. each file has about 70 `flycheck` errors in it. But it also fucking rocks.

So this repo adds patches that people have shared online for un-breaking `tumblesocks.el`.

A patched version of ye olde `emacs-oauth` is also needed. It's here: https://codeberg.org/martianh/emacs-oauth.

If you try these out, I'd recommend you remove all trace of any other versions.

Further patches are most welcome.



Modified README
===============

`tumblesocks-mode` - Tumblr Support for Emacs
=============================================
<!-- ![http://i.imgur.com/WW6Qo.png](http://i.imgur.com/WW6Qo.png) -->
![http://i.imgur.com/9wroS.png](http://i.imgur.com/9wroS.png)
This is how tumblesocks looks now:

![https://i.ibb.co/9WYG2mB/xwd.jpg](https://i.ibb.co/9WYG2mB/xwd.jpg)

Tumblesocks is an Emacs tumblr client. With it, you can write posts,
check your dashboard, and view blogs and notes.
Expand Down Expand Up @@ -34,6 +56,9 @@ Managing your posts:
* **d: Delete** the post under the cursor. (This only works if you made that post.)
* **e: Edit** the post under the cursor. (This only works if you made that post.)

View activity
* **a: Notifications** shows you your Notifications (likes, reblogs, milestones, replies.) `tumblesocks-view-notifications` works as well.

Installing
----------

Expand Down
30 changes: 22 additions & 8 deletions tumblesocks-api.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
;; tumblesocks-api.el -- functions for talking with tumblr
;; Copyright (C) 2012 gcr
;; Copyright (C) 2023 gargle

(require 'oauth)
(require 'json)
Expand Down Expand Up @@ -65,10 +66,10 @@ call `tumblesocks-api-reauthenticate' after this."
(if (string-match "\\([^:]*\\):\\(.*\\)"
(buffer-substring (point-min) (point-max)))
(setq tumblesocks-token
(make-oauth-access-token
(oauth-access-token--create
:consumer-key tumblesocks-consumer-key
:consumer-secret tumblesocks-secret-key
:auth-t (make-oauth-t
:auth-t (oauth-t--create
:token (match-string 1 str)
:token-secret (match-string 2 str))))))
(kill-this-buffer)))
Expand Down Expand Up @@ -136,7 +137,7 @@ error if the error code is not in the 200 category."
tumblesocks-token
(concat url "?api_key=" tumblesocks-consumer-key
(mapconcat
'(lambda (x)
#'(lambda (x)
(concat "&" (url-hexify-string (format "%s" (car x)))
"=" (url-hexify-string (format "%s" (cdr x)))))
(tumblesocks-plist-to-alist params) "")))
Expand All @@ -151,7 +152,7 @@ error if the error code is not in the 200 category."
(with-current-buffer (url-retrieve-synchronously
(concat url "?api_key=" tumblesocks-consumer-key
(mapconcat
'(lambda (x)
#'(lambda (x)
(concat "&" (url-hexify-string (format "%s" (car x)))
"=" (url-hexify-string (format "%s" (cdr x)))))
(tumblesocks-plist-to-alist params) "")))
Expand All @@ -168,7 +169,7 @@ error if the error code is not in the 200 category."
(with-current-buffer
(oauth-post-url
tumblesocks-token url
(mapcar '(lambda (x)
(mapcar #'(lambda (x)
(cons (format "%s" (car x))
(format "%s" (cdr x))))
(tumblesocks-plist-to-alist params)))
Expand All @@ -180,8 +181,8 @@ returning JSON or signaling an error for other requests."
(decode-coding-region (point-min) (point-max) 'utf-8-dos)
;; the following copied from url.el
(goto-char (point-min))
(skip-chars-forward " \t\n") ; Skip any blank crap
(skip-chars-forward "HTTP/") ; Skip HTTP Version
(skip-chars-forward " \t\n") ; Skip any blank crap
(skip-chars-forward "HTTP/") ; Skip HTTP Version
(skip-chars-forward "[0-9].")
(let ((pointpos (point))
(code (read (current-buffer))))
Expand All @@ -194,7 +195,9 @@ returning JSON or signaling an error for other requests."
(error (buffer-substring pointpos
(line-end-position))))
(t
(search-forward-regexp "^$" nil t)
;; brute force and ignorance
(search-forward-regexp "^{" nil t)
(previous-line)
;; body
(let* ((json-response (buffer-substring (1+ (point)) (point-max)))
(json-object-type 'plist)
Expand Down Expand Up @@ -258,6 +261,17 @@ returning JSON or signaling an error for other requests."
(tumblesocks-api-http-oauth-post (tumblesocks-api-url "/user/unlike")
`(:id ,id :reblog_key ,reblog_key)))

(defun tumblesocks-api-blog-notifications (&optional limit offset)
"Retrieve the activity items for a specific blog, in reverse chronological order, newest first"
(unless tumblesocks-blog (error "Which blog? Please set `tumblesocks-blog'"))
(let ((args (append
(and limit `(:limit ,limit))
(and offset `(:offset ,offset)))))
(tumblesocks-api-http-oauth-get
(tumblesocks-api-url "/blog/"
tumblesocks-blog
"/notifications") args)))

(defun tumblesocks-api-blog-info ()
"Gather information about the blog listed in
`tumblesocks-blog'."
Expand Down
4 changes: 2 additions & 2 deletions tumblesocks-compose.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
;; Tumblr compose mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defvar tumblesocks-compose-finish-action
'(lambda () (call-interactively 'tumblesocks-text-post-from-buffer))
#'(lambda () (call-interactively 'tumblesocks-text-post-from-buffer))
"The action to run when finishing posting")
(defvar tumblesocks-compose-continuation nil
"Optional action to run when finishing editing or posting.
Expand Down Expand Up @@ -38,7 +38,7 @@ tumblesocks-view uses this to refresh buffers, for example.")
"Major mode for composing a new Tumblr post."
(make-local-variable 'tumblesocks-compose-finish-action)
(setq tumblesocks-compose-finish-action
'(lambda () (call-interactively 'tumblesocks-text-post-from-buffer)))
#'(lambda () (call-interactively 'tumblesocks-text-post-from-buffer)))
(make-local-variable 'tumblesocks-compose-editing-args)
(make-local-variable 'tumblesocks-compose-editing-id)
(make-local-variable 'tumblesocks-compose-continuation))
Expand Down
8 changes: 4 additions & 4 deletions tumblesocks-pkg.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(define-package "tumblesocks" "0.0.6"
(define-package "tumblesocks" "1.1.8"
"An Emacs tumblr client."
'((htmlize "1.39")
(oauth "1.0.3")
(markdown-mode "1.8.1")))
'((htmlize "20210825.2150")
(oauth "20230706.2026")
(markdown-mode "20230830.1338")))
5 changes: 4 additions & 1 deletion tumblesocks-user.el
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ the user what to do for each post."
"Blog URL to unfollow (TAB to complete): "
(let ((bloglist (plist-get (tumblesocks-api-user-following)
:blogs)))
(mapcar '(lambda (blog)
(mapcar #'(lambdao (blog)
(plist-get blog :url))
bloglist))
nil t)))
Expand Down Expand Up @@ -85,3 +85,6 @@ the user what to do for each post."
"Create a new Tumblr markdown text post from the current buffer, returning the ID and copying the URL to the clipboard."
(interactive "sTitle: \nsTags (optional, comma separated): ")
(tumblesocks-text-post-from-region (point-min) (point-max) title tags))

(provide 'tumblesocks-user)
;;; tumblesocks-user.el ends here
Loading