Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % PYWERBALL(1)
- % krusader74
- % November 2016
- # NAME
- Pywerball - Powerball lottery utilities
- # SYNOPSIS
- **Pywerball** [*OPTION...*]
- # DESCRIPTION
- **Pywerball** is a Python script, useful for checking Powerball lottery results. **Pywerball** may also be used to generate Powerball numbers, show odds and prizes, and estimate the chances for a split jackpot.
- # OPTIONS
- **-c**, **--check** *FILE*
- : Read Powerball numbers from the *FILE* and check them. The winning numbers are downloaded from the web. Therefore, there must be a working web connection, the Powerball site must be online, and the winning numbers for the dates to be checked must be posted online.
- **-d**, **--date** *DATE*
- : If *DATE* is 'next' or 'prev', then the next or previous drawing date is output. Otherwise, *DATE* is used to set the date for the `generate`, `numbers` and `split` options. If no date is given, assume the next drawing for the `generate` and `split` options, and assume the last drawing for the `numbers` option. The date option must be specified before the `generate`, `numbers` and `split` options. The format for *DATE* is `MM/DD/YYY`, e.g., `-d '11/26/2016'`.
- **-g**, **--generate** *NUMBER*
- : Randomly generate the specified *NUMBER* of tickets.
- **-h**, **--help**
- : Display this help message and exit.
- **-n**, **--numbers**
- : Print the winning numbers.
- **-o**, **--odds** *COMBO*
- : Print the odds of getting a combination of so many white balls plus so many power balls. The *COMBO* is formatted like 'WB+PB', e.g., `-o '0+1' -o '3+0'`. WB must be a number 0 to 5. PB must be a number 0 or 1.
- **-p**, **--prize** *COMBO*
- : Print the prize for getting a combination of so many white balls plus so many power balls. The *COMBO* is formatted like 'WB+PB', e.g., `-p '0+1' -p '3+0'`. WB must be a number 0 to 5. PB must be a number 0 or 1.
- **-v**, **--version**
- : Display the version (number and date) and exit.
- # FILES
- The *FILE* to be checked is formatted like so:
- Draw Date WB1 WB2 WB3 WB4 WB5 PB
- 11/26/2016 01 20 37 51 67 18
- 11/26/2016 07 51 58 63 67 24
- 11/26/2016 16 31 45 46 69 18
- 11/26/2016 02 39 53 61 63 13
- 11/26/2016 12 31 42 55 68 03
- 11/26/2016 17 19 21 37 44 16
- 11/26/2016 11 19 21 37 42 11
- 11/26/2016 10 13 23 36 41 16
- 11/30/2016 17 19 21 37 44 16
- If the *FILE* is named `powerball.txt`, and the current date is 11/27/2016, and you ran the following command
- Pywerball -c powerball.txt
- then you would see the following results printed to standard output:
- Draw Date WB1 WB2 WB3 WB4 WB5 PB
- 11/26/2016 01 20 37 51 67 18 no match
- 11/26/2016 07 51 58 63 67 24 no match
- 11/26/2016 16 31 45 46 69 18 no match
- 11/26/2016 02 39 53 61 63 13 no match
- 11/26/2016 12 31 42 55 68 03 no match
- 11/26/2016 17 19 21 37 44 16 matches 5+1 for $Jackpot
- 11/26/2016 11 19 21 37 42 11 matches 3+0 for $7
- 11/26/2016 10 13 23 36 41 16 matches 0+1 for $4
- 11/30/2016 17 19 21 37 44 16 error: could not find matching date online!
- # EXAMPLES
- Check the numbers in the file `powerball.txt`:
- Pywerball -c powerball.txt
- Show the next draw date:
- Pywerball -d next
- Show the previous draw date:
- Pywerball -d prev
- Generate 10 random draws for the next Powerball drawing date. The output is formatted exactly like a *FILE* to be checked:
- Pywerball -g 10
- Generate 10 random draws for the drawing date specified with the --date option:
- Pywerball -d '12/03/2016' -g 10
- Show the winning numbers for the previous draw date:
- Pywerball -n
- Show the winning numbers for the date specified with the --date option:
- Pywerball -d '11/12/2016' -n
- Show the odds of getting 5 white balls plus 0 power balls:
- Pywerball -o '5+0'
- Show the prize for getting 5 white balls plus 0 power balls:
- Pywerball -p '5+0'
- # LIMITATIONS
- Powerplay option is ignored.
- The winning numbers are downloaded from the web. Therefore, there must be a working web connection, the Powerball site must be online, and the dates to be checked must be posted online.
- # COPYLEFT
- **Pywerball** 2016 by krusader74. This work has been released into the public domain by the copyright holder. This applies worldwide. This is free software: You are free to change and redistribute it. There is NO WARRANTY.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement