andytom / snippets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snippets

Build Status

Overview

Snippets is a simple note taking application with Full Text Search.

It is based on the Python Flask framework, uses Bootstrap to look nice, ElasticSearch for searching and a database of your choice for storage.

Running Snippets

You can get Snippets up and running on localhost:5000 using the following instructions. The following assumes you have git, python, pip, virtualenv, and virtualenvwrapper installed.

It also assumes that you have ElasticSearch installed and listening on localhost:9200. For more information about setting up ElasticSearch see the ElasticSearch Docs

$ git clone https://github.com/andytom/snippets.git
$ mkvirtualenv snippets
$ cd snippets
$ pip install -r requirements.txt
$ ./manage.py db upgrade
$ ./manage.py runserver

Testing

You can run all the test locally using manage.py.

$ ./manage.py test

As well as test for pep8.

$ ./manage.py pep8

Management Commands

Database Management

Changes to the Database schema are managed using Flask-Migrate. You can read the full help via:

$ ./manage.py db --help

ElasticSearch Index Management

The connection to ElasticSearch and the ElasticSearch Indexes can be managed using manage.py. You can read the full help via:

$ ./manage.py es --help

User Management

You can add or delete users using the manage.py script. You can read the full help via:

$ ./manage.py user --help

TODO

  • Write a README
  • Add Doc strings
  • Write more tests
  • Automate pep8 testing
  • Syntax highlighing
  • Manage commands for the database
  • Manage commands for the index
  • Add users
  • Look at duplication in templates
  • Preview for Markdown on Create/Edit Snippts
  • Work out a better way to do searching
  • Intergrate Users
  • Add link to login/register
  • Connect users and snippets
  • Add permissions
  • Must be logged in to create
  • Only owning user or admin can delete or edit
  • Shared/not shared snippets?
  • Replce index with a landing page
  • Add help pages
  • What Markdown is supported
  • What queries are supported
  • Custom Validators
  • Search query
  • Add user (unique username)
  • Groups of snippets
  • Production Deployment instructions
  • Tests for make_searchable
  • Logging
  • Admin Page for Users
  • Add created and updated dates to Snippets

License

Snippets is licensed under the MIT license (See LICENSE) for more details.

This doesn't include 3rd Party code in app/static/3rd_party, these files are licenced under their own licences.

About

License:MIT License


Languages

Language:Python 83.1%Language:HTML 16.1%Language:Mako 0.7%Language:CSS 0.1%