vanita5 / birdknife Goto Github PK
View Code? Open in Web Editor NEWbirdknife is a Twitter CLI based on Vorpal inspired by TTYtter.
License: MIT License
birdknife is a Twitter CLI based on Vorpal inspired by TTYtter.
License: MIT License
Posting: asdf=asd?asd
Result: asdf='asd?asd'
TODO:
birdknife-parser needs a functions to preparse and postparse.
Preparse for Vorpal. This includes encoding chars ('
and =
)
Postparse to decode chars.
Implemet:
lists/members/create
lists/members/destroy
blocked
retweeted_retweet
favorited_retweet
In birdknife the /delete
command either deletes your tweet or tries to removes the retweet if it's from another user.
Now that you can retweet your own tweets, what do we do with a retweet of your own tweet?
Introduce something like /unretweet
?
Vorpal provides persistent history
Upload media with alt text example:
T.post('media/upload', { media_data: b64content }, function (err, data, response) {
// now we can assign alt text to the media, for use by screen readers and
// other text-based presentations and interpreters
var mediaIdStr = data.media_id_string
var altText = "Small flowers in a planter on a sunny balcony, blossoming."
var meta_params = { media_id: mediaIdStr, alt_text: { text: altText } }
T.post('media/metadata/create', meta_params, function (err, data, response) {
if (!err) {
// now we can reference the media and post a tweet (media will attach to the tweet)
var params = { status: 'loving life #nofilter', media_ids: [mediaIdStr] }
T.post('statuses/update', params, function (err, data, response) {
console.log(data)
})
}
})
})
Implement lists/memberships
Uploading media is documented here (Twitter).
There is a example on how to upload media with twit:
//
// post a tweet with media
//
var b64content = fs.readFileSync('/path/to/img', { encoding: 'base64' })
// first we must post the media to Twitter
T.post('media/upload', { media_data: b64content }, function (err, data, response) {
// now we can reference the media and post a tweet (media will attach to the tweet)
var mediaIdStr = data.media_id_string
var params = { status: 'loving life #nofilter', media_ids: [mediaIdStr] }
T.post('statuses/update', params, function (err, data, response) {
console.log(data)
})
})
//
// post media via the chunked media upload API.
// You can then use POST statuses/update to post a tweet with the media attached as in the example above using `media_id_string`.
// Note: You can also do this yourself manually using T.post() calls if you want more fine-grained
// control over the streaming. Example: https://github.com/ttezel/twit/blob/master/tests/rest_chunked_upload.js#L20
//
var filePath = '/absolute/path/to/file.mp4'
T.postMediaChunked({ file_path: filePath }, function (err, data, response) {
console.log(data)
})
Maybe we can implement filesystem autcompletion.
Note: Remaining character count should respect the media url length
Occured while faving a status. Maybe due to a slow internet connection
Unhandled rejection TypeError: Cannot read property 'user_mentions' of undefined at Object.module.exports.autoBoldStatusEntities (/usr/lib/node_modules/birdknife/libs/birdknife-text.js:53:32) at /usr/lib/node_modules/birdknife/libs/TwitterAPI.js:347:49 at tryCatcher (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/promise.js:503:31) at Promise._settlePromise (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/promise.js:560:18) at Promise._settlePromise0 (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/promise.js:605:10) at Promise._settlePromises (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/promise.js:684:18) at Async._drainQueue (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/async.js:126:16) at Async._drainQueues (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/async.js:136:10) at Immediate.Async.drainQueues [as _onImmediate] (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/async.js:16:14) at processImmediate [as _immediateCallback] (timers.js:383:17)
Implement system notifications. A cross platform library with Growl fallback is available: node-notifier
Notifications should be originate on mentions and all events.
Implement autocompletion for at least usernames and hashtags.
Display birdknife version on start-up.
Notify or display update information if a new version is available.
Implement a persistent cache for at least usernames and hashtags.
#12 (Autocompletion) depends on this.
For now the timeline is being displayed without time information.
We should either display status timestamps or a time seperation marker every x minutes. This should be a preference.
Trying to post status with pipe (|
) breaks the command.
Unhandled rejection TypeError: result.data.reverse is not a function
DMs received from the stream seem to contain the full text.
The REST API only returns a limited number of characters per message and hast a t.co link.
For now one has to edit the .birdknife.config
file.
Provide a command to display and set preferences.
The user should be able to configure the following preferences:
Preferences must be readable and writeable inside the CLI.
Are we gonna use a config file (allows easy external preference editing) or some kind of database?
Implement lists/list
For owned lists only: lists/ownerships
The current ASCII art logo seen in the README is too large and should be made more beautiful.
Better ASCII art or a "real" logo?
Implement Twitter's quote feature to comment tweets.
To quote a tweet we have to append the status with the quoted tweet's URL.
Note: Remaining character count should respect the tweet url length
At the moment, /reply
appends all mentioned users to your reply.
Add option to reply to status author only.
This is important, as I just unintentionally spammed @herrurbach's inbox!
Implement
mutes/users/create
mutes/users/destroy
Currently the config.json
containing consumer keys and access token are located inside the node package.
This is inconvenient as one has to reauthenticate everytime birdknife is being updated. Especially if we plan to use the config.json
for additionally preferences (#11).
The file should initially be copied to the user's home directory and accessed from there.
Implement lists/statuses
Make timestamp prints optional with a custom time interval.
hey!
i tried birdknife for the first time today, and i really like it, but it seems like it could use better navigation (or documentation, if i'm just missing key features).
for instance, it prints out timestamps every 5 minutes, but doesn't print any tweets that occurred between them, which seems pretty counter-intuitive (either it doesn't need to print timestamp lines, or it should print the new tweets? i had someone i'm following tweet once, unrelated to me, and once, mentioning me, and neither were printed by birdknife without using /again
). notifications
is set to true (confirmed via /preferences
).
also, i find myself using /again
a lot and wishing that it had some options for sifting, like relatively counted ranges (show me from the fifth to last to the eight to last).
a way to show a list of people you're following would also be great.
additionally, /thread
failed fairly spectacularly the one time i tried it; it turns out that the example i found had a branched structure; birdknife incompletely traversed one branch and didn't visit the other. not sure how to handle cases like these. oh, and each /thread
gave the tweets new IDs, so the same tweets are locally stored under several names.
i'm sorry for packing so much into one issue, but i really like this project and would like to contribute some!
/
should trigger a prompt asking the user if they really want to post this and/or provide similar command suggestionsThis is non-critical as the username in twitter status links are irrelevant.
/thread
does not seem to work for retweets.
Currently retweets of the authenticated users tweets are displayed as replies in their timeline.
Hide retweets from the timeline and display them as events instead
If no internet connection is available, birdknife says Logged in as undefined
and throws errors afterwards.
Implement
blocks/create
blocks/destroy
Parameter:
lat
long
Alternative:
place_id
Is it necessary to set display_coordinates
== true
?
This feature probably depends on user preferences which have to be implemented first.
A user must be able to enable
or disable
adding their location to status updates.
The location could be provided either manually (latitude, longitude) or maybe with a module like this
/tweet
with invalid file causes to crash birdknife:
Error: ENOENT, no such file or directory
For retweeted quotes, the quoted tweet is not being displayed.
The original status of the retweet has to be parsed.
Occured while executing /again <screenname>
. Maybe due to a slow internet connection.
Unhandled rejection TypeError: result.data.reverse is not a function at /usr/lib/node_modules/birdknife/libs/TwitterAPI.js:130:29 at tryCatcher (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/promise.js:503:31) at Promise._settlePromise (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/promise.js:560:18) at Promise._settlePromise0 (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/promise.js:605:10) at Promise._settlePromises (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/promise.js:684:18) at Async._drainQueue (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/async.js:126:16) at Async._drainQueues (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/async.js:136:10) at Immediate.Async.drainQueues [as _onImmediate] (/usr/lib/node_modules/birdknife/node_modules/bluebird/js/release/async.js:16:14) at processImmediate [as _immediateCallback] (timers.js:383:17)
Implement
lists/create
lists/update
lists/destroy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.