diff --git a/README.md b/README.md index 181745a..90aea2c 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,12 @@ After gathering a list of birthdays for all the users friends for a full year, i * Scheduler tool to automatically run script periodically (optional) ## Instructions -1. Clone repo +1. Clone repo `git clone git@github.com:mobeigi/fb2cal.git` 2. Rename `config/config-template.ini` to `config/config.ini` and enter your Facebook email and password (no quotes). -3. Set up pipenv environment +3. Set up pipenv environment `pipenv install` -4. Run the `fb2cal` module +4. Run the `fb2cal` module `pipenv run python -m fb2cal` 5. Check the output folder (`out` by default) for the created `birthdays.ics` file @@ -58,6 +58,14 @@ It is recommended to run the script **once every 24 hours** to update the ICS fi * Facebook accounts secured with 2FA are currently not supported (see [#9](../../issues/9)) * During Facebook authentication, a security checkpoint may trigger that will force you to change your Facebook password. +## Testing +1. Set up pipenv environment +`pipenv install` +2. Install the `fb2cal` module +`pipenv run python -m pip install .` +3. Run the `unittests` module on the `tests` folder +`pipenv run python -m unittest discover tests` + ## Contributions Contributions are always welcome! Just make a [pull request](../../pulls). diff --git a/fb2cal/__meta__.py b/fb2cal/__meta__.py index 34f31d7..5544c3a 100644 --- a/fb2cal/__meta__.py +++ b/fb2cal/__meta__.py @@ -1,13 +1,15 @@ __author__ = 'Mo Beigi' __copyright__ = 'Copyright 2019-2020' +__description__ = 'Facebook Birthday Events to ICS file converter' __email__ = 'me@mobeigi.com' __license__ = "GPLv3" __maintainer__ = 'Mo Beigi' __status__ = 'Production' +__title__ = 'fb2cal' __website__ = 'https://git.io/fjMwr' __version_info__ = (1, 2, 1) __version__ = '.'.join(map(str, __version_info__)) # Make metadata public to script -__all__ = ['__author__', '__copyright__', '__email__', '__license__', '__maintainer__', '__status__', '__website__', '__version_info__', '__version__'] \ No newline at end of file +__all__ = ['__author__', '__copyright__', '__description__', '__email__', '__license__', '__maintainer__', '__status__', '__title__', '__website__', '__version_info__', '__version__'] diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..b998918 --- /dev/null +++ b/setup.py @@ -0,0 +1,13 @@ +from setuptools import setup, find_packages +from fb2cal.__meta__ import __title__, __version__, __description__, __license__, __author__, __email__, __website__ + +setup( + name=__title__, + version=__version__, + description=__description__, + packages=find_packages(), + license=__license__, + author=__author__, + author_email=__email__, + url=__website__ +) diff --git a/tests/test_transformer.py b/tests/test_transformer.py index f8da915..96c56a6 100644 --- a/tests/test_transformer.py +++ b/tests/test_transformer.py @@ -37,6 +37,3 @@ def test_friend_in_january(self): self.assertEqual(friend.profile_picture_uri, 'https://scontent-syd2-1.xx.fbcdn.net/v/t1.0-1/cp0/p60x60/34f34864_10161077510019848_299841799681806933_o.jpg?_nc_cat=107&ccb=2&_nc_sid=7406a8&_nc_ohc=yzAYhtdvoMYAX9Zxo1e&_nc_ht=scontent-syd2-1.xx&tp=27&oh=dc48247e31223151bc5d55781a572e2f&oe=5FD254D0') self.assertEqual(friend.birthday_day, 17) self.assertEqual(friend.birthday_month, 1) - -if __name__ == '__main__': - unittest.main() \ No newline at end of file