Giter Club home page Giter Club logo

tumblesocks's Introduction

tumblesocks-mode - Tumblr Support for Emacs

http://i.imgur.com/9wroS.png

Tumblesocks is an Emacs tumblr client. With it, you can write posts, check your dashboard, and view blogs and notes.

Viewing blogs

The main entry point is tumblesocks-view-dashboard, which will open up a list of posts from your dashboard.

Use these keys to jump around:

  • n and p: Move quickly to the next and previous posts
  • q: Quit; go back to what you were doing before.

Visiting each post:

  • l: Like the post underneath the cursor. Use C-u l to unlike it.
  • f: Follow whichever blog wrote the post underneath the cursor. Use C-u f to unfollow the blog.
  • o: Open the post underneath the cursor in your web browser.
  • y: Yank the URL of the post underneath the cursor to the kill ring/clipboard.

Switching views:

  • s: Search for posts with a certain tag.
  • b: Visit Blog: Show a list of posts from a certain blog.
  • Enter: Open the post underneath the cursor in a new page, showing its notes.
  • g: Refresh the current view (download new posts)

Managing your posts:

  • r: Reblog the post under the cursor. This function will prompt you for extra comments to add.
  • c: Compose new post. Once you are finished writing your post, use C-c C-c to submit it. Markdown syntax is supported.
  • 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.)

Installing

If you have Emacs 24, you can install Tumblesocks from Marmalade the easy way by inserting the following into your emacs.d:

(setq package-archives
  '(("gnu" . "http://elpa.gnu.org/packages/")
    ("marmalade" . "http://marmalade-repo.org/packages/")))

Then, run M-x package-install tumblesocks, kick back, and skip to the next section.

If you instead want to add Tumblesocks to your Emacs manually, you must have these dependencies:

