Browse Source

checkin

main
fluffy 1 year ago
commit
34e237a2f8
6 changed files with 4988 additions and 0 deletions
  1. +1
    -0
      .gitignore
  2. +1443
    -0
      1syllableverbs.txt
  3. +3403
    -0
      2syllableverbs.txt
  4. +12
    -0
      Pipfile
  5. +105
    -0
      Pipfile.lock
  6. +24
    -0
      beatbot.py

+ 1
- 0
.gitignore View File

@@ -0,0 +1 @@
token.secret

+ 1443
- 0
1syllableverbs.txt
File diff suppressed because it is too large
View File


+ 3403
- 0
2syllableverbs.txt
File diff suppressed because it is too large
View File


+ 12
- 0
Pipfile View File

@@ -0,0 +1,12 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
mastodon-py = "*"

[requires]
python_version = "3.8"

+ 105
- 0
Pipfile.lock View File

@@ -0,0 +1,105 @@
{
"_meta": {
"hash": {
"sha256": "e1e748e6bfb785d9b09c957bcf7f435561dc8f9dbe63cb6f22d9bbb69aa22aa8"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.8"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"blurhash": {
"hashes": [
"sha256:7611c1bc41383d2349b6129208587b5d61e8792ce953893cb49c38beeb400d1d",
"sha256:da56b163e5a816e4ad07172f5639287698e09d7f3dc38d18d9726d9c1dbc4cee"
],
"version": "==1.1.4"
},
"certifi": {
"hashes": [
"sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3",
"sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41"
],
"version": "==2020.6.20"
},
"chardet": {
"hashes": [
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
],
"version": "==3.0.4"
},
"decorator": {
"hashes": [
"sha256:41fa54c2a0cc4ba648be4fd43cff00aedf5b9465c9bf18d64325bc225f08f760",
"sha256:e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7"
],
"version": "==4.4.2"
},
"idna": {
"hashes": [
"sha256:7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb",
"sha256:a068a21ceac8a4d63dbfd964670474107f541babbd2250d61922f029858365fa"
],
"version": "==2.9"
},
"mastodon-py": {
"hashes": [
"sha256:cc454cac0ed1ae4f105f7399ea53f5b31a1be5075d1882f47162d2e78a9e4064"
],
"index": "pypi",
"version": "==1.5.1"
},
"python-dateutil": {
"hashes": [
"sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c",
"sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"
],
"version": "==2.8.1"
},
"python-magic": {
"hashes": [
"sha256:356efa93c8899047d1eb7d3eb91e871ba2f5b1376edbaf4cc305e3c872207355",
"sha256:b757db2a5289ea3f1ced9e60f072965243ea43a2221430048fd8cacab17be0ce"
],
"version": "==0.4.18"
},
"pytz": {
"hashes": [
"sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed",
"sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048"
],
"version": "==2020.1"
},
"requests": {
"hashes": [
"sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b",
"sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898"
],
"version": "==2.24.0"
},
"six": {
"hashes": [
"sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259",
"sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"
],
"version": "==1.15.0"
},
"urllib3": {
"hashes": [
"sha256:3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527",
"sha256:88206b0eb87e6d677d424843ac5209e3fb9d0190d0ee169599165ec25e9d9115"
],
"version": "==1.25.9"
}
},
"develop": {}
}

+ 24
- 0
beatbot.py View File

@@ -0,0 +1,24 @@
import mastodon
import random

def randline(fname):
with open(fname) as afile:
line = next(afile)
for num, aline in enumerate(afile, 2):
if random.randrange(num) == 0:
line = aline
return line.strip()

def bot():
beats = "lo-fi beats to {} and {} to".format(
randline('1syllableverbs.txt'), randline('2syllableverbs.txt'))
print(beats)

mdon = mastodon.Mastodon(
access_token='token.secret',
api_base_url='https://botsin.space')

mdon.status_post(beats)

if __name__ == '__main__':
bot()

Loading…
Cancel
Save