20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/x_x/__init__.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 |
4 | EYES = [
5 | "x",
6 | "X",
7 | "O",
8 | "o",
9 | "0",
10 | "U",
11 | "u",
12 | "@",
13 | "*",
14 | "^",
15 | "-",
16 | ]
17 |
18 |
19 | def x_x():
20 | """Return a random face with an eye."""
21 | return random.choice(EYES) + "_" + random.choice(EYES)
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # :cake: call me fred flintstone (i can make your bed rock)
2 |
3 | non-sense project to start integrating bedrock stuff into a webapp
4 |
5 |
6 | ## Install
7 |
8 | ```bash
9 | pip3 intall -e .
10 | pip3 install -e ".[dev]"
11 | ```
12 |
13 |
14 | ## Test
15 |
16 | WIP: Should this be tox nowadays?
17 |
18 | ```bash
19 | pytest
20 | ```
21 |
22 |
23 | ## Lint
24 |
25 | WIP: What should this be?
26 |
27 | ```bash
28 | flake8 src
29 | ```
30 |
--------------------------------------------------------------------------------
/tests/x_x/cli_test.py:
--------------------------------------------------------------------------------
1 | import unittest
2 |
3 | from x_x.cli import (
4 | main,
5 | splash,
6 | )
7 |
8 |
9 | class TestCLI(unittest.TestCase):
10 | """Test that the CLI tool still works"""
11 |
12 | def test_splash(self):
13 | """Test whether the splash screen returns"""
14 |
15 | self.assertTrue(splash("sword"))
16 |
17 | def test_main(self):
18 | """Test whether the main function runs"""
19 |
20 | main()
21 |
--------------------------------------------------------------------------------
/tests/x_x/x_x_test.py:
--------------------------------------------------------------------------------
1 | import unittest
2 |
3 |
4 | from x_x import x_x
5 |
6 |
7 | class TestX_X(unittest.TestCase):
8 | """Test x_x"""
9 |
10 | def test_x_x_structure(self):
11 | """Test whether x_x() is structured correctly."""
12 |
13 | for i in range(1000):
14 | smiley = x_x()
15 | self.assertEqual(len(smiley), 3)
16 | self.assertEqual(smiley[1], "_")
17 | self.assertIn(smiley[0], "xXOo0Uu@*^-")
18 | self.assertIn(smiley[2], "xXOo0Uu@*^-")
19 |
20 |
21 | if __name__ == "__main__":
22 | unittest.main()
23 |
--------------------------------------------------------------------------------
/src/x_x/cli.py:
--------------------------------------------------------------------------------
1 | import argparse
2 | import os.path
3 |
4 |
5 | from x_x import x_x
6 |
7 |
8 | def splash(choice):
9 | """Return a splash screen"""
10 |
11 | fname = os.path.join(
12 | os.path.dirname(__file__),
13 | "splashes",
14 | f"{choice}.txt",
15 | )
16 |
17 | with open(fname, "r") as fi:
18 | return fi.read()
19 |
20 |
21 | def main():
22 | """CLI stub"""
23 |
24 | parser = argparse.ArgumentParser()
25 | parser.add_argument("--splash", action="store_true", help="show splash screen")
26 | args = parser.parse_args()
27 |
28 | if args.splash:
29 | print(splash("sword"))
30 | else:
31 | print(x_x())
32 |
--------------------------------------------------------------------------------
/src/x_x/splashes/sword.txt:
--------------------------------------------------------------------------------
1 | ,--.
2 | { }
3 | K, }
4 | / ~Y`
5 | , / /
6 | {_'-K.__/
7 | `/-.__L._
8 | / ' /`\_}
9 | / ' /
10 | ____ / ' /
11 | ,-'~~~~ ~~/ ' /_
12 | ,' ``~~~ ',
13 | ( Y
14 | { I
15 | { - `,
16 | | ', )
17 | | | ,..__ __. Y
18 | | .,_./ Y ' / ^Y J )|
19 | \ |' / | | ||
20 | \ L_/ . _ (_,.'(
21 | \, , ^^""' / | )
22 | \_ \ /,L] /
23 | '-_~-, ` ` ./`
24 | `'{_ )
25 | ^^\..___,.--` ZEUS
26 |
--------------------------------------------------------------------------------
/setup.cfg:
--------------------------------------------------------------------------------
1 | [metadata]
2 | name = x_x
3 | version = 1.0.0
4 | author = Matt <3
5 | author_email = matt@worldshadowgovernment.com
6 | url = https://github.com/whatever/x_x
7 | description = wip
8 | long_description = file: README.md
9 | long_description_content_type = text/markdown
10 | keywords = x_x
11 | license = UNLICENSE
12 | classifiers =
13 | Programming Language :: Python :: 3
14 | License :: UNLICENSE
15 |
16 | [options]
17 | package_dir =
18 | = src
19 | packages = find:
20 | install_requires =
21 | aiohttp >= 3.0.0
22 | boto3 >= 1.0.0
23 | beautifulsoup4 >= 4.0.0
24 | requests >= 2.0.0
25 |
26 | [options.packages.find]
27 | where = src
28 | exclude =
29 | examples*
30 | tools*
31 | docs*
32 | x_x.tests*
33 |
34 | [options.entry_points]
35 | console_scripts =
36 | x_x = x_x.cli:main
37 | borges-conversation = yikes.cli:main
38 |
39 | [options.package_data]
40 | * = README.md
41 |
42 | [options.extras_require]
43 | dev =
44 | pytest >= 7.0.0
45 | flake8 >= 7.0.0
46 |
47 | [flake8]
48 | max-line-length = 120
49 |
50 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | This is free and unencumbered software released into the public domain.
2 |
3 | Anyone is free to copy, modify, publish, use, compile, sell, or
4 | distribute this software, either in source code form or as a compiled
5 | binary, for any purpose, commercial or non-commercial, and by any
6 | means.
7 |
8 | In jurisdictions that recognize copyright laws, the author or authors
9 | of this software dedicate any and all copyright interest in the
10 | software to the public domain. We make this dedication for the benefit
11 | of the public at large and to the detriment of our heirs and
12 | successors. We intend this dedication to be an overt act of
13 | relinquishment in perpetuity of all present and future rights to this
14 | software under copyright law.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | For more information, please refer to
25 |
--------------------------------------------------------------------------------
/UNLICENSE:
--------------------------------------------------------------------------------
1 | This is free and unencumbered software released into the public domain.
2 |
3 | Anyone is free to copy, modify, publish, use, compile, sell, or
4 | distribute this software, either in source code form or as a compiled
5 | binary, for any purpose, commercial or non-commercial, and by any
6 | means.
7 |
8 | In jurisdictions that recognize copyright laws, the author or authors
9 | of this software dedicate any and all copyright interest in the
10 | software to the public domain. We make this dedication for the benefit
11 | of the public at large and to the detriment of our heirs and
12 | successors. We intend this dedication to be an overt act of
13 | relinquishment in perpetuity of all present and future rights to this
14 | software under copyright law.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | For more information, please refer to
25 |
--------------------------------------------------------------------------------
/src/yikes/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |