auto-newsletter
Advanced tools
Comparing version 1.0.0 to 2.0.0
{ | ||
"name": "auto-newsletter", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "", | ||
"main": "lib/index.js", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "source .env && babel-node src/cli", | ||
"test:lint": "eslint src/**.js test/**.test.js", | ||
"test:unit": "nyc ava --tap test/**.test.js | tee .test_results.txt | tap-spec", | ||
"test": "npm run test:lint && npm run test:unit", | ||
"build": "rm -rf lib && NODE_ENV=production webpack && chmod +x lib/cli.js" | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"bin": { | ||
"best-scheduled-tweets": "lib/cli.js" | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/npm/deprecate-holder.git" | ||
}, | ||
"author": "Luciano Mammino", | ||
"license": "MIT", | ||
"engines" : { | ||
"node" : ">=4.3.2" | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/npm/deprecate-holder/issues" | ||
}, | ||
"dependencies": { | ||
"async": "^2.1.4", | ||
"fb": "^1.1.1", | ||
"meta-extractor": "^1.0.7", | ||
"moment": "^2.17.1", | ||
"object-path": "^0.11.3", | ||
"object-values": "^1.0.0", | ||
"request": "^2.79.0", | ||
"twitter": "^1.7.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^0.18.1", | ||
"babel-cli": "^6.22.2", | ||
"babel-core": "^6.22.1", | ||
"babel-loader": "^6.2.10", | ||
"babel-plugin-transform-async-generator-functions": "^6.22.0", | ||
"babel-plugin-transform-async-to-generator": "^6.22.0", | ||
"babel-plugin-transform-es2015-destructuring": "^6.22.0", | ||
"babel-plugin-transform-es2015-function-name": "^6.22.0", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.22.0", | ||
"babel-plugin-transform-es2015-parameters": "^6.22.0", | ||
"babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", | ||
"babel-plugin-transform-es2015-spread": "^6.22.0", | ||
"babel-plugin-transform-es2015-sticky-regex": "^6.22.0", | ||
"babel-plugin-transform-es2015-unicode-regex": "^6.22.0", | ||
"babel-plugin-transform-object-rest-spread": "^6.22.0", | ||
"babel-register": "^6.22.0", | ||
"codecov": "^1.0.1", | ||
"eslint": "^3.14.1", | ||
"eslint-config-airbnb": "^14.0.0", | ||
"eslint-plugin-import": "^2.2.0", | ||
"eslint-plugin-jsx-a11y": "^3.0.2", | ||
"eslint-plugin-react": "^6.9.0", | ||
"nyc": "^10.1.2", | ||
"sinon": "^1.17.7", | ||
"tap-spec": "^4.1.1", | ||
"tap-xunit": "^1.7.0", | ||
"webpack": "^2.2.1" | ||
}, | ||
"ava": { | ||
"require": "babel-register", | ||
"babel": "inherit" | ||
} | ||
"homepage": "https://github.com/npm/deprecate-holder#readme" | ||
} |
174
README.md
@@ -1,173 +0,7 @@ | ||
# Best scheduled tweets | ||
# Deprecated Package | ||
[![npm version](https://badge.fury.io/js/best-scheduled-tweets.svg)](http://badge.fury.io/js/best-scheduled-tweets) [![CircleCI](https://circleci.com/gh/FullStackBulletin/best-scheduled-tweets.svg?style=shield)](https://circleci.com/gh/FullStackBulletin/best-scheduled-tweets) [![codecov](https://codecov.io/gh/FullStackBulletin/best-scheduled-tweets/branch/master/graph/badge.svg)](https://codecov.io/gh/FullStackBulletin/best-scheduled-tweets) | ||
This package is no longer supported and has been deprecated. | ||
An opinionated library to extract the best links from scheduled tweets from a | ||
given Twitter account using Hootsuite (as scheduler source) and Facebook (as ranking mechanism). | ||
To avoid malicious use, npm is hanging on to the package name. | ||
It can be useful to build bots or automated newsletters. | ||
## Install | ||
With NPM: | ||
```bash | ||
npm install best-scheduled-tweets | ||
``` | ||
with Yarn: | ||
```bash | ||
yarn add best-scheduled-tweets | ||
``` | ||
## Requirements | ||
This library requires **Node.js >= 4.3.2**. Therefore it can be used safely within AWS Lambda using the Node.js setup. | ||
## Usage | ||
The library is composed by a programmatic interface that can be used within Node.js applications and an indipendent command line application that runs on Mac and most linux distributions (with Node.js >= 4.3.2 installed). | ||
### Library | ||
To import the library in your project you need to do the following: | ||
With ES2015+: | ||
```javascript | ||
import { bestScheduledTweets } from 'best-scheduled-tweets'; | ||
``` | ||
With ES5: | ||
```javascript | ||
const bestScheduledTweets = require('best-scheduled-tweets').default; | ||
``` | ||
`bestScheduledTweets` is now a function that can be invoked with an `options` object as argument to retrieve the best links from scheduled tweets: | ||
```javascript | ||
const options = {/* ... */}; | ||
const bestLinks = bestScheduledTweets(options); | ||
``` | ||
Internally the library will perform several http requests (Twitter API, Facebook API, URL unshortening, metadata retrieval, ...) so the processing might take a while. Be sure your environment can run for more than 10 seconds and be prepared to use caching mechanisms if needed. | ||
#### Options | ||
The options available are the following: | ||
- `twitterClient` (mandatory): a twitter client instance created with the [twitter](https://www.npmjs.com/package/twitter) library | ||
- `fbApp` (mandatory): a facebook app instance created with the [fb](https://www.npmjs.com/package/fb) library | ||
- `referenceMoment` (mandatory): A [moment](https://www.npmjs.com/package/moment) instance representing a start time from which to consider the tweets | ||
- `screenNames` (mandatory): An array of twitter usernames | ||
- `maxTweetsPerUser` (optional, default `200`): The number of maximum tweets to fetch per user (max `200`) | ||
- `numResults` (optional, default `7`): The number of links to keep at the end | ||
- `blacklistedUrls` (optional, default `[]`): A set of blacklisted url that will be ignored in case they are fetched by the main process | ||
### Command line app | ||
The command line app can be invoked by simply running in your shell: | ||
```bash | ||
best-scheduled-tweets | ||
``` | ||
This program needs to have the following environment variables set: | ||
- `TWITTER_CONSUMER_KEY`: a valid Twitter consumer key | ||
- `TWITTER_CONSUMER_SECRET`: a valid Twitter consumer secret | ||
- `TWITTER_ACCESS_TOKEN_KEY`: a valid Twitter access token key | ||
- `TWITTER_ACCESS_TOKEN_SECRET`: a valid Twitter access token secret | ||
- `FACEBOOK_APP_ID`: a valid Facebook application id | ||
- `FACEBOOK_APP_SECRET`: a valid Facebook application secret | ||
- `TWITTER_SCREEN_NAMES`: a list of comma separated Twitter usernames | ||
- `REFERENCE_MOMENT` (optional): a date time string representing the starting point for tweets (it will default to one week ago). | ||
In case of success, the command will output the result in JSON format in the console. | ||
#### `.env` tip | ||
You can use the file `.env~sample` available here as a template to store your environment variables. If you copy it into an `.env` file you can then run: | ||
```bash | ||
source .env && best-scheduled-tweets | ||
``` | ||
#### Sample output | ||
The command will provide an output similar to the following: | ||
```json | ||
[ | ||
{ | ||
"title": "Google planning AI tools for Pi makers this year", | ||
"url": "http://social.techcrunch.com/2017/01/25/google-planning-ai-tools-for-pi-makers-this-year/", | ||
"description": "Google is intending to expand the dev tools available to makers using the Raspberry Pi microprocessor to power their projects this year -- potentially..", | ||
"image": "https://tctechcrunch2011.files.wordpress.com/2016/02/pi3_angled_web.jpg?w=764&h=400&crop=1", | ||
"score": 3789 | ||
}, | ||
{ | ||
"title": "RethinkDB: why we failed", | ||
"url": "http://www.defstartup.org/2017/01/18/why-rethinkdb-failed.html", | ||
"description": "When we announced that RethinkDB is shutting down, I promised to write a post-mortem. I took some time to process the experience, and I can now write about i...", | ||
"image": "http://placehold.it/350x150/ffffff/0000000&text=www.defstartup.org", | ||
"score": 1022 | ||
}, | ||
{ | ||
"title": "Making Responsive HTML Email Coding Easy With MJML – Smashing Magazine", | ||
"url": "https://www.smashingmagazine.com/2017/01/making-responsive-html-email-coding-easy-with-mjml/", | ||
"description": "MJML is the only framework making responsive email easy. Learn how to create your own responsive email thanks to MJML in this step-by-step tutorial.", | ||
"image": "https://www.smashingmagazine.com/wp-content/uploads/2017/01/mjml-vs-html-preview-opt.png", | ||
"score": 963 | ||
}, | ||
{ | ||
"title": "Shut Up and Take My Money!", | ||
"url": "/v/33c3-7969-shut_up_and_take_my_money", | ||
"description": "FinTechs increasingly cut the ground from under long-established banks’ feet. With a \"Mobile First\" strategy, many set their sights on br...", | ||
"image": "https://static.media.ccc.de/media/congress/2016/7969-hd_preview.jpg", | ||
"score": 627 | ||
}, | ||
{ | ||
"title": "A Trip Down The LoL Graphics Pipeline", | ||
"url": "https://engineering.riotgames.com/news/trip-down-lol-graphics-pipeline", | ||
"description": "http://riot.com/2k1Hx8G #RiotTechBlog", | ||
"image": "https://engineering.riotgames.com/sites/default/files/articles/55/renderingheadercropped.png", | ||
"score": 621 | ||
}, | ||
{ | ||
"title": "Gmail will block .js file attachments starting February 13, 2017", | ||
"url": "https://gsuiteupdates.googleblog.com/2017/01/gmail-will-restrict-js-file-attachments.html", | ||
"description": "Gmail currently restricts certain file attachments (e.g. .exe, .msc, and .bat) for security reasons, and starting on February 13, 2017 , we...", | ||
"image": "http://2.bp.blogspot.com/-7bZ5EziliZQ/VynIS9F7OAI/AAAAAAAASQ0/BJFntXCAntstZe6hQuo5KTrhi5Dyz9yHgCK4B/s1600/googlelogo_color_200x200.png", | ||
"score": 436 | ||
}, | ||
{ | ||
"title": "The Underestimated Power Of Color In Mobile App Design", | ||
"url": "https://www.smashingmagazine.com/2017/01/underestimated-power-color-mobile-app-design/", | ||
"description": "This article covers the most important points related to color in apps, and how to choose colors and contrasts for your app that support usability.", | ||
"image": "https://www.smashingmagazine.com/wp-content/uploads/2017/01/color-wheels-graph-opt.png", | ||
"score": 420 | ||
} | ||
] | ||
``` | ||
## Contributing | ||
Everyone is very welcome to contribute to this project. | ||
You can contribute just by submitting bugs or suggesting improvements by | ||
[opening an issue on GitHub](https://github.com/FullStackBulletin/best-scheduled-tweets/issues). | ||
## License | ||
Licensed under [MIT License](LICENSE). © Luciano Mammino. | ||
Please contact support@npmjs.com if you have questions about this package. |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 8 instances in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
0
0
679
2
0
8
3
- Removedasync@^2.1.4
- Removedfb@^1.1.1
- Removedmeta-extractor@^1.0.7
- Removedmoment@^2.17.1
- Removedobject-path@^0.11.3
- Removedobject-values@^1.0.0
- Removedrequest@^2.79.0
- Removedtwitter@^1.7.0
- Removed@sindresorhus/is@0.14.0(transitive)
- Removed@szmarczak/http-timer@1.1.2(transitive)
- Removedajv@6.12.6(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedasync@2.6.4(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.0(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedcacheable-request@6.1.0(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedclone-response@1.0.3(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcore-decorators@0.12.3(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddecompress-response@3.3.0(transitive)
- Removeddeep-extend@0.5.1(transitive)
- Removeddefer-to-connect@1.1.3(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removeddom-serializer@0.2.2(transitive)
- Removeddomelementtype@1.3.12.3.0(transitive)
- Removeddomhandler@2.4.2(transitive)
- Removeddomutils@1.7.0(transitive)
- Removedduplexer3@0.1.5(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedentities@1.1.22.2.0(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedfb@1.1.1(transitive)
- Removedfile-type@12.4.2(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedget-stream@4.1.05.2.0(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedgot@9.6.0(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhtmlparser2@3.10.1(transitive)
- Removedhttp-cache-semantics@4.1.1(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-buffer@3.0.0(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedkeyv@3.1.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedlowercase-keys@1.0.12.0.0(transitive)
- Removedmeta-extractor@1.5.2(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedmimic-response@1.0.1(transitive)
- Removedmoment@2.30.1(transitive)
- Removedms@2.0.0(transitive)
- Removednormalize-url@4.5.1(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedobject-path@0.11.8(transitive)
- Removedobject-values@1.0.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedp-cancelable@1.1.0(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedprepend-http@2.0.0(transitive)
- Removedpsl@1.9.0(transitive)
- Removedpump@3.0.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedregenerator-runtime@0.11.1(transitive)
- Removedrequest@2.88.2(transitive)
- Removedresponselike@1.0.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedto-readable-stream@1.0.0(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removedtwitter@1.7.1(transitive)
- Removeduri-js@4.4.1(transitive)
- Removedurl-parse-lax@3.0.0(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)
- Removedwrappy@1.0.2(transitive)