Code Cheats

PHP Week 5 Group Project, 10.2.2016-10.7.2016

By Ryan Loos, Stephen Newkirk, Martin Cartledge, Matthew Brandenburg

User Story

As a power user, I want an application that will allow me to save text and assign it a shortcut so that I can use that text later without having to retype it.

  • It must save my shortcut and text input.
  • I must be able to access saved shortcuts.

As a developer, I want a program that can save templates of code and text I write every day. I would like to be able to modify my templates by adding text variables that can be replaced whenever I have to reuse the template.

  • I must be able to save and access large templates of code and text.
  • I must be able to add variables when I create a template.
  • I must be able to replace those variables with text later when I want to use my template

Description

The Code Cheats application allows a user to input text and assign that text a shortcut. When the user selects the shortcut the program will return the assigned text.

Setup/Installation Requirements

  • Clone this repository to your desktop
  • Run composer install in Terminal
  • Start up Apache and MySQL
  • CREATE DATABASE expander;
  • USE expander;
  • CREATE TABLE snippets (id serial PRIMARY KEY, shortcut VARCHAR (255), text LONGTEXT);
  • start a server in web directory (php -S localhost:8000)
  • Go to localhost:8000 in web browser
  • Enjoy

Behavior Driven Development

Behavior Input Output
User can save a Snippet instance and shortcut in the database "em" => "me@email.com" "em" => "me@email.com"
User can save variable into input "em" => "me@(variable.com)"
Before final output, user can change information in variable "me@(variable.com)" "me@gmail.com"
The program can retrieve the saved Snippet by its shortcut "em" "me@email.com"
User can see all saved Snippets click dropdown "em", "class", "getset"
User can modify an existing Snippet "em == me@email.com" "em == you@email.com"
User can delete an individual Snippet "te", click "delete" ""
User can delete all Snippets click delete all ""

Known Bugs

When highlighting text to replace it with a variable, the original text does not delete

Support and contact details

Technologies Used

  • HTML
  • PHP
  • TWIG 1.0
  • SILEX 1.1
  • MySQL

License

This webpage is licensed under the GPL license.

Copyright (c) 2016 Code Cheats