You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Dan Ballard 9476bf1e74 tweak roll up css, add pagination 3 years ago
categories gofmt, delete works 4 years ago
config add to transmet button 4 years ago
css tweak roll up css, add pagination 3 years ago
db deployment tweaks 4 years ago
fonts fonts, routing setup 4 years ago
js tweak roll up css, add pagination 3 years ago
news don't truncate news notes display 3 years ago
templates tweak roll up css, add pagination 3 years ago
user gofmt, delete works 4 years ago
.gitignore fix add to transmet link 4 years ago
LICENSE Initial commit 4 years ago
README.md markdown fix 4 years ago
favicon.ico favicon 4 years ago
gen-csrf.sh use urandom 4 years ago
main.go disable csrf until SSL 4 years ago
route_handlers.go tweak roll up css, add pagination 3 years ago
templates.go don't truncate news notes display 3 years ago
transmet.conf bad sleep upstart hack so that postgres has a chance to start before transmet 4 years ago

README.md

transmet thrree eyed smiley face

Quick fast personal link store that exports to a HTML template for quick posting to a blog

Usecase: storing interesting news articles you come across during a week with at the moment notes/commentary and

then exporting in a currated organized format for immediate blog posting at your convience

Note

As this is a personal project, some of the niceities like user managment are left to be done in SQL. I needed a tool to store links and export to html so that’s what I’ve focused on.

Install

go get github.com/dballard/transmet

DB setup

sudo apt-get install postgres postgresql-contrib

Setup postgres to handle a local connection for transmet in pg_hba.conf either:

host transmet transmet 127.0.0.1/32 md5

or a more liberal:

host all all 127.0.0.1/32 md5

and do the same for

host    all             all             ::1/128                 md5 

ipv6

create ssl certs and put them somewhere

enable SSL in postgresql.conf

ssl = true
ssl_cert_file = 'WHER_YOU_PUT/server.crt'
ssl_key_file = 'WHERE_YOU_PUT/server.key'   

Create postgress DB and user

sh
sudo -u postgres --or-- sudo su - postgres
createuser -S -P -E transmet
createdb --owner transmet --encoding utf8 transmet
psql
\c transmet
CREATE EXTENSION pgcrypto;

put DB details in:

  • db/dbconf.yml (copied from db/dbconf.EXAMPLE)
  • config/prod.json (copied from config/local.json)

    go get bitbucket.org/liamstask/goose/cmd/goose

    goose up

Run

Assumed GOPATH=/opt/go

edit transmet.conf to point to correct location

sudo cp transmet.conf /etc/init
./gen-csrf.sh
sudo service transmet start

Setup environment

Adding a user

INSERT INTO users (username, password) VALUES('USERNAME', crypt('PASSWORD', gen_salt('bf')));