JavaScript Python HTML CSS Makefile
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dwitter Change 'infinite loop' timeout text (#360) Jul 16, 2018
.eslintrc.yml only apply linting that doesn't involve moving code around Mar 19, 2017
.flake8 Add flake8 file and extend line length to 100 characters Feb 5, 2018
.gitattributes
.gitignore Add .coverage to .gitignore Jun 25, 2018
.travis.yml Simplify: Python 2.7 and 3.6 in allow_failures mode Jan 3, 2018
LICENSE Add Apache 2.0 license file Feb 23, 2017
Makefile Add serve target to Makefile Dec 27, 2017
README.md Break down install steps so they won't be skipped in excitement Apr 9, 2018
manage.py Changes to facilitate S3 backup Aug 18, 2016
newrelic.ini Add new relic config to wsgi.py Dec 31, 2017
package.json Update package.json Feb 27, 2018
requirements.txt

README.md

dwitter

A platform to write visual art in javascript limited to 140 characters.

Available on dwitter.net

Join the chat on Discord

license

Inspired by arkt.is/t/

Pre-requisites and first-time installation

  • Install npm
  • sudo apt install npm
  • Get packages needed for server and clone the repository
  • sudo apt install git virtualenv python-pip
  • git clone https://github.com/lionleaf/dwitter.git

Setup

  • make setup (set up virtual environment)
  • source venv/bin/activate (activate virtual environment)
  • make (install dependencies and set up database)
  • python manage.py createsuperuser (create admin account used below)
  • make run runs the server. Use make serve instead if you're working inside a VM with port forwarding. (0.0.0.0:8000)
  • Go to http://localhost:8000/admin/sites/ and log in with admin account created above.
  • Click on the one entry, and change both domain name and display name to localhost:8000.
  • Make sure http://dweet.localhost:8000/ returns a django error. May not work in Firefox.

Other commands

  • make migrations
  • make migrate
  • make lint
    • lints Python and JS files
    • automatically fixes some JS issues (mostly whitespace-related)
  • make shell
  • make backup
  • make restore-backup

Dwitter API

Dweets

GET www.dwitter.net/api/dweets/  - list of the last 10 dweets
       
       ?limit=100            - number of results to return, default 10, max 100 (subject to change)
       &offset=200           - offset page by 200 dweets
       &remix_of=123         - all remixes of 123
       &author=lionleaf      - dweets by author


GET www.dwitter.net/api/dweets/123  - get details about d/123

Latest dweet: https://www.dwitter.net/api/dweets/?limit=1 (sorted by posted date by default)

Users

GET dwitter.net/api/users/lionleaf  - Show details about user 'lionleaf'.