status: WIP --- TheGrid shell command to upload to thegrid
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
config
lib
publish
.gitignore
Notes.md
Readme.md
grid_mkv.rb
redis-aof.rb

Readme.md

TheGrid MKV

status: WIP

note: this is a work in progress

notes (extended):

auth.coffee used for login (source repo of the original auth.coffee vendored in this repo: https://github.com/the-grid/apidocs/blob/master/code-examples/coffeescript/auth.coffee ) ---> command: grid (needs alias to be installed, otherwise ruby grid_mkv.rb)


TheGrid now makes damn cool websites just by passing anything into it (video, picture, text, link, social stream, filtered social stream like by tag etc...)

project target

You can create a website from just content (links + metadata) with a shell command + some clicks in thegrid app


The target of this project

grid http://example.com
grid http://antani.com

| v

you publish from the app (few clicks, just select the site you want to publish to)


idea:

it creates a cordova app with the content from the site + an android apk


This repo

this repo, other than the information of creating websites , gives you a command as an alias (evn if it should package a binary in the future for simplicity / ease of use (no need to setup language or dependencies)

Why create a docker container at all when you can create a binary? (compilation happens on architecture - libraries not linking problem)


my thegrid.io autogenerated websites

Config

The sites get generated automatically with content and layout infos stored in the site SAF files (site-SITENAME.saf)

They get published via thegrid API.

Authenticate

Use the coffeescript auth.coffe programs/script to authenticate to get an auth token

run:

THEGRID_APP_ID=your_uuid THEGRID_APP_SECRET=xxxxx coffee publish/auth.coffee

with my app uuid:

THEGRID_APP_ID=e51b880c-8b87-46e8-83af-feb6dffc6f0b THEGRID_APP_SECRET=$THEGRID_KEY coffee publish/auth.coffee

in my case, because I exported that in an environment variable I have ($THEGRID_KEY), so I can regenerate easily tokens to keep posting on the grid :D

FIY that's the export command I put in my ~/.bashrc

export THEGRID_KEY="xxxxxx"

(the infos reported here can be found in the original coffeescript module)

Then:

visit http://localhost:3000, click the blue link, log in and obtain the token (you can hit CTRL-C to shutdown the server and run the export command to export the token)

Setup

gem i hashie

Run it

TOKEN=$THEGRID_TOKEN ruby grid_mkv.rb

DNS

Of course you can setup your DNS records manually, but I like to do it via API, so I have a dns.rb script to do that.

Install the prereqs.

gem i dnsimple

Run the script

ruby lib/dns.rb

You need to add config/dnsimple_token.txt (general API token, not domain token) and then configure your domain directly into lib/dns.rb

Sites:

Each site took ~5 minutes to create

https://thegrid.ai/mkv-projects/
https://thegrid.ai/mkv-blockchain/
https://thegrid.ai/mkv-dev/
https://thegrid.ai/mkv-photos/

I did some editing afterwards, but it was minimal.

When I wrote this readme and the grid script originally, thegrid.ai was not as good as it is now.


TODO: package the grid script as a binary


feedback:

  • awesome, publish the first version of the site via api and see it automatically layout-ed :D
  • needs global cdn, the current one sometimes is slow in europe