GithubHelp home page GithubHelp logo

cbx33 / wvote Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wilm0x42/wvote

0.0 1.0 0.0 2.05 MB

Website for facilitating a weekly music composition challenge

License: GNU General Public License v3.0

HTML 29.24% Python 63.36% Shell 0.72% CSS 6.69%

wvote's Introduction

wVote

Voting time!

Install

On the server host:

  • sudo python3 -m pip install -r requirements.txt

From home:

  • deploy.sh <user@remotehost>

bot.conf

bot.conf expects the following parameters:

  • command_prefix=: this sets the string that is to precede all discord commands
  • bot_key=: This is your bot key for the discord API
  • admin=: This is the discord ID of someone who should be an "admin" in wVote. You can put several of these, each on its own line.

Lines that start with a # will be ignored.

Data Structure of a Week:

root
|- "theme": Title of week, e.g. "Week 23: Test Drive"
|- "date": Pretty display of week's date: "June 27th 2020"
|- "submissionsOpen": whether or not !submit is allowed. The _next_ week is the one from which this parameter governs.
|- "entries": List of submitted entries for this week
|	|- "pdf": byte data of PDF
|	|- "pdfFilename": Name of PDF file
|	|-mp3: byte data of MP3, or URL to soundcloud/whatever
|	|-mp3Format: "mp3" if is raw mp3 file, or "external" if is simply to be linked to.
|	|	TODO: Support specific "soundcloud" format, so we can embed SC players in the page
|	|-entryName: Formal title of this entry
|	|-entrantName: Entrant's discord username. Can be edited by admins.
|	|-discordID: Entrant's discord ID
|	'-uuid: UUID assigned to each entry, so they can be unambiguously addressed.
'- "votes": list of submitted votes
	|- "ratings": list of the ratings in the vote
	|	|- "entryUUID": uuid of the entry being rated
	|	|- "voteForName": discord name of the composer of the entry being rated
	|	|- "voteParam": the name of category the entry is being rated on
	|	'- "rating": the rating of the entry for the category, [1, 5]
	|- "userID": discord ID of who cast the vote 
	'- "userName" : discord name of who cast the vote

Running tests

To run the automated test suite, first install the test requirements using pip, then run the pytest command.

pip install -r requirements-test.txt

pytest

Workflow:

!submit

  • Anyone can use this command, but only in DMs
  • Bot will reply with a secret link to a submission form
  • If an existing entry is found for this user in the same week, the user can revise their submission
  • Only inputs are "Entry Name" and the MP3 and PDF

!manage

  • Only "admins" (mods/admins in the 8bmt discord) can use this, and also only in DMs
  • Bot will reply with a secret link to an administrative management interface
  • This is where everything is staged and prepared for posting

!postentries

  • Post entries from current week into #weekly-challenge, pinging each entrant

wvote's People

Contributors

above-c-level avatar aero7405 avatar jesse-toftum avatar metallion avatar mrmyastan avatar rkirsling avatar tordek avatar wilm0x42 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.