Project 1, Part 2

Marvel Character Lookup from Web Page
Due: Oct 4, 11:55 pm

Moodle Link

marvel_birthday.jpg

Goal

To take the code from project one that allows the looking up of Marvel Characters with an inverted index, and create a web version. Rather then write this from scratch you will reuse and modify the code from part one, as well as the provided code for the US Census name lookup program.

Minimum Functionality:

  1. Enter in a name or year to search for.
  2. Display the number of matching character.
  3. Allow the user to select a character to see complete information
  4. Allow user to go to the characters Marvel Wiki character page. All you have to do is append the third item in the character data (urlslug) to the end of " https://marvel.fandom.com/wiki/ "
Additional Functionality
  1. Multi name search.
  2. Show a picture of the character in the page.
  3. ???

US Census Name data program

You have been given the code to look up names in the US Census data. The architecture of the solution is seen below:

NamesWebArchtecture.png

The code for this US Census Name Data lookup system is located at (c++) https://github.com/jimskon/NamesDemo or (Python) https://github.com/jimskon/PythonNameLookup.git.

Clone the program to your folder

For C++ Type: "git clone https://github.com/jimskon/NameLookup"

For Python type: "git clone https://github.com/jimskon/PythonNameLookup.git"

Change the names

You will need to change the programs in two files to make it work correctly for you. You can use textwrangler or notepad++

1. Change the Makefile

Copy this project into a new folder in your folder. Then change the "user= skon" in the Makefile to be "user=username" where username is your server username.

2. Change the reference to the CGI program in the HTML file

For C++ in namelookup.js change the line:

     XMLHttp.open("GET", "/cgi-bin/skon_namelookup.cgi?"

Or for Python in namelookup.js change the line (44):

     url: "/cgi-bin/skon_namelookup.py",

so that skon is now your username. This makes sure your code is copied to the right directories, and with the correct names.

Run the program

To run the system go to the project folder (see above) in a ssh terminal.

  1. Make the project: make
  2. Go to your folder with a browser, and open namelookup.html
    e.g.:
https://cslab.kenyon.edu/class/softdev/username/namelookup.html 

Create a new project

You will need to make a copy of the nameserver folder to use as the wtarting point for the new Shakespeare project. From your main directory make a copy (C++ version):

cd ~
cp -r namelookup marvelproject2

or for Python:

cd ~
cp -r PythonNameLookup marvelproject2

You will then need to change the file names, and then change the Makefile to make the changes in the filenames. You are required to use a makefile for this project.

Marvel Lookup Program

In project 1 you created code to lookup characters in the Marvel database. You will combine that code with the code from this US Name data system to make a web version of your Marvel Character Lookup Program.

You will need to modify the program to serve up Marvel Character information

  1. Make a copy of the Name Lookup program (C++ or Python)
  2. Rename the files as appropriate, change the Makefile to reflect these changes
  3. Modify the the HTML and Javascript from the Name Lookup. You will need to change the name of the program called in the $AJAX command to match your program (and name). You will need to modify them to collect and send the type of search (name or year), and the search string (s). (You only need to send the search string if you only have a single index).
  4. Modify the CGI program (renamed from namelookup.cpp or namelookup.py) to receive a search type and word from the web page, lookup the lines with the matching words matching lines back, and send them to the web page.
  5. Make the user interface look good, and be easily usable by the casual user.
  6. Add in any extra features.

Grading

Below is a list of features you can put in your program, along with the points. Notice that people with Data Structures must do more than students with only the introduction course to get 100 points (the perfect score) on the program. If you do more than 100 points, you getr= extra credit.

Requirement Data Structures Intro Prog Comments Score
Name Match - Program displays the number of matches, shows matching characters for each name entered on the web page. 30 60    
Year Match - Program displays the number of matches, shows matching characters for each year entered on the web page 30 60    
Program shows the picture of each character (you have to figure this out!) 10 15    
Program allows the searching for two names on the same line. 15 20    
Well designed User Interface* 10 10    
Program broken up into functionally cohesive functions* 10 10    
Program has meaningful comments, good variable names, and good formatting* 10 10    
Program uses appropriate classes 10 10    
Total        
*These are required in order to get extra credit.

Turn in

  1. The program must be runnable.
  2. All source files you authored
  3. A writeup with the table above, and an indicated of which was included. Paste table into Moodle text field, and put X's in to options you attempted. Also include a statement of the highest computer science course you have taken.
  4. Several runs showing all features.
Topic attachments
I Attachment History Action Size Date Who Comment
JPEGjpg Gamora_AIW_Profile.jpg r1 manage 858.9 K 2019-09-11 - 14:00 JimSkon  
PNGpng NamesWebArchtectureSimple.png r1 manage 48.7 K 2017-10-10 - 03:24 JimSkon  
PNGpng Screen_Shot_2017-01-26_at_9.14.36_AM.png r1 manage 310.4 K 2017-10-10 - 01:50 JimSkon  
JPEGjpg marvel_birthday.jpg r1 manage 116.9 K 2019-09-11 - 17:45 JimSkon  
GIFgif shake.gif r1 manage 36.6 K 2017-10-10 - 01:49 JimSkon  
Edit | Attach | Watch | Print version | History: r16 < r15 < r14 < r13 < r12 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r16 - 2019-10-09 - JimSkon
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback