Giter Club home page Giter Club logo

tumblr-toolkit's Introduction

tumblr-toolkit

Set of CLI tools for your tumblr blog.

Post media file to blog

tt post -c path/to/keys.json -b blogName -m photo -f path/to/pic.jpg

Optional params (with example)

--caption "My pic"

--tags "one, second one"

Get blog info

tt blogInfo -c path/to/keys.json -b blogName

Get post info

tt postInfo -c path/to/keys.json -b blogName --id "post-id"

List blog posts

tt blogPosts -c path/to/keys.json -b blogName --limit 12

List blog queued posts

tt blogQueue -c path/to/keys.json -b blogName --limit 12

List blog draft posts

tt blogDraft -c path/to/keys.json -b blogName --limit 12

Clean broken video posts tool

Broken media posts cleaning tool. Cleans up (removes) video-posts with media pointing to 403 error returning URLs (by default). See available options below.

Clean through videos returning 403 HTTP status code

tt clean -c path/to/keys.json -b blogName --clean-code 403

Clean through videos returning HTTP status code other than 200 (OK)

tt clean -c path/to/keys.json -b blogName --clean-code 200 --clean-invert true

Posts removal tool

Deletes posts that fit passed conditions.

Remove first 10 posts from queue

tt remove -c path/to/keys.json -b blogName -s queue

Find and show posts that will be removed. No removal action will be taken

tt remove -c path/to/keys.json -b blogName --post-type audio --post-tag garbage

Remove all audio-posts, perform actual removal (dry-run false)

tt remove -c path/to/keys.json -b blogName --post-type audio --remove-dry-run false

Tag posts by post's actual type tool

Tags video posts with 'video' tag, audio with 'audio' and so on...

Tag all posts

tt tag-type -c path/to/keys.json -b blogName

Tag all posts in queue

tt tag-type -c path/to/keys.json -b blogName -s queue

Tag all posts, for photo-posts containing GIFs, additionally set 'gif' tag

tt tag-type -c path/to/keys.json -b blogName --tag-type-gif add

Tag all photo posts containing GIFs with 'gif' tag instead of 'photo' tag

tt tag-type -c path/to/keys.json -b blogName --post-type photo --tag-type-gif replace

Process posts with given source code

Perform function built from given user code. Should return one of the constants from given codes object. May return promise resolving to one of the codes as well. Function receives post and codes (return codes) as arguments, return one of return codes for further post process.

Example source code:

return post.type === 'link' ? code.REMOVE_POST : code.DO_NOTHING;

Would remove all link posts and keep other.

post.tags.push('new tag');
return code.UPDATE_POST;

Would update post with new added tag.

Codes are: DO_NOTHING, UPDATE_POST, REMOVE_POST

Remove all posts having 'bad post' tag from blog's queue

tt process -c path/to/keys.json -b blogName -s queue "return post.tags.indexOf('bad post') >= 0 ? codes.REMOVE_POST : code.DO_NOTHING;"

See all commands common and specific options with

tt --help
tt <post|clean|remove|tag-type|process> --help

Credentials

In order to use tumblr api for getting and processing posts, credentials file should be provided. File content JSON should look like this:

{
  "consumer_key": " consumer key value ",
  "consumer_secret": " consumer secret value ",
  "token": " token value ",
  "token_secret": "token secret value"
}

Usage

Installing the tool:

npm install -g tumblr-toolkit

Get access with Tumblr

tumblr-toolkit's People

Contributors

achesco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tumblr-toolkit's Issues

nodejs for ds213+ qoriq ?

is there a possibility of adding a compiled version for rfreescale ppc Diskstations ?? I would really like to have nodejs on my DS213+... :D

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.