forked from SimonGoring/NeotomaBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a code of conduct and updated the README. Fixed an error in the…
… code.
- Loading branch information
1 parent
a973b66
commit 55be41c
Showing
5 changed files
with
51 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Contributor Code of Conduct | ||
|
||
As contributors and maintainers of this project, we pledge to respect all people who | ||
contribute through reporting issues, posting feature requests, updating documentation, | ||
submitting pull requests or patches, and other activities. | ||
|
||
We are committed to making participation in this project a harassment-free experience for | ||
everyone, regardless of level of experience, gender, gender identity and expression, | ||
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. | ||
|
||
Examples of unacceptable behavior by participants include the use of sexual language or | ||
imagery, derogatory comments or personal attacks, trolling, public or private harassment, | ||
insults, or other unprofessional conduct. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, | ||
commits, code, wiki edits, issues, and other contributions that are not aligned to this | ||
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed | ||
from the project team. | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by | ||
opening an issue or contacting one or more of the project maintainers. | ||
|
||
This Code of Conduct is adapted from the Contributor Covenant | ||
(http://contributor-covenant.org), version 1.0.0, available at | ||
http://contributor-covenant.org/version/1/0/0/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,38 @@ | ||
NeotomaBot | ||
========== | ||
# NeotomaBot | ||
|
||
by: Simon Goring | ||
[![Lifecycle:Stable](https://img.shields.io/badge/Lifecycle-Stable-97ca00)](https://neotomadb.org) | ||
[![NSF-1948926](https://img.shields.io/badge/NSF-1948926-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1948926) | ||
|
||
May 4, 2015 | ||
|
||
Description | ||
---------------------- | ||
A twitter bot to search for new records in the [Neotoma Paleoecology Database](http://neotomadb.org) and then post them to the [@neotomadb](http://twitter.com/neotomadb) Twitter account. | ||
|
||
This program was an experiment to see how good my Python programming skills are. Apparently they're okay. The code could probably use some cleaning, but I'm generally happy with the way it turned out. | ||
|
||
The program runs on a free [Heroku](https://heroku.com) dyno and tweets semi-regularly. | ||
|
||
Requirements | ||
----------------------------- | ||
The program uses `tweepy`, `time`, `sys`, `json`, `requests`, `random` and `imp` package for Python, as well as the Neotoma [API](http://api.neotomadb.org/doc/about). It was coded in Notepad++ because I wanted to try to do it quickly. | ||
![Neotoma Twitter Banner](resources/neotomatwitter.png) | ||
## Contributors | ||
|
||
This project is an open project, and contributions are welcome from any individual. All contributors to this project are bound by a [code of conduct](CODE_OF_CONDUCT.md). Please review and follow this code of conduct as part of your contribution. | ||
|
||
* [Simon Goring](http://goring.org) [![orcid](https://img.shields.io/badge/orcid-0000--0002--2700--4605-brightgreen.svg)](https://orcid.org/0000-0002-2700-4605) | ||
|
||
### Tips for Contributing | ||
|
||
Issues and bug reports are always welcome. Code clean-up, and feature additions can be done either through pull requests to project forks or branches. | ||
|
||
## Requirements | ||
|
||
This application runs using Python v3. All required packages are listed in the [requirements.txt](requirements.txt) file, generated using the python package `pipreqs`. | ||
|
||
Tweets are pulled either from the [resources/cannedtweets.txt](resources/cannedtweets.txt) or generated using the [Neotoma API](https://api.neotomadb.org) `/v1.5/data/recentuploads/n` endpoint. This endpoint returns a list of all dataset uploads within the last `n` months using an XML format. | ||
|
||
The OAuth information is hidden on my computer and added to the `.gitignore`. If you want to run this yourself you'll need to go to the Twitter [apps](https://apps.twitter.com/) page and register a bot of your own. Once you get the `CONSUMER_KEY` and the other associated KEYs and SECRETs put them in a file called `apikeys.txt`. The code will work. | ||
The application requires four environment variables, stored as configuration variables in the Heroku dynamo. These are the keys required to access the Twitter API. To obtain these keys for your own use you must add the [Developer status](https://developer.twitter.com) to your existing Twitter account and register an application to obtain the following keys: | ||
|
||
Contributions and Bugs | ||
---------------- | ||
This is a work in progress. I'd like to add some more functionality in the near future, for example, following and reposting any posts using the hashtag [`#neotomadb`](https://twitter.com/search?f=realtime&q=%23neotomadb), and posting links to articles using the Neotoma Database. | ||
* CONSUMER_KEY | ||
* CONSUMER_SECRET | ||
* ACCESS_TOKEN_KEY | ||
* ACCESS_TOKEN_SECRET | ||
|
||
If you have any issues (about the program!), would like to fork the repository, or would like to help improve or add functionality please feel free to contribute. | ||
### Running Locally | ||
|
||
License | ||
------------------- | ||
This project is distributed under an [MIT](http://opensource.org/licenses/MIT) license. | ||
It is possible to run this code locally if you have the environment variables set. Just run `python3 neotomabot.py` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.