Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using pipenv #69

Merged
merged 6 commits into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ ipython_config.py
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
Pipfile.lock

# celery beat schedule file
celerybeat-schedule
Expand Down
23 changes: 23 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[[source]]
url = "https://pypi.python.org/simple"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't really matter but this can be https://pypi.org/simple

verify_ssl = true
name = "pypi"

[packages]
MechanicalSoup = "*"
ics = ">=0.6"
Babel = "*"
pytz = "*"
httplib2 = "*"
requests = "*"
beautifulsoup4 = "*"
lxml = "*"
python-dateutil = "*"
google-api-python-client = "*"
google-auth-oauthlib = "*"
oauth2client = "*"

[dev-packages]

[requires]
python_version = "3.7"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't seem to run my pipenv properly using Python 3.7 (complains about not being able to get Babel). Setting this to 3.8 however does work for me. Is this a problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, let me check (3.7 seems to be my system's default python3 version)
Can you show the error?

15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,20 @@ This tool **does not** use the Facebook API.

## Requirements
* Facebook account
* python3.6+ (and all required python3 modules)
* python3.6+
* pipenv
* Scheduler tool to automatically run script periodically (optional)
* Google Drive API access (optional)

## Instructions
### Option 1: Save ICS file to filesystem
1. Clone repo
`git clone [email protected]:mobeigi/fb2cal.git`
2. Rename `config/config-template.ini` to `config/config.ini` and enter your Facebook email and password.
2. Rename `config/config-template.ini` to `config/config.ini` and enter your Facebook email and password (no quotes).
3. Install required python modules
`pip install -r requirements.txt`
`pipenv install`
4. Run the script manually:
`python src/fb2cal.py`
`pipenv run python src/fb2cal.py`
5. Import the created `birthdays.ics` file into Calendar applications (i.e. Google Calendar)
### Option 2: Automatically Upload ICS file to Google Drive
1. Clone repo
Expand All @@ -55,9 +56,9 @@ This tool **does not** use the Facebook API.
3. Rename credentials JSON file to **credentials.json** and put it in the `src` folder
4. Rename `config/config-template.ini` to `config/config.ini` and enter your Facebook email and password as well as a name for your calender to be saved on Google Drive. Change `upload_to_drive` to `True`. Initially, the value for the **drive_file_id** field should be empty.
5. Install required python modules
`pip install -r requirements.txt`
6. Run script manually once for testing purposes:
`python ./fb2cal.py`
`pipenv install`
1. Run script manually once for testing purposes:
`pipenv run python ./fb2cal.py`
7. Check Google Drive to ensure your ICS file was made.
8. Setup Cron Jobs/Task Scheduler/Automator to repeatedly run the script to periodically generate an updated ICS file. See **Scheduled Task Frequency** section for more info.
9. Use the following link to import your ICS file into Calendar applications (i.e. Google Calendar):
Expand Down