Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura buns committed Nov 14, 2019
0 parents commit 1e820b2
Show file tree
Hide file tree
Showing 25 changed files with 23,688 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
11 changes: 11 additions & 0 deletions .fantarc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const path = require('path');

module.exports = {
ports: {
test: 1234,
live: 1234
},
paths: {
screenie: path.resolve(__dirname, 'dest', 'screenie.png')
}
}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

node_modules
dest/*
!dest/.gitexists
dist/*
.env
.glitch-assets
.vscode
.cache
Empty file added .glitch-assets
Empty file.
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"useTabs": true
}
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: node_js
node_js:
- "node"
sudo: false
cache:
directories:
- node_modules
notifications:
email: false
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# getreadyfor

<img src="https://pbs.twimg.com/media/EHfga7kW4AIsO_5.jpg:large"/>

Source for <a href="https://twitter.com/readyforspoons">@readyforspoons</a> a bot that makes random fake (but disappointingly real) Brexit posters

## how

It'll fetch a random noun from a master list of nouns and then it make a webpage out of it, screenshot it and tweet it.

I recommend reading the code itself, (start at `app.js`!) it's pretty straightforward and simpler than that mouthful of an explanation!!

## more complex how

1. Clone this repo

2. Run `npm install` to get all the dependencies. This will take a while. While you wait, talk about how you're negotiating a better deal for Britain with the person closest to you.

3. Run `node` and you should get a link to `http://localhost:3000`, showing a massive disappointment. Browser support is very flaky.

4. To take screenies, run `node ./bin/screenshot.js`

5. To post to Twitter, you first need to make an app at <a href="apps.twitter.com">apps.twitter.com</a> (this is where the bot will post!! be careful) and get all four tokens (2 for the app 2 for the user). Then make a <a href="https://github.com/motdotla/dotenv">.env</a> file filling in the values you see in `./bin/tweet.js`. Then just run `node ./bin/tweet.js`

#### autoposting

The actual live <a href="https://twitter.com/readyforspoons">@readyforspoons</a> is in sync with this exact codebase, it's hosted in heroku, which has a free forever tier, and there's a scheduled process that runs `node ./bin/tweet.js` hourly
6 changes: 6 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const app = require('./src/express.js');
const config = require('./.fantarc');

app.listen(config.ports.live, () =>
console.log(`🍦 Running on http://localhost:${config.ports.live}/ !`)
);
204 changes: 204 additions & 0 deletions assets/words/adjectives.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
adorable
alive
ancient
angry
bad
beautiful
big
bitter
blue
boiling
boring
bourgeois
brave
brief
british
broad
broken
bumpy
calm
capitalist
careful
chilly
clean
clever
clumsy
cold
communist
cool
creepy
crooked
cuddly
curly
curved
damaged
damp
dead
decaf
soy-free
deep
defeated
delicious
delightful
dirty
dry
dusty
eager
early
easy
elitist
embarrassed
empty
faint
faithful
famous
fancy
fast
fierce
filthy
flaky
flat
fluffy
french
fresh
furry
gay
gentle
gifted
gigantic
glamorous
good
gray
greasy
great
green
grumpy
handsome
happy
heavy
helpful
helpless
high
hissing
hollow
homosexual
hot
huge
icy
immense
important
inexpensive
itchy
jealous
juicy
kind
large
late
lazy
lesbian
light
little
lively
long
loose
loud
low
lumpy
massive
melodic
melted
miniature
modern
moist
mushy
mysterious
narrow
nervous
new
nice
noisy
numerous
nutritious
obedient
obnoxious
odd
old
orange
own
panicky
petite
plain
poisonous
powerful
prickly
proud
public
puny
purple
purring
quaint
queer
quick
quiet
rapid
raspy
red
repulsive
rich
rotten
round
salty
scary
screeching
shallow
shiny
short
shy
silly
skinny
slow
small
spanish
sparkling
sparse
square
steep
sticky
straight
strange
strong
substantial
sweet
swift
tall
tart
tasteless
tasty
tender
thankful
thoughtless
thundering
tiny
toxic
ugly
uneven
unsightly
uptight
vast
vegan
victorious
warm
weak
weird
wet
white
wide
wide-eyed
witty
wooden
worried
wrong
yellow
young
yummy
zealous
Loading

0 comments on commit 1e820b2

Please sign in to comment.