{"id":15654172,"url":"https://github.com/snollygolly/borrow-bot","last_synced_at":"2025-04-30T22:45:46.014Z","repository":{"id":145911110,"uuid":"45801531","full_name":"snollygolly/borrow-bot","owner":"snollygolly","description":":moneybag: A bot for maximizing the borrow subreddit","archived":false,"fork":false,"pushed_at":"2017-02-13T16:43:24.000Z","size":881,"stargazers_count":27,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T22:45:37.739Z","etag":null,"topics":["bot","ingestion","money","mysql","reddit"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snollygolly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-08T22:13:04.000Z","updated_at":"2023-03-04T06:24:57.000Z","dependencies_parsed_at":"2023-04-13T01:47:15.882Z","dependency_job_id":null,"html_url":"https://github.com/snollygolly/borrow-bot","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/snollygolly%2Fborrow-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snollygolly%2Fborrow-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snollygolly%2Fborrow-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snollygolly%2Fborrow-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snollygolly","download_url":"https://codeload.github.com/snollygolly/borrow-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251795391,"owners_count":21645019,"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":["bot","ingestion","money","mysql","reddit"],"created_at":"2024-10-03T12:49:48.973Z","updated_at":"2025-04-30T22:45:45.993Z","avatar_url":"https://github.com/snollygolly.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :moneybag: borrow-bot\nA data collection bot and website aimed at helping lenders make good choices at [/r/borrow](http://reddit.com/r/borrow).\n\n## Prerequisites\n* Node.js (Version 5 and up recommended)\n* MySQL server\n\n## Installation\n\n* Clone down the repository\n```\ngit clone https://github.com/snollygolly/borrow-bot.git\n```\n\n* Install packages (from inside the borrow-bot folder)\n```\nnpm install\n```\n\n* Create your config.  There's a `config.json.example` file in the root.  Edit it to include all your values for the database, Reddit, Twilio, and the website.  Save it as `config.json` and leave it in the root.\n\n* Connect to your MySQL server and create a database called `borrow-bot` with the following options\n```\nDatabase Encoding: utf8\nDatabase Collation: utf8_general_ci\n```\n\n* Create the table schema\n```\nnpm run migrate\n```\n\n## Components\nThere are two main components to BorrowBot.  One is the ingestion bot, and the other is the website.\n\n### Ingestion\nThe ingestion bot is best run on a cronjob.  Reddit has fairly lax throttling limits, so once a minute is a good interval to run it.  There currently isn't any way to update or create historical records, so BorrowBot will only ever pick up the most recent 25-30.\n\n#### Starting\n* To start the ingestion bot, run the following:\n```\nnpm run bot-start\n```\n\n#### Testing\n\nThe bot also comes with a collection of test posts (posts.json).  These are posts that real users have created, but that the bot initially got wrong when parsing.  We take these posts, manually enter the correct values, and then test the bot's logic against this.\n\n* To move over a single post from the `posts` table to the test posts file (posts.json)\n```\nnpm run bot-import ID\n```\n_Note: When running `bot-import`, be sure to manually go into the post's record in MySQL and update the borrow, repay, interest, currency, and repay date's values to the correct ones._\n\n* To run all the tests with summarized output AND save the results back (results.json)\n```\nnpm run bot-test-summary\n```\n_Note: If you've made changes to the test posts file (posts.json) or the BorrowBot logic, please make sure you run `bot-test-summary` before you commit, so you know how effective your changes were._\n\n* To run all the tests with full output\n```\nnpm run bot-test\n```\n\n### Site\nThe website portion is used to take the data the ingestion bot collects and display it in an easy to use interface.\n\n#### Starting\n* To start the website, run the following:\n```\nnpm start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnollygolly%2Fborrow-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnollygolly%2Fborrow-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnollygolly%2Fborrow-bot/lists"}