Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A proxy server that converts and uploads PDFs to smusique.com

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 res
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 S3.py
Octocat-spinner-32 app.yaml
Octocat-spinner-32 index.html
Octocat-spinner-32 index.yaml
Octocat-spinner-32 main.py
README.md

A standalone Google App Engine application that uploads files to smusique.com.

API Description

GET /:

Provides an upload form supporting both PDF files and plaintext tabs/chords at up.smusique.com

POST /:

Takes form-encoded info about the work being uploaded:

Required fields:

  • title (string)
  • composer (string)
  • label (string)
  • notation (string)

XOR fields (exactly one must be specified):

  • text (string)
  • pdf (binary)
  • pdfurl (string)

Optional fields:

  • rating (int)

Test cases

Tests first! Write unit tests in QUnit for these cases:

  1. Not all required fields are specified.
  2. None of the XOR fields are specified.
  3. More than one of the XOR fields are specified.
  4. Invalid file is uploaded.
  5. Invalid URL is specified.
  6. PDF with N pages is uploaded, ensure that N expected URLs are created.
  7. Something is uploaded, ensure that a corresponding smusique database entry gets created.
Something went wrong with that request. Please try again.