Skip to content

Commit

Permalink
2016 Show changes, prepping for metaproject (#45)
Browse files Browse the repository at this point in the history
* Added name to authors (#4)
* Name (#7)
* Added Vlad to authors list (#10)
* Overhaul of structure to use DAOs and database for backend storage (#11)
* Initial database implementations (#12)
* Updated README (#14)
* Working code for 2016 show (#19)
* Created initial 'it works' test
* Restructured into separate tests. 'is-working' tests complete?
* Restructured 'all working' test
* Added more tests. Reorganized again
* One more test
* Added test for seq sec editor added on perm change. Implemented; passing
* All tests implemented except working and 0 sections
* All tests passing
* Restructured so sequence not returned on resection
* Converted main code to new permissions api
* Tests using new api. Removed check for sequence section editor. Some tests failing
* All tests passing
* Removed editor from sequence_section type
* Tests now want seq sec in range [0, numSections)
* SeqSec now 0-indexed. Removed last traces of editor field
* Updated README and fixed error in main
* Added checks
* Moving towards Fixtures instead of 2d blocks of sequence data
* Restructured to use DAOs and database setup instead of storing in flat files
* Added initial database backup
* Postgres connection working in channel dao
* Generalized common functionality
* Updated names, public instead of private key, uid for list-permissions
* Init project returns generated public key
* Updated database definition
* Looser Cargo package versions for upgrading/good documentation
* Adding initial user mostly implemented. Util function to gen pub/priv keys
* Store both pub/priv key. Trim before compare. Get uid from key started
* Permission handling stuff. PermissionEnum is string now for simplicity
* new-user fully implemented
* A little cleanup of tests; moving towards using again
* Removed unused imports. New return type for get-uid
* PermissionEnum updated. Preliminary work on add_sequence done
* new_sequence working?
* get_sequence command added to main
* new-layout function set up
* Reading layout from file. Locations and rotations checked
* Adding layout implemented. Transactions/removing not implemented
* Layout as of 11/21/2016 added
* Project in db behind DAO now as well. General cleanup
* set-sequence-layout working
* Existential dao functions
* Channel data now in separate table
* Moved db backups to separate folder
* get-layout-id command added, not implemented
* Finished implementing add-sequence
* get-playlist-data implemented
* new-vixen-sequence working. Nullable values changed to options.
* Updated Cargo.toml
* Added seqid to playlist output
* Changed the format of playlist data
* Added music file to playlist outputted data
* Made functional again after rebase
* Added sequence duration to Sequence object for accurate num_frames calc
* Added internal channel to Channel type and layout reading
* Patching stuff
* Added current db backup with internal channel
* Patching working now; hackish fix
* Added patch file
* Updated layout and patch
* Working show backed up
* Stopped copying music over
* Using postgres FUNCTION for patching
* Added DB with FUNCTION in last commit added
* New patch
* Added newer patches
* main.rs alphabetized. Added get-project command
* Cleaned up warnings
* More verbose patching
* Added SQL to reset database to clean state
* Fixed error with reading file as string
* WORKINGgit st!
* Working show backup
* Adding admin key for 1202 backup
* Actual working show backup (whoops)
* add-sequence turned into insert-sequence
* Udated patch
* Print statemets for verbosity
* 12_03 patch
* Different format for outputting playlist data
* Removed public keys from repo
* New sequences don't copy their music files to a Music/ directory
* Version now 0.19.1 as per SemVer (#33)
* Adding beginning of testing framework post-overhaul (#32)
* Documentation (#28)
* Removed rebase artifacts. Updated version in Cargo.lock (#34)
* Permissions checks moved from the second-tier functions to main.rs (#35)
* Permissions checks moved from the second-teir functions to main.rs
* Fixes issues to moving permissions check
* Updated version numbers for dependencies (removing wildcards) (#36)
  • Loading branch information
bookdude13 authored May 20, 2017
1 parent 891147e commit 87bbb7b
Show file tree
Hide file tree
Showing 83 changed files with 18,283 additions and 2,690 deletions.
357 changes: 225 additions & 132 deletions Cargo.lock

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
[package]
name = "proton_cli"
version = "0.1.0"
authors = ["Ramith Jayatilleka <[email protected]>"]
version = "0.20.1"
authors = ["Ramith Jayatilleka <[email protected]>, Ryan Fredlund <[email protected]>, Kayla Engelstad <[email protected]> , Vlad Kuksenko <[email protected]>"]
description = "Command line utility for managing ProtonLights projects."
homepage = "https://github.com/ProtonLights/cli"
repository = "https://github.com/ProtonLights/cli"
readme = "README.md"
license = "MIT"

[dependencies]
docopt = "0.6"
openssl = "~0.7"
sfml = "0.11.2"
git2 = "0.4.2"
rustc-serialize = "0.3.18"
regex = "0.1.71"
docopt = "^0.6"
openssl = "~0.9"
sfml = "~0.11"
rustc-serialize = "^0.3"
regex = "^0.2"
postgres = {version="~0.14", features = ["with-rustc-serialize"]}

[dev-dependencies]
tempdir = "0.3.4"
tempdir = "^0.3"

[[bin]]
name = "proton"
path = "src/main.rs"
74 changes: 56 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,67 @@ Command line interface to manipulate ProtonLights projects.

## Interface

- `init <folder> <root-public-key>`: Init empty project
- `new-user <admin-key> <name> <public-key>`: Add user from public key
- `remove-user <admin-key> <name>`: Removes user from project
- `new-sequence <admin-key> <name> <music-file>`: Init a sequence
- `remove-sequence <admin-key> <name>`: Removes a sequence and deletes its files
- `id-user <private-key>`: Identify user by ssh key (public key in repo)
- `list-permissions <private-key>`: Get list of user's permissions
- `set-permission <admin-key> (add | remove) <name> <permission> [<target>]`: Change user permissions
- `resection-sequence [TODO]`: (Re-)Section a sequence
- On init, section as section1.
- Number each section, and don't delete.
- Use patch to copy changes.
- Use git --find-renames=100%?
- `new-project <name> <layout-id>`
- `new-user <admin-key> <name>`
- `remove-user <admin-key> <uid>`
- `new-sequence <admin-key> <name> <music-file> <seq-duration> <layout-id>`
- `new-vixen-sequence <admin-key> <name> <music-file> <seq-duration> <frame-duration> <data-file> <- `layout-id>`
- `add-sequence <admin-key> <proj-name> <seqid>`
- `remove-sequence <admin-key> <proj-name> <seqid>`
- `delete-sequence <admin-key> <seqid>`
- `get-sequence <seqid>`
- `get-playlist-data <proj-name>`
- `set-sequence-layout <admin-key> <seqid> <layout-id>`
- `new-layout <layout-file>`
- `patch-layout <admin-key> <layout-id> <patch-file>`
- `new-section <admin-key> <t_start> <t_end> <seqid> <fixid>..`
- `get-user-id <public-key>`
- `get-layout-id <proj-name>`
- `list-permissions <uid>`
- `set-permission <admin-key> (add | remove) <uid> Administrate`
- `set-permission <admin-key> (add | remove) <uid> EditSequence <target-sequence>`
- `set-permission <admin-key> (add | remove) <uid> EditSection <target-sequence> <target-section>`
- `set-permission <admin-key> (add | remove) <name> EditSeqSec <target-section>`

Permissions include:
- edit sequence
- edit sequence section
- project administration
- edit show [TODO]
- edit sequence [TODO]
- edit sequence section [TODO]

## Native Dependencies

- cmake
- libssl-dev
- libsfml-dev
- libcsfml-dev
- libsfml-audio2.3v5
- libcsfml-audio2.3
- postgresql (version 9.5 works for sure)

## Setting up the database

Install postgresql
`$ sudo apt install postgres`

Set password of postgres user (can be anything. You won't be able to see the password while you type it)
`$ sudo passwd postgres`

Change to postgres user and start the server
`$ su - postgres`
`$ psql`

Set psql's postgres password (can/should be different than the other password)
`# \password postgres`

Create proton user (password used by cli, so keep the same)
`# CREATE USER proton WITH PASSWORD '1234qwermnbv'`

Create database
`# CREATE DATABASE proton_cli`

Quit psql
`# \q`

Load in database structure
`$ psql proton_cli < /path/to/proton-cli/db_backups/working_xx_p`

Done, so exit su
`$ exit`
Loading

0 comments on commit 87bbb7b

Please sign in to comment.