{"id":20683111,"url":"https://github.com/eivindarvesen/dankenstein","last_synced_at":"2025-04-22T12:21:36.597Z","repository":{"id":43364620,"uuid":"138045544","full_name":"EivindArvesen/dankenstein","owner":"EivindArvesen","description":"Markov Chain Twitter Bot generator","archived":false,"fork":false,"pushed_at":"2022-12-08T02:14:16.000Z","size":581,"stargazers_count":116,"open_issues_count":2,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T15:05:01.501Z","etag":null,"topics":["bash","bot","markov-chain","markov-text","python","twitter","twitter-bot"],"latest_commit_sha":null,"homepage":"https://www.eivindarvesen.com/blog/2018/06/20/paging-dr--dankenstein","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EivindArvesen.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":"2018-06-20T14:39:43.000Z","updated_at":"2024-08-16T06:19:03.000Z","dependencies_parsed_at":"2023-01-25T03:15:35.171Z","dependency_job_id":null,"html_url":"https://github.com/EivindArvesen/dankenstein","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/EivindArvesen%2Fdankenstein","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EivindArvesen%2Fdankenstein/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EivindArvesen%2Fdankenstein/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EivindArvesen%2Fdankenstein/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EivindArvesen","download_url":"https://codeload.github.com/EivindArvesen/dankenstein/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250237851,"owners_count":21397403,"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":["bash","bot","markov-chain","markov-text","python","twitter","twitter-bot"],"created_at":"2024-11-16T22:15:31.023Z","updated_at":"2025-04-22T12:21:36.569Z","avatar_url":"https://github.com/EivindArvesen.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dankenstein\n\nDankenstein is a Markov Chain Twitter Bot generator, based on making a mashup of different corpora.\n\nIt is described in [this blogpost](https://www.eivindarvesen.com/blog/2018/06/20/paging-dr--dankenstein).\n\n## Dependencies\nThe software itself is implemented using Bash, Make, and Python.\n\nYou'll need a Twitter Account and a Twitter application. From the latter, you'll need a consumer key, a consumer secret, an access token and an access token secret.\n\nEnter these into `twitterCredentials.sh`\n\nTo generate the supported datasets you'll need :\n\n- [Poppler](https://poppler.freedesktop.org/)\n    - `brew install poppler` on macOS\n    - `sudo apt-get install -y poppler-utils` on Ubuntu\n\nAfter that, you can run  the `importEnv.sh` script in the `dev`-folder. This will create a Python virtual environment (conda if you have it, virtualenv otherwise) called `dankenstein`, and install all python-dependencies.\n\nIf you'd rather install them separately, they are: `Tweepy, darklyrics, wikiquote, markovify; (optionally nltk)`\n\n## Usage\n\nUsage is based around Make. The following options are available:\n\n```\nmake corpora:\n    Builds all corpora\n\nmake list:\n    Lists all available corpora\n\nmake combinations:\n    Prints all possible combinations of two candidates - may include duplicates (with switched positions)\n\nmake model ARGS=\"corpus1 corpus2 [(scale1 scale2) stateSize overlapTotal overlapRatio tries sentences modelComplexity]\":\n    Generates a model based on two corpora (the only required args).\n\n    If you define scale 1, you must define scale 2.\n\n    All options inside the square brackets are optional.\n\n    ARGS:\n        corpus1\n            string - the name of the first corpus\n                no default\n\n        corpus2\n            string - the name of the second corpus\n                no default\n\n        scale1\n            float/int - scale of corpus1 relative to corpus2\n                defaults to 1\n\n        scale2\n            float/int - scale of corpus2 relative to corpus1\n                defaults to 1\n\n        stateSize\n            int - state size of the Markov chain\n                defaults to 2\n\n        overlapTotal\n            int - maximum sequential words that overlap with a sentence from the corpora\n                defaults to 15\n\n        overlapRatio\n            int - maximum percentage of overlap with a sentence from the corpora\n                defaults to 70\n\n        tries\n            int - attempts to make an original sentence\n                defaults to 10\n\n        sentences\n            int - number of sentences\n                defaults to 5\n\n        modelComplexity\n            string - naive | expert\n                defaults to \"naive\"\n\n    EXAMPLE:\n        make model ARGS=\"tcm jobs 2 1 2 15 30 10 25 expert\" \u0026\u0026 make sentences\n\nmake sentence:\n    Outputs one sentence based on an available (previously trained) model.\n\nmake sentences:\n    Outputs the amount of sentences given as an argument during model generation.\n\nmake clean:\n    Deletes all corpora.\n\nmake tweet:\n    Posts a tweet.\n\n```\n\nIt is possible to se all combinations for a given candidate, e.g. `make combinations | grep \"picard +\"`.\n\n## Deployment:\n\nTwitter secrets are set via environment variables, e.g.\n\n```bash\nexport CONSUMER_KEY=\"consumer_key\"\nexport CONSUMER_SECRET=\"consumer_secret\"\nexport ACCESS_KEY=\"access_token\"\nexport ACCESS_SECRET=\"access_token_secret\"\n```\n\nAn example deployment is described in the bottom of [this blogpost](https://www.eivindarvesen.com/blog/2018/06/20/paging-dr--dankenstein).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feivindarvesen%2Fdankenstein","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feivindarvesen%2Fdankenstein","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feivindarvesen%2Fdankenstein/lists"}