Go to file
Dan Ballard 1709429e98 implement CSRF per docs - doesnt work. css,js files 404 and get csrf invalid errors on form submit 2015-11-03 08:16:59 -08:00
categories gofmt, delete works 2015-09-13 14:57:22 -07:00
config add to transmet button 2015-05-13 23:12:39 -07:00
css nb influenced styles to make news page more better porpotioned/sized/looking 2015-09-30 07:33:06 -07:00
db deployment tweaks 2015-05-16 13:04:46 -07:00
fonts fonts, routing setup 2015-04-29 08:25:48 -07:00
js mock out delete news 2015-09-03 07:16:16 -07:00
news Edit post works 2015-09-23 21:12:57 -07:00
templates implement CSRF per docs - doesnt work. css,js files 404 and get csrf invalid errors on form submit 2015-11-03 08:16:59 -08:00
user gofmt, delete works 2015-09-13 14:57:22 -07:00
.gitignore typos, gitignore for intelij 2015-09-05 10:49:29 -07:00
LICENSE Initial commit 2015-04-26 19:46:44 -07:00
README.md docs enhancment 2015-08-16 12:09:48 -07:00
csrf-secret.txt dummy file and script to gen csrf secret 2015-11-02 08:00:00 -08:00
favicon.ico favicon 2015-05-21 22:59:28 -07:00
gen-csrf.sh dummy file and script to gen csrf secret 2015-11-02 08:00:00 -08:00
main.go implement CSRF per docs - doesnt work. css,js files 404 and get csrf invalid errors on form submit 2015-11-03 08:16:59 -08:00
route_handlers.go implement CSRF per docs - doesnt work. css,js files 404 and get csrf invalid errors on form submit 2015-11-03 08:16:59 -08:00
templates.go implement CSRF per docs - doesnt work. css,js files 404 and get csrf invalid errors on form submit 2015-11-03 08:16:59 -08:00
transmet.conf bad sleep upstart hack so that postgres has a chance to start before transmet 2015-10-31 10:32:50 -07:00

README.md

transmet

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 and category managment (that are one time tasks) 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 hadle 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 '''

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 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

sudo service transmet start

Setup environment

Adding a user

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

Adding Categories

INSERT INTO categories (name, parent_id) VALUES ('NAME', [null or PARENT_ID]);