Add all of that to your load-path, and make sure (require 'tumblesocks) doesn't complain.

If you're on Windows, you may need extra libraries; see this ticket for details. In short:

If you're on Linux, you shouldn't have these problems.

How to connect Tumblesocks to your tumblr account

The first time you use Tumblesocks, you mist connect Emacs to your tumblr account. This process is a bit convoluted, but you only have to do it once.

First, add the following to your .emacs:

(require 'tumblesocks)
(setq tumblesocks-blog "YourBlogName.tumblr.com")

Apply the changes, either by running M-x eval-buffer or by restarting Emacs.

Then, run M-x tumblesocks-api-test-auth to connect Emacs to your Tumblr account.

Tumblr will open a webpage asking for access. Once you click Accept, you will receive a very long code. Copy+paste that back into your Emacs prompt (you can also use middle-click to do this).

If everything goes right, you will see a message like this in your minibuffer:

Hello, sneakygcr! Tumblesocks is working properly.

Troubleshooting

If anything goes wrong (typically "401 Not Authorized" errors), you can ask Tumblesocks to forget your key by issuing M-x tumblesocks-api-forget-authentication. Then use M-x tumblesocks-api-test-auth again to reconnect your Emacs to your Tumblr account.

If it won't authorize in the first place and just says "Looks like something broke." it might be the OAuth package wasn't configured. Try to see if the variable oauth-nonce-function is set, if not add (setq oauth-nonce-function 'oauth-internal-make-nonce) to your .emacs.

Other "advanced" commands

If you have gumption, try these out:

  • tumblesocks-text-post-from-region: Instantly create a post with the contents of region.
  • tumblesocks-text-post-from-buffer: Instantly create a post from the entire buffer
  • tumblesocks-compose-new-from-region: Open a buffer and start writing a new post. The contents of region will be copied over.
  • tumblesocks-compose-new-from-highlighted-region: Open a buffer and start writing a new post. The contents of region will be syntax-highlighted and copied into the post as formatted HTML. This is super-useful for including source code into your tumbles.
  • tumblesocks-compose-insert-highlighted-region: Insert the syntax-highlighted region at the end of post you're currently writing.

tumblesocks's People

Contributors

dcreemer avatar gcr avatar gempesaw avatar matthewdarling avatar purcell avatar tarsius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tumblesocks's Issues

Please use an established license

The tools that I use to extract license information do not recognize the contents of you LICENSE file. I need to do this because I have to make sure that the license is compatible with Emacs' GPLv3 so that I can continue to distribute it on the Emacsmirror.

If this is some established license, then please remove your customizations so that tools can recognize it again (and tell me what the license is). Otherwise please use an established license. It appears that a MIT or BSD license might work for you. If you choose to use one of these licenses ease copy the exact text from https://en.wikipedia.org/wiki/MIT_License or https://en.wikipedia.org/wiki/BSD_licenses.

Thanks!

another fork with fixes

Hello @gcr.

I forked https://codeberg.org/martianh/tumblesocks into https://codeberg.org/gargle/tumblesocks and made some changes to your code to make it work with oauth again. I also changed the layout, added #tags to posts, and I added a 'tumblesocks-view-notifications'. I added a copyright comment in tumblesocks.el, tumblesocks-api.el, and tumblesocks-view.el with my handle 'gargle' and I added myself as an 'author' in tumblesocks.el.

Everything seems to work so I tagged my changes as v1.1 and 'released' them on codeberg.org. I merged my changes in the master branch of https://codeberg.org/martianh/tumblesocks. I was under the impression that https://codeberg.org/martianh/tumblesocks was the new canonical repository, but I am wrong, am I not?

Let me know if you agree/disagree with those copyright messages. I'd like to see my changes appear in the offical elpa repository. Tell me if I have to change anything.

I use tumblesocks to read tumblr because of the wider format of the posts. I also like to post some new material and being able to use emacs is a great win for me.

Perhaps more development is needed, but right now everything seems to be to my liking. If anything crops up a new branch will be in order.

Submitting composed posts throws an error

After figuring out why authentication didn't work after restarting emacs, I attempted to compose a tumblr post. C-c C-c prompted me for a title and tags, then it gives me following error: Wrong type argument, char-or-string-p, published. I'm using Emacs 24 on Arch with tumblesocks installed from MELPA (because Marmalade isn't up at the moment) and know too little about Emacs and Elisp to debug everything myself.

edit: With a little bit of research I figured out that using (setq tumblesocks-post-default-state "ask") works, (setq tumblesocks-post-default-state "published" doesn't. It would be still worth investigating why the default setting is broken for me.

Setup not working

Having set the relevant variable for my blog, I can't seem to get tumblesocks-api-test-auth to complete using Emacs 24.1 on either Windows 7 or Ubuntu 12.04. I don't know enough about Emacs Lisp to really debug the issue, but I also tried the changes mentioned here and it didn't help.

Sorry this isn't particularly helpful; I keep trying to step through the code to find where the error occurs, but as soon as something goes wrong, the backtrace disappears and I get the "something didn't work, retry? y/n" prompt. So I keep passing it by accident and not noticing where the real error is.

If you've got any suggestions for an easy solution/how to start investigating, I'd be happy to try it.

tumblesocks-api-process-response: 400 Bad request

After writing down fairly lengthy post about how I managed to get Tumblesocks work on my current setup, I tried to submit this post using C-c C-c command,
after entering the title of the post as well as the tags and pressing RET key the minibuffer returned:

tumblesocks-api-process-response: 400 Bad request

This issue doesn't happen when you're trying to make relatively short posts like this one, however this post in particular had about 95 lines. I ended up having to copy-paste it into tumblr's web interface turn on markdown mode and do some minor edits, which kinda beats the point of using emacs/tumblesocks in the first place ._.

After sorting out the problems with oauth (modifying oauth.el as described on Issue #3 ) and managing to link tumblesocks to my tumblr, this next problem is really frustrating.
My setup is following:

  • Windows 7 HP 64-bit
  • GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)
  • tumblesocks 0.0.7
  • oauth 1.0.3
  • htmlize 1.39
  • markdown-mode 2.0
  • json 1.4

Typo in buffer title

When editing a post and invoking ido-switch-buffer for example, the title shows up as *Tumblr: Ediitng <insert title>*. It seems like line 125 in tumblesocks-compose.el is the culprit, but fixing the typo and doing a byte-recompile didn't have any effect.

Symbol's function definition is void: nil

I am trying to use tumblesocks in Mac OSX 10.9, and
followed instructions to install and configure. It successfully
gets authorized from tumblr, but when I do m-x tumblesocks-view-dashboard,
emacs gives an error:

Symbol's function definition is void: nil

Any idea?

Liking and reblogging of dashboard view posts impossible

To be able to like and reblog posts from the dashboard, I have to install this advice:

(defadvice tumblesocks-api-blog-posts (around rrix/hack-tumblesocks-api)
  "Hack the tumblesocks API to properly work on the dashboard"
  (let* ((post-data (get-text-property (point) 'tumblesocks-post-data))
         (blog-name (plist-get post-data :blog_name))
         (tumblesocks-blog (concat blog-name ".tumblr.com")))
    ad-do-it))
(ad-activate 'tumblesocks-api-blog-posts)

It pulls the post name out of tumblesocks-post-data, which I feel is the sane way to do it, generally, but then it just binds on top of tumblesocks-blog.

Post video supported?

Hello,

Is it possible to post embedded video with tumblesocks? I've tried using embed code but was unsuccessful. I've also been unable to edit prior "video" posts in Tumblr.

Thanks for your work on tumblesocks. It's really a terrific way to interact with Tumblr feeds.

Will

API connect broken, insecure

Won't connect to Tumblr. Tumblr end is fine, author's server returns a code to put into emacs, albeit over an unencrypted http link, which is pretty unforgivable in 2020. Anyway, once you put in the code, it still doesn't work. Even if you do the "forget" command, and try it all again, it's just an endless loop of broken with no way to debug (sparse use of Messages buffer) :-\

Update dependencies list

While Emacs 24 is supposed to include support for libxml by default, that doesn't seem to be the case in the official Windows binaries for 24.2. The problem should be solved in the next release, but for now, you may have to point Windows users towards some unofficial binaries to get libxml support.

The latest binary from this Dropbox folder maintained by Dani Moncayo worked for me. Links to various libraries are in his recipe for building on your own. I didn't try the Cygwin version of libxml, but the version from ezwinports worked for me.

Incidentally, you should probably also list the various image libraries as dependencies, too. Some distributions for Windows include image support by default, but at the very least Vincent Goulet's version doesn't seem to have libxml support. So, the fourth tip in this blog post will do the trick once you've got Dani Moncayo's build of Emacs installed.

More prompts when creating posts

I know there's an option to set the default state of your posts (which is great). And tumblesocks-text-post-from-region has an optional value to set the state of the post. However, when I call the function with M-x, it doesn't actually prompt me for the state of the post I'm going to create. Neither does C-c C-c.

Would it be possible to add an option so that these functions (and others) prompt for the status of the post you're going to make? Perhaps as a fifth option to the tumblesocks-post-default-state variable, or something like that.

Also, if there were a prompt when you queue a post for date+time to post it, that would be awesome. Tumblr does have a way of managing your queue for you, but I prefer to specify the date and time myself.

GnuTLS error prevents posting

I've only made one post via tumblesocks and the rest couldn't go in because of "GnuTLS error: # ,-19" when I'd post text from my buffer.
I'm using emacs 24.3.1 in openSUSE 13.1 with tumblesocks at version 20140215.1247 if that helps.

"Looks like something broke. Try again? (yes/no)"

I am Emacs 24 on Debian Jessie (the current "testing").
Here is my output from : "GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.4) of 2013-09-27 on trouble, modified by Debian".

I installed tumblesocks with marmalade which, to be honest, I just installed. It said that 6 files were compiled and one skipped. Okay...

I continued by adding

(require 'tumblesocks)
(setq tumblesocks-blog "MyBlogName.tumblr.com")

to my .emacs and restarted it and there were no complains. However, when I do "M-x tumblesocks-api-test-auth" it always returns

" Looks like something broke. Try again? (yes/no) (yes or no) "
That doesn't help me much. Typing "yes" doesn't do anything.

I still have only very little experience with programming and know only some basics of emacs lisp. I have no idea what the fault might be so I felt like there was no other possibility than contacting you.

The following is the compile log that I got from my installation with marmalade:

Leaving directory /home/michael/.emacs.d/elpa/tumblesocks-0.0.6' Compiling file /home/michael/.emacs.d/elpa/tumblesocks-0.0.6/tumblesocks-api.el at Mon Nov 4 00:14:55 2013 Entering directory/home/michael/.emacs.d/elpa/tumblesocks-0.0.6/'

In tumblesocks-api-http-oauth-get:
tumblesocks-api.el:135:51:Warning: (lambda (x) ...) quoted with ' rather than
with #'

In tumblesocks-api-http-apikey-get:
tumblesocks-api.el:150:49:Warning: (lambda (x) ...) quoted with ' rather than
with #'

In tumblesocks-api-http-oauth-post:
tumblesocks-api.el:168:28:Warning: (lambda (x) ...) quoted with ' rather than
with #'

Compiling file /home/michael/.emacs.d/elpa/tumblesocks-0.0.6/tumblesocks-compose.el at Mon Nov 4 00:14:55 2013

Compiling file /home/michael/.emacs.d/elpa/tumblesocks-0.0.6/tumblesocks-pkg.el at Mon Nov 4 00:14:55 2013

Compiling file /home/michael/.emacs.d/elpa/tumblesocks-0.0.6/tumblesocks-user.el at Mon Nov 4 00:14:55 2013

In tumblesocks-unfollow-blog:
tumblesocks-user.el:47:33:Warning: (lambda (blog) ...) quoted with ' rather
than with #'

Compiling file /home/michael/.emacs.d/elpa/tumblesocks-0.0.6/tumblesocks-view.el at Mon Nov 4 00:14:56 2013

In tumblesocks-view-previous-post:
tumblesocks-view.el:75:5:Warning: `previous-line' used from Lisp code
That command is designed for interactive use only

In tumblesocks-view-next-post:
tumblesocks-view.el:91:5:Warning: `next-line' used from Lisp code
That command is designed for interactive use only

In tumblesocks-view-insert-parsed-html-fragment:
tumblesocks-view.el:203:9:Warning: flet' is an obsolete macro (as of 24.3); use eithercl-flet' or `cl-letf'.

In tumblesocks-view-previous-page:
tumblesocks-view.el:248:4:Warning: `previous-line' used from Lisp code
That command is designed for interactive use only

In tumblesocks-view-insert-header:
tumblesocks-view.el:338:13:Warning: reference to free variable blog_name' tumblesocks-view.el:343:7:Warning: reference to free variabletitle'
tumblesocks-view.el:344:54:Warning: reference to free variable caption' tumblesocks-view.el:345:55:Warning: reference to free variablequestion'
tumblesocks-view.el:348:30:Warning: reference to free variable note_count' tumblesocks-view.el:351:11:Warning: reference to free variableliked'
tumblesocks-view.el:356:17:Warning: reference to free variable date' tumblesocks-view.el:356:17:Warning: (lambda (x) ...) quoted with ' rather than with #' tumblesocks-view.el:357:59:Warning: reference to free variabletags'
tumblesocks-view.el:360:22:Warning: reference to free variable `post_url'

In tumblesocks-view-insert-text:
tumblesocks-view.el:371:42:Warning: reference to free variable `body'

In tumblesocks-view-insert-photo:
tumblesocks-view.el:377:23:Warning: (lambda (photodata) ...) quoted with '
rather than with #'
tumblesocks-view.el:386:35:Warning: (lambda (alt) ...) quoted with ' rather
than with #'
tumblesocks-view.el:396:23:Warning: reference to free variable photos' tumblesocks-view.el:398:11:Warning: reference to free variablecaption'

In tumblesocks-view-insert-quote:
tumblesocks-view.el:403:42:Warning: reference to free variable text' tumblesocks-view.el:405:42:Warning: reference to free variablesource'

In tumblesocks-view-insert-answer:
tumblesocks-view.el:409:11:Warning: reference to free variable asking_name' tumblesocks-view.el:412:44:Warning: reference to free variablequestion'
tumblesocks-view.el:414:42:Warning: reference to free variable `answer'

In tumblesocks-view-insert-link:
tumblesocks-view.el:417:63:Warning: reference to free variable url' tumblesocks-view.el:419:42:Warning: reference to free variabledescription'

In tumblesocks-view-insert-chat:
tumblesocks-view.el:423:20:Warning: reference to free variable `dialogue'

In tumblesocks-view-insert-i-have-no-clue-what-this-is:
tumblesocks-view.el:433:39:Warning: reference to free variable `type'

In tumblesocks-view-render-notes:
tumblesocks-view.el:545:10:Warning: flet' is an obsolete macro (as of 24.3); use eithercl-flet' or `cl-letf'.

Compiling file /home/michael/.emacs.d/elpa/tumblesocks-0.0.6/tumblesocks.el at Mon Nov 4 00:14:56 2013

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.