Karlsruher Twitter Robot
Project description
@Karlsruher
- is a robot on Twitter (Link)
- retweets mentions from its followers when they apply some rules
Setup instructions
Prerequisites:
- Python 3 environment (tested with 3.5 on Linux, 3.8.5 MacOS)
- The Robot needs a home directory for its work
- You need Twitter API credentials for your Robot
Install the latest release into your Python 3 library:
$ python3 -m pip install -U --user --pre karlsruher
Still in Beta mode: --pre and expect a moving target!
Create a home directory
You might want to use a different path here:
export ROBOT_HOME=$HOME/karlsruher
mkdir -p $ROBOT_HOME
Create auth.yaml credentials file
You want to enter your own credentials here:
export ROBOT_HOME=$HOME/karlsruher
cat >$ROBOT_HOME/auth.yaml <<EOF
# You must enter real credentials here:
twitter:
consumer:
key: 'YOUR-CONSUMER-KEY'
secret: 'YOUR-CONSUMER-SECRET'
access:"
key: 'YOUR-ACCESS-KEY'
secret: 'YOUR-ACCESS-SECRET'
EOF
Setup complete
First run
The Robot needs to fetch its followers and friends from Twitter regularly, run this initially and once per day:
export ROBOT_HOME=$HOME/karlsruher
karlsruher --home=$ROBOT_HOME -housekeeping
To just perfom the desired retweet feature, run this at any interval:
export ROBOT_HOME=$HOME/karlsruher
karlsruher --home=$ROBOT_HOME -retweet
Crontab example:
*/5 * * * * karlsruher --home=ROBOT_HOME -retweet >>ROBOT_HOME/log 2>&1
3 3 * * * karlsruher --home=ROBOT_HOME -housekeeping >>ROBOT_HOME/log 2>&1
Simple logfile rotation:
# cat /etc/logrotate.d/karlsruher
ROBOT_HOME/log {
rotate 7
daily
compress
missingok
notifempty
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
karlsruher-3.0b2.tar.gz
(11.2 kB
view details)
File details
Details for the file karlsruher-3.0b2.tar.gz.
File metadata
- Download URL: karlsruher-3.0b2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13841ac2e7ae0327bdb984b114eea53c8ccaae5e0aa51ddef20bc052013acac2
|
|
| MD5 |
962a320d5725fb51020080e92a661f55
|
|
| BLAKE2b-256 |
312b4811d6df3a1d7684a76857c49bc4c418bee4cdce918c1fe79a743dd01776
|