Skip to content

Commit

Permalink
fixed bugs and multithreaded shtuffshtuf
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorashi committed Sep 14, 2023
1 parent 545dcdb commit 9c6ef68
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 101 deletions.
84 changes: 50 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ git clone https://github.com/viktorashi/bingobaker.com-autoplayer && cd bingobak
python autobingo.py -h
```
```string
usage: autobingo [-h] [-u URL] [-cnt COUNT] [-i INPUT_PATH] [-o OUTPUT_PATH] [-c CARDS_PATH] [-gm {normal,blackout,peen,3in6,loser}] [-r] [-strt START] [-fs FREE_SPACE]
[-acc NUM_OF_THREADS]
usage: autobingo [-h] [-u URL] [-cnt COUNT] [-i INPUT_PATH] [-o OUTPUT_PATH] [-c CARDS_PATH]
[-gm {normal,blackout,peen,3in6,loser,4corners,X,x}] [-r] [-strt START] [-fs FREE_SPACE] [-acc NUM_OF_THREADS]
[{editconfig,generate,check}]
Auto Bingo playing command line tool. Currently only being used for bingobaker.com
Expand All @@ -46,7 +46,7 @@ options:
File to write the bingo'ed cards to [default: output.txt]
-c CARDS_PATH, --cards CARDS_PATH
The path you want the cards to be saved in
-gm {normal,blackout,peen,3in6,loser}, --gamemode {normal,blackout,peen,3in6,loser}
-gm {normal,blackout,peen,3in6,loser,4corners,X,x}, --gamemode {normal,blackout,peen,3in6,loser,4corners,X,x}
The gamemode to play in. [default: normal]
-r, --reverse Reverse the bingo card order when reading from [cards.txt] [default False]
-strt START, --start START
Expand All @@ -70,37 +70,6 @@ for the operation and options

### <font size=5> --accelleration <sub> [default: 7 , shorthand -acc]</sub> </font>: The number of threads to use for speeding it up, careful: too many and it's won't really work that well, I suggest around 10-15 the max, it's plenty fast eitherway

### <font size=5> --input <sub> [default: input.txt , shorthand -i]</sub> </font> is the file in which you have the keywords you want to search for on the bingo cards, each keyword on a new line. They DON'T have to be specified exactly as in the cards, lowercase values will be compared and they can just contain those strings
#### **`inpux.txt`**
```
freebooting a freebooted
fake laugh
bro
```
### <font size=5> --output <sub>[default: output.json, shorthand -o]</sub></font> : file that outputs the bingos
#### **`output.json`**
```
https://bingobaker.com/#64e7dce5f63bda5a
https://bingobaker.com/#64e7dce69d2d0c80
```

### <font size=5> --cards <sub>[default: cards.txt, shorthand -c]</font> </sub>: path you want the generated cards to be saved in
#### **`cards.txt`**
```
..............
https://bingobaker.com/#64e7dce5f63bda5a
https://bingobaker.com/#64e7dce69d2d0c80
https://bingobaker.com/#64e7dce8ea9ba59b
https://bingobaker.com/#64e7ef15848b63aa
https://bingobaker.com/#64e7ef16a2ac9aa0
https://bingobaker.com/#64e7f64cb4cf4a44
https://bingobaker.com/#64e7f64e07911364
https://bingobaker.com/#64e7f650b9c63320
https://bingobaker.com/#64e7f65121c3c750
https://bingobaker.com/#64e7f6535e698b25
.................
```

### <font size=5> --url <sub>[default:"" nothing, only paramter that needs specified, shorthand -u]</sub></font>: the link to the bingobaker.com generator

### <font size=5> --count <sub>[default: 100, shorthand -cnt]</sub></font> : number of cards to be generated by the {generate} function
Expand All @@ -113,6 +82,8 @@ options:
- peen : form of a peepee ╭ᑎ╮ middle collumn bottom row
- 3in6 : 3x3 square inside 6x6 grid
- loser : shape of an L on her forehead (first collumn, last row)
- 4corners : 4 corners of the card
- X (or x): X shape


### <font size=5> --reverse <sub>[Bool, default: False, shorthand -r] </sub> </font>: Wether to do all operations on cards in reverse or normal order, usage:
Expand All @@ -129,6 +100,51 @@ python autobingo.py mark --reverse

### <font size=5> --free-space <sub>[string, default: "no credit", shorthand -fs] </sub> </font>: The name of the freespace spot to check for if the card has an even size (meaning there is no clear midde spot)

