https://github.com/passy/ltxbot
A Twitter bot that renders LaTeX for you
https://github.com/passy/ltxbot
Last synced: about 1 year ago
JSON representation
A Twitter bot that renders LaTeX for you
- Host: GitHub
- URL: https://github.com/passy/ltxbot
- Owner: passy
- License: mit
- Created: 2014-09-12T07:46:10.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2019-10-27T09:14:18.000Z (over 6 years ago)
- Last Synced: 2025-03-30T13:04:17.700Z (over 1 year ago)
- Language: Haskell
- Homepage: https://twitter.com/ltxbot
- Size: 424 KB
- Stars: 21
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# ltxbot [](https://travis-ci.org/passy/ltxbot)
A Twitter bot rendering mentions to PNGs.

## Config
Modify `ltxbot.example.conf` and enter your [Twiter OAuth
credentials](https://apps.twitter.com/) for an R/W application.
You also need to provide a user token and secret for an authenticated account.
An easy way to obtain these is through
[`twurl authenticate`](https://github.com/twitter/twurl).
## Setup
You need a reasonably recent Haskell installation (GHC 7.8.3 at the time of this
writing) and [Docker](https://docker.com) on your system.
*Docker preparation*
```bash
$ # Pull my docker image with texlive-full and poppler-utils
$ docker pull passy/texlive-poppler
```
If you poor soul are on OS X, you need to set up a shared network drive
with boot2docker. (*N.B.* This may no longer be necessary. Luckily, the Docker
integration is far less painful these days.)
```bash
$ # Make a volume container (only need to do this once)
$ docker run -v /data --name my-data busybox true
$ # Share it using Samba (Windows file sharing)
$ docker run --rm -v /usr/local/bin/docker:/docker -v /var/run/docker.sock:/docker.sock svendowideit/samba my-data
$ # then find out the IP address of your Boot2Docker host
$ boot2docker ip
192.168.59.103
```
And connect to it through Finder by using `cifs://192.168.59.103/data`.
You may need to adjust the two `*tex2png.sh` scripts if any of your paths or
volume names differ.
## Provisioning
There's also a set of [Ansible](http://ansible.com) scripts available under
[`ansible/`](ansible/) in this repository that can be used to set up a server.
## Building
```bash
$ stack setup
$ stack build
$ stack test
$ stack exec ltxbot -- ltxbot.conf
```