PK!G?))fact_sphere_cli/__about__.py__all__ = [ '__author__', '__author_email__', '__copyright__', '__license__', '__summary__', '__title__', '__url__', '__version__', '__version_info__' ] __title__ = 'fact-sphere-cli' __summary__ = 'A CLI for Portal 2 Fact Sphere facts.' __url__ = 'https://github.com/thebigmunch/fact-sphere-cli' __version__ = '1.0.0' __version_info__ = tuple(int(i) for i in __version__.split('.') if i.isdigit()) __author__ = 'thebigmunch' __author_email__ = 'mail@thebigmunch.me' __license__ = 'MIT' __copyright__ = f'2018 {__author__} <{__author_email__}>' PK!q22fact_sphere_cli/__init__.pyfrom .__about__ import ( __author__, __author_email__, __copyright__, __license__, __summary__, __title__, __url__, __version__, __version_info__ ) __all__ = [ '__author__', '__author_email__', '__copyright__', '__license__', '__summary__', '__title__', '__url__', '__version__', '__version_info__' ] PK!Q hhhfact_sphere_cli/__main__.py#!/usr/bin/env python3 from .cli import fact_sphere_cli if __name__ == '__main__': fact_sphere_cli() PK!hmfact_sphere_cli/cli.pyimport sys import click import fact_sphere from click_default_group import DefaultGroup from . import __title__, __version__ CONTEXT_SETTINGS = dict(max_content_width=200, help_option_names=['-h', '--help']) @click.group(cls=DefaultGroup, default='text', default_if_no_args=True, context_settings=CONTEXT_SETTINGS) @click.version_option(__version__, '-V', '--version', prog_name=__title__, message="%(prog)s %(version)s") def fact_sphere_cli(): """A CLI for Portal 2 Fact Sphere facts.""" pass @fact_sphere_cli.command() @click.version_option(__version__, '-V', '--version', prog_name=__title__, message="%(prog)s %(version)s") @click.option('--read', is_flag=True, default=False, help="Return contents for piping.") def audio(read): """Get the filepath or file content for a random fact.""" f = fact_sphere.api.audio() if not read: click.echo(f"Audio: {f.filepath}") else: sys.stdout.buffer.write(f.read()) @fact_sphere_cli.command() @click.version_option(__version__, '-V', '--version', prog_name=__title__, message="%(prog)s %(version)s") def fact(): """Get the text, filepath, and type for a random fact.""" f = fact_sphere.api.fact() click.echo(f"Text: {f.text}") click.echo(f"Audio: {f.audio.filepath}") click.echo(f"Type: {f.type.value}") @fact_sphere_cli.command() @click.version_option(__version__, '-V', '--version', prog_name=__title__, message="%(prog)s %(version)s") def text(): """Get the text for a random fact.""" click.echo(fact_sphere.api.fact().text) PK!H$:+0C0fact_sphere_cli-1.0.0.dist-info/entry_points.txtN+I/N.,()JKL.-.H-J!L= BPK!݅LL'fact_sphere_cli-1.0.0.dist-info/LICENSEThe MIT License (MIT) Copyright (c) 2018 thebigmunch Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PK!HW"TT%fact_sphere_cli-1.0.0.dist-info/WHEEL A н#J."jm)Afb~ ڡ5 G7hiޅF4+-3ڦ/̖?XPK!H"1]7p (fact_sphere_cli-1.0.0.dist-info/METADATAVmS8_kg _!G ̅$Z^*J2VvC<뜃>UԼ!OaՍ MK)Sf0X1ϓKd0 2Bј4)yiZq03HLvm;d*]㉭"pY3Rv磅UElLH(DL4gB1ww<1 :vt>",|}MdL05[80u|L^ %>pT=bȤwK|۷˩=0}h+3<4n5Wᜟbz  iZh#o07Exyދ,V,O";de vX~ONM&kk7DQQ<,N9ੂT"ÑRqo}J Co\w׍o0I/Kpt$kPd[2J%N0ˌeUw'\V&KcFTb4̿?gL.Z{4}J<+72eilk,4 nǕe ]B>*]cɑt?CFUW ycKBKF b_Z.C@5 `ɻTE =:Xo9x%iQZaF<p81.'Tm&#gsstxxݘab4`%~0t<$(B*/A鑚bh!ªRli>ad)u.;N.;LArSmo˅+n6D)/]pt}\ϠXgD)GdqVY8f;v:lNONgxk/WE[ 9k4۟˓SPK!Hॹ&fact_sphere_cli-1.0.0.dist-info/RECORDI@})E/d a(Dr_{cr;vb>or4'IU$?$I$ɴJnui.q=Vʵm.QXFt;]B$bGb$ז&"Y\̀Ob+d#XXrœm,jF!?K+[>CَS9c)>^"m8;OCnɶT 'Ph|k"]6?4M)}IwF-AbU| Qu%U+`xKOաwi^]jο͘kYSge'w$+p=O0OCb6ɮ!V@[MQ̧^kX w%.:e9:z@ _d)k=*nWߴGXɧwτn+҅9B5xl{KPK!G?))fact_sphere_cli/__about__.pyPK!q22cfact_sphere_cli/__init__.pyPK!Q hhhfact_sphere_cli/__main__.pyPK!hmofact_sphere_cli/cli.pyPK!H$:+0C0 fact_sphere_cli-1.0.0.dist-info/entry_points.txtPK!݅LL' fact_sphere_cli-1.0.0.dist-info/LICENSEPK!HW"TT%fact_sphere_cli-1.0.0.dist-info/WHEELPK!H"1]7p ()fact_sphere_cli-1.0.0.dist-info/METADATAPK!Hॹ&fact_sphere_cli-1.0.0.dist-info/RECORDPK