Difference between revisions of "Tweet-toot"
Line 11: | Line 11: | ||
git clone https://github.com/ayush-sharma/tweet-toot.git | git clone https://github.com/ayush-sharma/tweet-toot.git | ||
+ | |||
+ | Creation répertoire log | ||
+ | |||
+ | cd tweet-toot | ||
+ | mkdir log | ||
=== creation de virtualenv === | === creation de virtualenv === | ||
Line 42: | Line 47: | ||
toots.app_secure_token : authorize application to write on mastodon. connexion sur le serveurMastodon ,Creation application .... | toots.app_secure_token : authorize application to write on mastodon. connexion sur le serveurMastodon ,Creation application .... | ||
+ | == Exécution == | ||
+ | === Manuellement === | ||
− | + | on se place dans le répertoireapplicatif | |
cd tweet-toot | cd tweet-toot | ||
Line 52: | Line 59: | ||
− | Appel du script | + | === Appel du script === |
+ | |||
+ | ==== bash ==== | ||
+ | |||
+ | #! /usr/bin/bash | ||
+ | |||
+ | export VENV=$PROJET/src/tweet-toot/venv | ||
+ | |||
+ | . $VENV/bin/activate | ||
+ | |||
+ | python run.py >>log/lastweet.log | ||
+ | |||
+ | |||
./tweet-toot.bash | ./tweet-toot.bash | ||
+ | |||
Revision as of 19:37, 20 December 2019
Contents
Application creation de toot
Script Python3 dont le code est sur github .
Installation
clonage du projet
git clone https://github.com/ayush-sharma/tweet-toot.git
Creation répertoire log
cd tweet-toot mkdir log
creation de virtualenv
Pre-requis : apt-get install python3-venv
cd tweet-toot python3 -m venv venv
after activate venv
installation requirement
pip install -r requirements.txt
configuration in file config.json
{ "gen.APP_NAME": "Tweet-Toot", "gen.log_timestamp": "%Y-%m-%d %H:%M:%S", "tweets.source_account_url": "https://twitter.com/_fixme", "toots.host_instance": "https://tooting.ch", "toots.app_secure_token": "cK2YcOkkAB7UGUPjd3JX4VJSX6EfvNdT2TIm1k0AOIc", "toots.cache_path": "/tmp/" }
toots.app_secure_token : authorize application to write on mastodon. connexion sur le serveurMastodon ,Creation application ....
Exécution
Manuellement
on se place dans le répertoireapplicatif
cd tweet-toot
source venv/bin/activate python run.py
Appel du script
bash
- ! /usr/bin/bash
export VENV=$PROJET/src/tweet-toot/venv
. $VENV/bin/activate
python run.py >>log/lastweet.log
./tweet-toot.bash
TO-DO
appel depuis appli trigger...