{"id":20748029,"url":"https://github.com/vicchi/cartobot","last_synced_at":"2025-04-28T12:04:05.860Z","repository":{"id":23993111,"uuid":"27376609","full_name":"vicchi/cartobot","owner":"vicchi","description":"Hello. I'm CartoBot. I like maps.","archived":false,"fork":false,"pushed_at":"2015-02-02T17:08:59.000Z","size":188,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-28T12:04:00.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vicchi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-01T11:36:03.000Z","updated_at":"2018-04-14T11:54:16.000Z","dependencies_parsed_at":"2022-09-07T03:20:55.438Z","dependency_job_id":null,"html_url":"https://github.com/vicchi/cartobot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicchi%2Fcartobot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicchi%2Fcartobot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicchi%2Fcartobot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicchi%2Fcartobot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vicchi","download_url":"https://codeload.github.com/vicchi/cartobot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251311332,"owners_count":21569009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T08:15:08.379Z","updated_at":"2025-04-28T12:04:05.843Z","avatar_url":"https://github.com/vicchi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CartoBot\n\n**Cartobot** is a [Twitterbot](http://en.wikipedia.org/wiki/Twitterbot), written in [Node.js](http://nodejs.org/), that searches for Tweets about maps and cartography and scans your GetPocket queue for bookmarks tagged with `maps` and Tweets about them.\n\nIf you don't want to Tweet about this sort of thing, Cartobot is fully configurable to search for other information in Twitter, based on the [Twitter search API](https://dev.twitter.com/rest/public/search), including searching based on hashtags, exclusing certain hashtags and certain accounts.\n\n## Installation\n\nClone Cartobot's GitHub repository ...\n\n```\n$ git clone git@github.com:vicchi/cartobot.git\n```\n\nOr install from the latest release's archive.\n\n```\n$ wget https://github.com/vicchi/cartobot/archive/master.zip\n```\n\nInstall dependencies with `npm`\n\n```\n$ cd cartobot \u0026\u0026 npm install\n```\n\n## Authentication with Twitter\n\nCartobot is a *Twitterbot* which means you'll need to create a Twitter account for the bot to Tweet through and to authenticate your account with Cartobot to allow it to Tweet.\n\nIt can't be stressed enough that you should create a *new account* to use Cartobot. Bots do can banned or blocked from time to time and you don't want your usual Twitter account to be the one that gets blocked.\n\nAfter you've created your new account and are signed in, you'll need to create a new Twitter *app* which you can do [here](https://apps.twitter.com/app/new). Once you've created your *app* clicking on *Keys and Access Tokens* will show your *Consumer Key*, *Consumer Secret*, *Access Token* and *Access Token Secret*. These should all be updated in `etc/config.js` as `twitter.auth.consumer_key`, `twitter.auth.consumer_secret`, `twitter.auth.access_token` and `twitter.auth.access_token_secret`.\n\n## Authentication with GetPocket\n\nCartobot supports tweeting about bookmarks saved to your GetPocket queue with a specific tag. You'll need to have a valid GetPocket account and to create an *application* to use Cartobot with the GetPocket API, which you can do [here](http://getpocket.com/developer/apps/new). Make sure you set at least *Modify* and *Retrieve* permissions for your application; these permissions cannot be added after your application is created. Once the application is created with GetPocket, you'll be notified of your *consumer key* to allow you to authenticate Cartobot with your GetPocket account using OAuth.\n\nCartobot needs to be configured with both your GetPocket *consumer key* and your GetPocket *access token*. You can obtain your access token by using the helper script in `bin/authorize-pocket.js` and passing it your *consumer key* on the command line.\n\n```\n$ node bin/authorize-pocket.js --consumerkey 'YOUR-CONSUMER-KEY'\nNow listening at http://127.0.0.1:8080\n```\n\nPoint your web browser of choice at http://127.0.0.1:8080 and you'll be guided through the OAuth handshaking dance and be presented with your *access token*.\n\nTake both your *consumer key* and *access token* and update `etc/config.js` inserting these values as `getpocket.auth.consumer_key` and `getpocket.auth.access_token`.\n\n## Configuration\n\nCartobot ships with a template configuration file in `etc/config.js.sample`. You'll need to copy this to `etc/config.js` and edit it to meet your needs. Hopefully `config.js.sample` is relatively self explanatory, but excepting the authentication items described above, these are the other configuration fields.\n\n* `dryrun`: set to true to disable tweeting, retweeting, following and archiving GetPocket bookmarks\n* `title`: process title - WARNING make sure this matches the process name for the stop script in package.json\n* `twitter.enabled`: set to false to disable Twitter searching, retweeting and following. Does not disable tweeting GetPocket bookmarks\n* `twitter.tweets`: number of applicable search results that will be retweeted\n* `twitter.short_url_length`, `twitter.short_url_length_https`: default t.co URL lengths\n* `twitter.query.main`: main Twitter search API query\n* `twitter.query.args`: additional search arguments\n* `twitter.query.ignore.hashtags`: array of hashtags to exclude\n* `twitter.query.ignore.accounts`: array of accounts to exclude\n* `getpocket.enabled`: set to false to disable Twitter searching, retweeting and following. Does not disable tweeting GetPocket bookmarks\n* `getpocket.bookmarks`: number of applicable GetPocket bookmarks that will be tweeted\n* `getpocket.query.tag`: the GetPocket bookmark tag to be searched for\n\nIn addition to reading configuration from `etc/config.js`; some configuration parameters can be overridden from the command line.\n\n```\n$ node cartobot.js --help\nUSAGE: node cartobot.js [OPTION1] [OPTION2]... arg1 arg2...\nThe following options are supported:\n  -d, --debug                \tProduce loads of debug logging\n  -i, --interval \u003cARG1\u003e      \tHow often CartoBot wakes up and runs, in minutes (\"120\" by default)\n  -t, --tweetcount \u003cARG1\u003e    \tMaximum number of Tweets to search for (\"5\" by default)\n  -b, --bookmarkcount \u003cARG1\u003e \tMaximum number of unarchived GetPocket bookmarks to search for (\"5\" by default)\n  -T, --notwitter            \tDisable searching for related Tweets\n  -P, --nopocket             \tDisable searching for unarchived GetPocket bookmarks\n  -R, --norepeat             \tRun once and then terminate\n  -D, --dryrun               \tRun searches but don't Tweet or Archive GetPocket bookmarks\n```\n## Running CartoBot\n\nRun `cartobot.js` with `node`:\n\n```\n$ node cartobot.js\n```\n\nOr start Cartobot with `npm`:\n\n```\n$ npm start\n```\n\nOr run Cartobot under `forever` as a service on RHEL/CentOS machines:\n\n```\n$ sudo su -\n$ npm -g install forever\n$ cp bin/cartobot /etc/rc.d/init.d/\n$ chmod +x /etc/rc.d/init.d/cartobot\n$ /sbin/chkconfig --level 345 cartobot on\n$ service cartobot start\n```\n\n## Credits\n\nCartobot's [icon](https://www.iconfinder.com/icons/239239/address_gps_location_map_navigate_navigation_pin_icon#size=128) is by PixelKit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicchi%2Fcartobot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvicchi%2Fcartobot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicchi%2Fcartobot/lists"}