PK!elSkkignorio/__init__.py"""TODO: package description.""" from .ignorio import Ignorio __all__ = ['Ignorio'] __version__ = '0.2.0' PK!~Cignorio/cli.py"""TODO: Command Line Interface.""" from . import Ignorio import click def main(): """TODO: CLI.""" click.secho('CLI in WIP') if __name__ == '__main__': main() PK!Qignorio/ignorio.py"""TODO: Ignorio package description.""" from requests import get as rget class Ignorio(): """TODO: Ignorio class.""" def __init__(self): """TODO: Ignorio initialization.""" def supported_languages(self): """Get supported languages from gitignore.io. example: supported_languages() >>> [ruby, python, sublimetext, ...] """ raw_list = rget('https://www.gitignore.io/api/list').text # gitignore.io's API returns a multiline string # I have to remove new lines and split the languages. striped_list = raw_list.strip('\n') replaced_list = striped_list.replace('\n', ',') lang_list = replaced_list.split(',') return lang_list def count_languages(self): """Return how many languages are supported.""" return len(self.supported_languages()) def is_lang_supported(self, lang): """Return True or False if a language is supported.""" lang_list = self.supported_languages() return True if lang in lang_list else False def get_language_exclusion(self, langs): """Get languages exclusion list.""" lang_list = ','.join(langs) exclusion_list = rget(f'https://www.gitignore.io/api/{lang_list}').text return exclusion_list def write_gitignore(self, langs, filename='.gitignore'): """Write .gitignore.""" lang_list = self.get_language_exclusion(langs) with open(filename, 'w') as raw: raw.write(lang_list) PK!H$kc)'(ignorio-0.2.0.dist-info/entry_points.txtN+I/N.,()LL/KɴMPK!5DD"ignorio-0.2.0.dist-info/LICENSE.mdMIT License Copyright (c) 2018 Robertho Franchesko Orozco Parrales 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!H_zTTignorio-0.2.0.dist-info/WHEEL A н#Z;/"d&F[xzw@Zpy3Fv]n0H*J>mlcAPK!H{U/ ignorio-0.2.0.dist-info/METADATAN0 yAjMD!$F7Ţ!iq4p-}PC k9SggS@(S39;-9~@su_m^+Fc}iпQ67FCr!Il}~iFBߐxEfUtAؠI@mXkI6*&瓍dc&7{-M]sHʅN_ #\]$e}A# PK!Hhocignorio-0.2.0.dist-info/RECORD}йv0>L1fqcKÎgxNwIV _1&KtX@gY(<t=6e퉝h. @^7䇲 >C0R1gLkbH;bWݰM:w-qtq/CO9 %d)&Jפ͈iM*$>ǁI-z$ɖ-p7cU\%ۯ6P[aCZ ״[8ëZ ^^X't1I