# Collect tweets for H2020 MOOD This project collects tweets based on a list of keywords or/and twitter accounts in the [H2020 MOOD](https://mood-h2020.eu/) framework Keywords and Twitter accounts lists have been defined by H2020 MOOD partners : * [keyword](params/keywordsFilter.csv) * [twitter account](params/accountsFollowed.csv). For MOOD partners, the selection of accounts to follow can be found in [Alfresco](https://collaboratif.cirad.fr/share/page/site/MOODProposal/document-details?nodeRef=workspace://SpacesStore/de5d3d86-356e-4383-9078-cf4b9606c76a) **To be compliant with Twitter's [Terms of Service](https://developer.twitter.com/en/developer-terms/agreement-and-policy)** this repository doesn't contains any tweet nor Twitter credentials. Users who wants to use this project have to create a [Twitter developer account](https://developer.twitter.com/en) ## Installation ### Dependencies This project has only been tested on python3.7. Install all dependencies using pip: ```shell pip install -r requirements.txt ``` ### Twitter credentials A credentials.py has to be created using the [template](params/template-credentials.py) 1. First copy the template : ```shell cp params/template-credentials.py params/credentials.py ``` 2. Edit credentials.py with your own Twitter account credentials ## Run The run of this script will create a log file. The script can be launched using this command : ```shell python3 collectTweets.py ``` ## Optional : create a systemd deamon 1. Copy service file `sudo cp systemd/mood-tweets-collect.service /lib/systemd/system` 2. Modify /lib/systemd/system/mood-tweets-collect.service with the correct execPath 3. Reload systemd :`sudo systemctl daemon-reload` 4. Enable auto start using command : `systemctl enable mood-tweets-collect.service` ## License This code is provided under the [CeCILL-B](https://cecill.info/licences/Licence_CeCILL-B_V1-en.html) free software license agreement.