chano 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chano/__init__.py +34 -0
- chano/__main__.py +8 -0
- chano-0.1.0.dist-info/METADATA +15 -0
- chano-0.1.0.dist-info/RECORD +7 -0
- chano-0.1.0.dist-info/WHEEL +5 -0
- chano-0.1.0.dist-info/entry_points.txt +2 -0
- chano-0.1.0.dist-info/top_level.txt +1 -0
chano/__init__.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Open the canonical Rick Astley video in a browser."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sys
|
|
6
|
+
import webbrowser
|
|
7
|
+
from types import ModuleType
|
|
8
|
+
|
|
9
|
+
VIDEO_URL = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def play() -> bool:
|
|
13
|
+
"""Open the video in the user's default browser."""
|
|
14
|
+
return webbrowser.open(VIDEO_URL, new=2, autoraise=True)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def chano() -> bool:
|
|
18
|
+
"""Alias for :func:`play`."""
|
|
19
|
+
return play()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def main() -> int:
|
|
23
|
+
"""CLI entry point."""
|
|
24
|
+
return 0 if chano() else 1
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class _CallableModule(ModuleType):
|
|
28
|
+
def __call__(self) -> bool:
|
|
29
|
+
return chano()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
sys.modules[__name__].__class__ = _CallableModule
|
|
33
|
+
|
|
34
|
+
__all__ = ["VIDEO_URL", "chano", "main", "play"]
|
chano/__main__.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: chano
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A tiny Python library that never gives you up.
|
|
5
|
+
Author: Scott Trinh
|
|
6
|
+
Project-URL: Repository, https://github.com/scotttrinh/chano
|
|
7
|
+
Project-URL: Issues, https://github.com/scotttrinh/chano/issues
|
|
8
|
+
Keywords: rickroll,youtube,fun
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+

|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
chano/__init__.py,sha256=xyB_Cv5weZSS1aAEh-2qlsOh3Wx_0CJI_vPHDvqNcr8,698
|
|
2
|
+
chano/__main__.py,sha256=YcLMtYOWtLSPJc60QrKtYnZyjQywlLIK2SxYITRNKyM,112
|
|
3
|
+
chano-0.1.0.dist-info/METADATA,sha256=zRrG_PA04-d6Zk4szQJbRdM2hkORvfv8YwtGm6SFoME,589
|
|
4
|
+
chano-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
5
|
+
chano-0.1.0.dist-info/entry_points.txt,sha256=BGvL3LqBxc3Zrnhl_s1epBbsFkp5DWS8H7ix_U2gmac,37
|
|
6
|
+
chano-0.1.0.dist-info/top_level.txt,sha256=t6PdUsmRfFaP0seTcOQ-V-Cwr1-soS8gPyTy3oYxCa8,6
|
|
7
|
+
chano-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
chano
|