### <font size=5> --input <sub> [default: input.txt , shorthand -i]</sub> </font> is the file in which you have the keywords you want to search for on the bingo cards, each keyword on a new line. They DON'T have to be specified exactly as in the cards, lowercase values will be compared and they can just contain those strings
#### **`inpux.txt`**
```
freebooting a freebooted
fake laugh
bro
```
### <font size=5> --output <sub>[default: output.json, shorthand -o]</sub></font> : file that outputs the bingos
#### **`output.json`**
```
[{
"url": "https://bingobaker.com/play/650263ec6865dd96",
"completion": [
[1, 1, 1, 0, 0, 0],
[1, 1, 1, 0, 0, 0],
[1, 1, 1, 0, 0, 1],
[1, 0, 0, 0, 0, 1],
[0, 0, 1, 0, 0, 1],
[0, 0, 0, 0, 1, 0]
],
"key": "!bingowin #65dd96"
}, {
"url": "https://bingobaker.com/play/6502520d86a0fbb5",
"completion": [
[1, 1, 1, 0, 1, 0],
[1, 1, 1, 1, 0, 0],
[1, 1, 1, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0]
],
"key": "!bingowin #a0fbb5"
}]
```

### <font size=5> --cards <sub>[default: cards.txt, shorthand -c]</font> </sub>: path you want the generated cards to be saved in
#### **`cards.txt`**
```
..............
{"url": "https://bingobaker.com/play/65024d5ed200c69e", "squares": [["Freebooting a freebooted video", "Jack predicts what she says/does", "References a famous TikTok audio", "\"What did you expect?\"", "Actual insight", "\"Girrrllllll\""], ["Nothing burger", "Forgets to react!", "Desaturated colors", "\"Ohhhh noooooo\"", "\"This guy be...\"", "Editing mistake"], ["Stock or Vine sound effect", "Random tangent", "Random graphic that adds nothing", "\"If that happened to me...\"", "\"Camcorder\" effect", "Mr. Beast subtitles"], ["Unnecessary yelling", "\"What is that?\"", "Says something that makes absolutely no sense", "Weird zoom", "Using same creator's vids multiple times", "Calling someone \"bro\""], ["Video is cropped far too much", "Explains the video before it starts", "Weird flex", "Victim Blaming", "Rain effect", "Steals someone's joke"], ["Contrast filter", "Baby talk", "Repeating what someone said but louder", "Any rhyming words (\"crusty musty\" etc.)", "Black and white filter", "Shaky camera effect"]]}
.................
```




<h3><span style="color:#F47174"> 3. It will all be saved </span></h3>

Expand Down
4 changes: 3 additions & 1 deletion TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ SA DAI CLEAR LA TOATE CARDURILE INAINTE SA TRIMITI BINGOU

NOTA IMPORtANTA::: CHESTIA de deasupra cum ca si cum sa dau wipe la ele inainte sa le trimit, ceea ce am uitat sa fac in vteza aia inainte sa trimit la el, n-a trebuit ca gen doar lui ii apar alea care sunt active, si chestia asta cand o opresti doar nu mai sta pe niciunu si aia e, plus ca chiar mai aveam altele "winnere" care defapt nu erau, in celalte taburi si nu ii apareau deloc alea deci nu era bai nu se prinde nici drq

Contribute to playsound if it even has a public github sometime to make it macos python 10+ compatibble instead of halting
Contribute to playsound if it even has a public github sometime to make it macos python 10+ compatibble instead of halting

PROBLEM WHEN SETTING SIZE AUTOMATIC
3 changes: 2 additions & 1 deletion autobingo.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"--gamemode",
help="The gamemode to play in. [default: normal] ",
type=str,
choices=["normal", "blackout", "peen", "3in6", "loser"],
choices=["normal", "blackout", "peen", "3in6", "loser", "4corners", "X", "x"],
dest="gamemode",
)

Expand Down Expand Up @@ -181,4 +181,5 @@
bingo.createCards(options["count"])
print("Cards generated! Check the cards.txt file for the links")
case "check":
print("Checking to see if my mans (or gals) got a bingo....")
bingo.check_bingo_of_all_cards()
21 changes: 0 additions & 21 deletions generate.py

This file was deleted.

22 changes: 18 additions & 4 deletions input.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
rhyming
Repeating
tiktok does not
gir
freebooting
reading caption
stock
oh
victim
nothing
explain
shaky
free
tiktok does
jack predic
rage effect
shaky
Summarizing
random graphic
this guy
no sense
what is
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
update_card_size,
read_from_input,
generate_multiple_cards,
update_config_one_attr,
)

# do enums idk
Expand Down Expand Up @@ -57,6 +58,9 @@ def __init__(

if gamemode == "3in6":
self.size = 6
update_config_one_attr("size", 6)
update_config_one_attr("free_space_in_middle", False)
print("Updating size to 6 and free space in middle for 3in6 gamemode")

def createCards(self, num: int) -> None:
"""
Expand Down
Loading

0 comments on commit 9c6ef68

Please sign in to comment.