Permalink
Browse files

Merge branch 'master' of github.com:andrewiggins/Textbook-Price-Aggre…

…gator
  • Loading branch information...
2 parents e4ed91c + a08180c commit 3fffae3b9bb0dd34970bb4930e1292c9c66bb0fb Jacob Marsh committed Apr 29, 2011
View
@@ -1,17 +1,20 @@
Textbook Price Aggregator
=========================
A project to aggregate the price of online textbook retailers on one easy website.
+This project is designed to run on Google App Engine, so to run the code locally,
+[Python] 2.5 or greater and the [Google App Engine Python SDK] must be installed.
-Basic Idea
-==========
+See Google App Engine Python docs on [running the code locally].
-1. Searches several (half.com, amazon, Barnes and Noble, coop, with room for
- more later) online bookstores for the desired books.
-2. Can take as input either textbook name, ISBN, or select classes from LSU
- (room for expansion) which will then pick the needed books
- a. Course offerings website scraper already written.
- b. Need a scraper for LSU Bookstore to get actual books
- (http://lsu.bncollege.com/webapp/wcs/stores/servlet/TBWizardView?catalogId=10001&storeId=19057&langId=-1)
-3. Sort the books based on quality and price (which will hopefully include shipping)
-4. Could augment prices by a small amount ($0.50 maybe) and have the application
- purchase the books from the original seller in order to monetize the service
+Usage
+=====
+
+`$python main.py`
+
+- This will point your default web browser to our public site
+ `http://swat-books.appspot.com`. The code in this project is the same code as
+ on Google App Engine.
+
+[Python]: http://python.org/ "Python Website"
+[Google App Engine Python SDK]: http://code.google.com/appengine/downloads.html "Google App Engine Python SDK Download"
+[running the code locally]: http://code.google.com/appengine/docs/python/tools/devserver.html "The Google App Engine Python Development Server"
View
@@ -0,0 +1,13 @@
+Basic Idea
+==========
+
+1. Searches several (half.com, amazon, Barnes and Noble, coop, with room for
+ more later) online bookstores for the desired books.
+2. Can take as input either textbook name, ISBN, or select classes from LSU
+ (room for expansion) which will then pick the needed books
+ a. Course offerings website scraper already written.
+ b. Need a scraper for LSU Bookstore to get actual books
+ (http://lsu.bncollege.com/webapp/wcs/stores/servlet/TBWizardView?catalogId=10001&storeId=19057&langId=-1)
+3. Sort the books based on quality and price (which will hopefully include shipping)
+4. Could augment prices by a small amount ($0.50 maybe) and have the application
+ purchase the books from the original seller in order to monetize the service
View
@@ -22,8 +22,11 @@
# limitations under the License.
#-------------------------------------------------------------------------------
+import webbrowser
+
def main():
- pass
+ url = 'http://swat-books.appspot.com'
+ webbrowser.open(url)
if __name__ == '__main__':
main()
View
@@ -54,12 +54,8 @@ def get(self):
url = "/error/400?msg=%s" % msg
self.redirect(url)
else:
- path = '../static/templates/book.html'
- textbook_url = "../textbook/%s"%isbn
- retailers=parsers.retailers.available_retailers()
- listing_urls = ["../textbooklistings/%s/%s"%(retailer,isbn) for retailer in retailers]
- template_values={"url":textbook_url,"urls":listing_urls}
- self.response.out.write(template.render(path, template_values, True))
+ path = '../static/templates/book.html'
+ self.response.out.write(template.render(path, {}, True))
class TextbookLookup(webapp.RequestHandler):
@@ -156,6 +156,7 @@ thead {
.table {
display: table;
border-collapse: collapse;
+ width: 100%;
}
.cell {
@@ -1,8 +1,27 @@
/**
- * This javascript file contains javascript methods pertaining to the getting,
- * processing, and outputing of SWAT Textbooks data.
+ *------------------------------------------------------------------------------
+ * Name: datafuncs.js
+ * Purpose: This javascript file contains javascript methods pertaining to
+ * the getting, processing, and outputing of SWAT Textbooks data.
+ *
+ * Author(s): Andre Wiggins, Andrew Stewart
+ *
+ * Created: 04/22/2011
+ * Copyright: (c) Jacob Marsh, Andrew Stewart, Andre Wiggins 2011
+ * License:
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * Requires the util file: util.js
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * -----------------------------------------------------------------------------
*/
View
@@ -1,3 +1,29 @@
+/**
+ *------------------------------------------------------------------------------
+ * Name: util.js
+ * Purpose: This javascript file contains utility javascript methods
+ * pertaining to actions such as sorting and validating data.
+ *
+ * Author(s): Andre Wiggins, Andrew Stewart
+ *
+ * Created: 04/22/2011
+ * Copyright: (c) Jacob Marsh, Andrew Stewart, Andre Wiggins 2011
+ * License:
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * -----------------------------------------------------------------------------
+ */
+
util = {
/**
@@ -1,11 +1,37 @@
+{% comment %}
+#-------------------------------------------------------------------------------
+# Name: search.py
+# Purpose: The base html file that all other html files inherit from.
+# Contains our header and footer
+#
+# Author: Andre Wiggins, Andrew Stewart
+#
+# Created: 04/25/2011
+# Copyright: (c) Jacob Marsh, Andrew Stewart, Andre Wiggins 2011
+# License:
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#-------------------------------------------------------------------------------
+{% endcomment %}
+
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<script src=" https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/util.js"></script>
<script type="text/javascript" src="/js/datafuncs.js"></script>
- <link rel="stylesheet" href="/css/base.css" />
+ <link rel="stylesheet" href="/css/styles.css" />
<title>{% block title %}S.W.A.T. Textbooks{% endblock title %}</title>
{% block head %}{% endblock %}
@@ -1,4 +1,28 @@
{% extends "base.html" %}
+{% comment %}
+#-------------------------------------------------------------------------------
+# Name: search.py
+# Purpose: The book html file that contains the html for the book page.
+#
+# Author: Andre Wiggins, Andrew Stewart
+#
+# Created: 04/25/2011
+# Copyright: (c) Jacob Marsh, Andrew Stewart, Andre Wiggins 2011
+# License:
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#-------------------------------------------------------------------------------
+{% endcomment %}
{% block head %}
<script type="text/javascript">
@@ -32,7 +56,7 @@
var overlay_container = '#textbook';
var data_container = '#tbtextbook';
$.ajax({
- url:'{{ url }}',
+ url:'/textbook/' + isbn,
dataType: 'json',
success: function(data) {
textbook = data;
@@ -1,4 +1,28 @@
{% extends "base.html" %}
+{% comment %}
+#-------------------------------------------------------------------------------
+# Name: search.py
+# Purpose: The error html file that contains the html for the error page.
+#
+# Author: Andre Wiggins
+#
+# Created: 04/25/2011
+# Copyright: (c) Jacob Marsh, Andrew Stewart, Andre Wiggins 2011
+# License:
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#-------------------------------------------------------------------------------
+{% endcomment %}
{% block title %}{{ title }}{% endblock title %}
@@ -1,4 +1,28 @@
{% extends "base.html" %}
+{% comment %}
+#-------------------------------------------------------------------------------
+# Name: search.py
+# Purpose: The home html file that contains the html for the home page.
+#
+# Author: Andrew Stewart
+#
+# Created: 04/25/2011
+# Copyright: (c) Jacob Marsh, Andrew Stewart, Andre Wiggins 2011
+# License:
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#-------------------------------------------------------------------------------
+{% endcomment %}
{% block content %}
<form name="mainsearch" id="mainsearch" action="/searchresults" method="get" onsubmit="return util.validateForm('mainsearch')">
@@ -1,4 +1,28 @@
{% extends "base.html" %}
+{% comment %}
+#-------------------------------------------------------------------------------
+# Name: search.py
+# Purpose: The search html file that contains the html for the search page.
+#
+# Author: Andre Wiggins, Andrew Stewart
+#
+# Created: 04/25/2011
+# Copyright: (c) Jacob Marsh, Andrew Stewart, Andre Wiggins 2011
+# License:
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#-------------------------------------------------------------------------------
+{% endcomment %}
{% block head %}
<script type="text/javascript">

0 comments on commit 3fffae3

Please sign in to comment.