Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 22, 2020. It is now read-only.
/ everywikt Public archive

A Twitter bot posting random words from Wiktionary.

License

ljcooke/everywikt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project has moved to Sourcehut: https://git.sr.ht/~ljc/everywikt


@everywikt

@everywikt is a Twitter bot posting randomly selected words from Wiktionary.

Requirements

This script runs with Python 3 and depends on a separate module named botutil.

It requires a file listing all of the article titles on Wiktionary:

  1. Go to http://dumps.wikimedia.org/enwiktionary/latest/ to see the latest archive of the English Wiktionary site.
  2. Download the file named enwiktionary-latest-all-titles-in-ns0.gz.
  3. Decompress the file using gunzip.
  4. Move the decompressed file to the data directory.

Usage

To print a single tweet on the command line, run:

./everywikt.py

To publish a tweet:

export TWITTER_CONSUMER_KEY="appkey"
export TWITTER_CONSUMER_SECRET="appsecret"
export TWITTER_USER_TOKEN="123456789-mytoken"
export TWITTER_USER_SECRET="mysecret"

./everywikt.py tweet

On the first run the script will take a short while to respond. Here it generates an index of the Wiktionary file before preceding, so on subsequent runs it will retrieve a random word very quickly.

About

A Twitter bot posting random words from Wiktionary.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages