first commit
This commit is contained in:
23
.gitignore
vendored
Normal file
23
.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
*py[co]
|
||||||
|
|
||||||
|
#test
|
||||||
|
*.sh
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
*.egg
|
||||||
|
*.egg-info
|
||||||
|
dist
|
||||||
|
build
|
||||||
|
eggs
|
||||||
|
parts
|
||||||
|
bin
|
||||||
|
var
|
||||||
|
sdist
|
||||||
|
develop-eggs
|
||||||
|
.installed.cfg
|
||||||
|
|
||||||
|
# Vim
|
||||||
|
.*.sw[op]
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
28
LICENSE.txt
Normal file
28
LICENSE.txt
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
New BSD License
|
||||||
|
|
||||||
|
Copyright (c) 2015, Taehoon Kim
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* The names of its contributors may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
4
MANIFEST.in
Normal file
4
MANIFEST.in
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
include LICENSE.txt
|
||||||
|
include MANIFEST.in
|
||||||
|
include README.rst
|
||||||
|
include setup.py
|
32
README.rst
Normal file
32
README.rst
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
======
|
||||||
|
fbchat
|
||||||
|
======
|
||||||
|
|
||||||
|
.. image:: https://pypip.in/v/fbchat/badge.png?style=flat
|
||||||
|
:target: https://pypi.python.org/pypi/fbchat
|
||||||
|
|
||||||
|
.. image:: https://pypip.in/d/fbchat/badge.png?style=flat
|
||||||
|
:target: https://pypi.python.org/pypi/fbchat
|
||||||
|
|
||||||
|
.. image:: https://pypip.in/status/fbchat/badge.svg?style=flat
|
||||||
|
:target: https://pypi.python.org/pypi/fbchat
|
||||||
|
|
||||||
|
.. image:: https://pypip.in/license/fbchat/badge.svg?style=flat
|
||||||
|
:target: https://pypi.python.org/pypi/fbchat
|
||||||
|
|
||||||
|
Facebook Chat(`Messenger <https://www.messenger.com/>`__) for Python.
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
Via pip:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ pip install fbchat
|
||||||
|
|
||||||
|
|
||||||
|
Authors
|
||||||
|
=======
|
||||||
|
|
||||||
|
Taehoon Kim / `@carpedm20 <http://carpedm20.github.io/about/>`__
|
38
fbchat/__init__.py
Normal file
38
fbchat/__init__.py
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
|
"""
|
||||||
|
Facebook Chat(Messenger) for Python
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
from .core import *
|
||||||
|
|
||||||
|
|
||||||
|
__version__ = '0.0.1'
|
||||||
|
__author__ = 'Taehoon Kim'
|
||||||
|
__email__ = 'carpedm20@gmail.com'
|
||||||
|
__source__ = 'https://github.com/carpedm20/fbchat/'
|
||||||
|
__license__ = '''
|
||||||
|
New BSD License
|
||||||
|
Copyright (c) 2015, Taehoon Kim
|
||||||
|
All rights reserved.
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
* The names of its contributors may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
'''
|
9
fbchat/core.py
Normal file
9
fbchat/core.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
Core components for fbchat
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
import requests
|
79
setup.py
Normal file
79
setup.py
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
Setup script for fbchat
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
import os
|
||||||
|
try:
|
||||||
|
from setuptools import setup
|
||||||
|
except ImportError:
|
||||||
|
from distutils.core import setup
|
||||||
|
|
||||||
|
|
||||||
|
with open('README.rst') as f:
|
||||||
|
readme_content = f.read().strip()
|
||||||
|
|
||||||
|
|
||||||
|
with open('LICENSE.txt') as f:
|
||||||
|
license_content = f.read().strip()
|
||||||
|
|
||||||
|
|
||||||
|
version = None
|
||||||
|
author = None
|
||||||
|
email = None
|
||||||
|
source = None
|
||||||
|
with open(os.path.join('fbchat', '__init__.py')) as f:
|
||||||
|
for line in f:
|
||||||
|
if line.strip().startswith('__version__'):
|
||||||
|
version = line.split('=')[1].strip().replace('"', '').replace("'", '')
|
||||||
|
elif line.strip().startswith('__author__'):
|
||||||
|
author = line.split('=')[1].strip().replace('"', '').replace("'", '')
|
||||||
|
elif line.strip().startswith('__email__'):
|
||||||
|
email = line.split('=')[1].strip().replace('"', '').replace("'", '')
|
||||||
|
elif line.strip().startswith('__source__'):
|
||||||
|
source = line.split('=')[1].strip().replace('"', '').replace("'", '')
|
||||||
|
elif None not in (version, author, email, source):
|
||||||
|
break
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='fbchat',
|
||||||
|
author=author,
|
||||||
|
author_email=email,
|
||||||
|
classifiers=[
|
||||||
|
'Development Status :: 4 - Beta',
|
||||||
|
'Intended Audience :: Developers',
|
||||||
|
'Intended Audience :: Developers',
|
||||||
|
'Intended Audience :: Information Technology',
|
||||||
|
'License :: OSI Approved :: BSD License',
|
||||||
|
'License :: OSI Approved :: BSD License',
|
||||||
|
'Operating System :: OS Independent',
|
||||||
|
'Programming Language :: Python :: 2.6',
|
||||||
|
'Programming Language :: Python :: 2.7',
|
||||||
|
'Programming Language :: Python :: 2.7',
|
||||||
|
'Programming Language :: Python :: 3.2',
|
||||||
|
'Programming Language :: Python :: 3.3',
|
||||||
|
'Programming Language :: Python :: 3.3',
|
||||||
|
'Programming Language :: Python :: 3.4',
|
||||||
|
'Programming Language :: Python :: Implementation :: CPython',
|
||||||
|
'Programming Language :: Python :: Implementation :: PyPy',
|
||||||
|
'Programming Language :: Python',
|
||||||
|
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
|
||||||
|
'Topic :: Multimedia :: Graphics :: Presentation',
|
||||||
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||||
|
],
|
||||||
|
description="Facebook Chat(Messenger) for Python",
|
||||||
|
keywords=["facebook chat fbchat"],
|
||||||
|
include_package_data=True,
|
||||||
|
license=license_content,
|
||||||
|
long_description=readme_content,
|
||||||
|
packages=['fbchat'],
|
||||||
|
install_requires=[
|
||||||
|
'requests'
|
||||||
|
],
|
||||||
|
url=source,
|
||||||
|
version=version,
|
||||||
|
zip_safe=True,
|
||||||
|
)
|
Reference in New Issue
Block a user