Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mortonfox/twstat-d

Generate Twitter Stats from a downloaded Twitter archive. (D language version)
https://github.com/mortonfox/twstat-d

chart dlang twitter

Last synced: 27 days ago
JSON representation

Generate Twitter Stats from a downloaded Twitter archive. (D language version)

Awesome Lists containing this project

README

        

# twstat-d - Generate stats charts from downloaded Twitter archives

## Introduction

This is a version of [twstat](https://github.com/mortonfox/twstat) that I have
rewritten in the D language for speed.

In December 2012, Twitter
[introduced](http://blog.twitter.com/2012/12/your-twitter-archive.html) a
feature allowing users to download an archive of their entire user timeline. By
February 2013, it was available to all users.

To request your Twitter archive:

1. Visit
1. Click on the "Request your archive" button.
1. Wait for an email from Twitter with a download link.

twstat-d is a D program that generates charts from the data in a Twitter
archive. The output is in the form of a single web page, ready for hosting or
private viewing.

## Prerequisites

To build twstat-d, you need [DMD](http://dlang.org/download.html) and
[DUB](https://code.dlang.org/download).

twstat-d requires the
[mustache-d-dlang-tour](https://code.dlang.org/packages/mustache-d-dlang-tour)
package. DUB will automatically download and install this package on the
first build.

The web page that twstat-d generates references the following libraries from
online sources:

* jQuery (from [CDNJS](http://cdnjs.com/))
* [jQCloud](https://github.com/lucaong/jQCloud) jQuery plugin (from [CDNJS](http://cdnjs.com/))
* [Google Chart Tools](https://developers.google.com/chart/)

## Usage

To build twstat-d, run:

dub build -b release

in the root folder of the project.

That will produce a twstat-d executable, which you may run as follows:

twstat-d tweets.zip out.html

Then view out.html in a web browser to see the charts.

See a [sample output page](https://mortonfox.github.io/twstat-d/out.html).

Note: All timestamps in the Twitter archive are in UTC. For the Tweets by Hour
chart, twstat-d uses the system configured timezone to convert those timestamps
to local time.