Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reworked code #4

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added batch-1/html-page/a.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions batch-1/html-page/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
body {
margin:0px;
padding:0px;
font-size:13px;
line-height:21px;
color:#2d1604;
background-color:#78bbe6;
font-family:Arial, Helvetica, sans-serif;
}

#wrapper {
width:900px;
margin:0 auto;
padding:20px 0 10px 0;

}

.navigation{
margin:-10px 0px 10px;

padding:15px 5px;


}
.hi
{
margin:0px 0px 20px;
padding:15px 5px;
float:right;
font-family: 'Open Sans';

}
.new {
margin:0px 0px 20px;
padding:15px 5px;
float:right;
width:605;
}




#page_content{
padding:10px;
background:url(http://3.bp.blogspot.com/-s_uJ9Kk_MD4/Vjp3nuxHqZI/AAAAAAAACHg/uzNsVZvjLkQ/s320/h.png) repeat;
border-radius:25px;
height: 770px;
}

#page_content .right_section{
width:625px;
float:right;
padding:15px;
border-left:#d4d093
}
a:hover {
color: #86d8dc;
}




62 changes: 62 additions & 0 deletions batch-1/html-page/css/style.css~
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
body {
margin:0px;
padding:0px;
font-size:13px;
line-height:21px;
color:#2d1604;
background-color:#78bbe6;
font-family:Arial, Helvetica, sans-serif;
}

#wrapper {
width:900px;
margin:0 auto;
padding:20px 0 10px 0;

}

.navigation{
margin:-10px 0px 10px;

padding:15px 5px;


}
.hi
{
margin:0px 0px 20px;
padding:15px 5px;
float:right;
font-family: 'Open Sans', sans-serif;

}
.new {
margin:0px 0px 20px;
padding:15px 5px;
float:right;
width:605;
}




#page_content{
padding:10px;
background:url(http://3.bp.blogspot.com/-s_uJ9Kk_MD4/Vjp3nuxHqZI/AAAAAAAACHg/uzNsVZvjLkQ/s320/h.png) repeat;
border-radius:25px;
height: 770px;
}

#page_content .right_section{
width:625px;
float:right;
padding:15px;
border-left:#d4d093
}
a:hover {
color: #86d8dc;
}




43 changes: 43 additions & 0 deletions batch-1/html-page/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<html>
<head>
<title>Basil </title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="wrapper">
<div id="page_content">
<div class="navigation">
<img src="http://3.bp.blogspot.com/-K232ZoYV2HU/Vjp3nXQmwHI/AAAAAAAACHc/NkQXtuxFyds/s1600/a.jpg"/>

<div class="hi">
<a href="https://github.com/basilpbabu" target="_blank"><i id="1a" class="fa fa-github fa-3x" ></i></a> &nbsp;
<a href="https://www.facebook.com/basil.pbabu" target="_blank"><i class="fa fa-facebook-square fa-3x"></i></a>&nbsp;
<a href="https://twitter.com/basilpbabu" target="_blank"><i class="fa fa-twitter fa-3x"></i></a>
</div>
<div class="new">
<h1>Basil P Babu</h1>
</div>
</div>




<div class="right_section">

<h1>Topics Covered</h1>
<h3>1 Nov 2015 </h3>
<p>We people had a dream in our mind and at last we found our guy who can guide us through the right way.
The first day was so much fun and we learned a lot </p>
<ul >
<li><h4>Vim Basic Commands and Advantages</h4></li>
<li><h4>Curl which is used to access files from websites</h4></li>
<li><h4>wget filename is used to download files from web</h4></li>
<li><h4>youtube-dl is used for downloaidng youtube videos</h4></li>
<li><h4>grep is used to filter words and find the matching one</h4></li>
</ul>
</body>
</html>
62 changes: 62 additions & 0 deletions batch-1/movie-info/basil/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
body {
margin:0px;
padding:0px;
font-size:13px;
line-height:21px;
color:#2d1604;
background-color:#78bbe6;
font-family:Arial, Helvetica, sans-serif;
}

#wrapper {
width:900px;
margin:0 auto;
padding:20px 0 10px 0;

}

.navigation{
margin:-10px 0px 10px;

padding:15px 5px;


}
.hi
{
margin:0px 0px 20px;
padding:15px 5px;
float:right;
font-family: 'Open Sans';

}
.new {
margin:0px 0px 20px;
padding:15px 5px;
float:left;
width:20px;
}




#page_content{
padding:10px;
background:url(http://3.bp.blogspot.com/-s_uJ9Kk_MD4/Vjp3nuxHqZI/AAAAAAAACHg/uzNsVZvjLkQ/s320/h.png) repeat;
border-radius:25px;
height: 570px;
}

#page_content .right_section{
width:600px;
float:right;
padding:15px;
border-left:#d4d093
}
a:hover {
color: #86d8dc;
}




62 changes: 62 additions & 0 deletions batch-1/movie-info/basil/css/style.css~
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
body {
margin:0px;
padding:0px;
font-size:13px;
line-height:21px;
color:#2d1604;
background-color:#78bbe6;
font-family:Arial, Helvetica, sans-serif;
}

#wrapper {
width:900px;
margin:0 auto;
padding:20px 0 10px 0;

}

.navigation{
margin:-10px 0px 10px;

padding:15px 5px;


}
.hi
{
margin:0px 0px 20px;
padding:15px 5px;
float:right;
font-family: 'Open Sans';

}
.new {
margin:0px 0px 20px;
padding:15px 5px;
float:left;
width:20px;
}




#page_content{
padding:10px;
background:url(http://3.bp.blogspot.com/-s_uJ9Kk_MD4/Vjp3nuxHqZI/AAAAAAAACHg/uzNsVZvjLkQ/s320/h.png) repeat;
border-radius:25px;
height: 970px;
}

#page_content .right_section{
width:600px;
float:right;
padding:15px;
border-left:#d4d093
}
a:hover {
color: #86d8dc;
}




38 changes: 38 additions & 0 deletions batch-1/movie-info/basil/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<html>
<head>
<title>Basil </title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="wrapper">
<div id="page_content">
<div class="navigation">
<h4><img src="http://1.bp.blogspot.com/-R4IlTr8LUBs/VkX5u6_vvJI/AAAAAAAACIc/jlyu6t5L3i8/s1600/cooltext148256034413733.png"/></h4>


<div class="new">
<img height="317" width="214" style="padding-left:40%;padding-top:25px;padding-bottom:25px" src= {{Poster}} />
</div>
</div>




<div class="right_section">


<ul list-style-type: none; >
<li><h2>Name: {{Title}} </h2></li>
<li><h2>Released: {{Released}} </h2></li>
<li><h2>Genre: {{Genre}} </h2></li>
<li><h2>Plot: {{Plot}}</h2> </li>
<li><h2>{{code}}</h2></li>
</ul>
<div id="youtubeDiv"></div>
<script>ytEmbed.init({'block':'youtubeDiv','type':'search','q':'music video','results': 3});</script>
</body>
</html>
37 changes: 37 additions & 0 deletions batch-1/movie-info/basil/movie.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<html>
<head>
<title>Basil </title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="wrapper">
<div id="page_content">
<div class="navigation">
<h4><img src="http://1.bp.blogspot.com/-R4IlTr8LUBs/VkX5u6_vvJI/AAAAAAAACIc/jlyu6t5L3i8/s1600/cooltext148256034413733.png"/></h4>


<div class="new">
<img height="317" width="214" style="padding-left:40%;padding-top:25px;padding-bottom:25px" src= http://ia.media-imdb.com/images/M/MV5BMjEyNDQwMTQ3OV5BMl5BanBnXkFtZTcwMTY5MzI0MQ@@._V1_SX300.jpg />
</div>
</div>




<div class="right_section">


<ul >
<li><h2>Name: Dead Silence </h2></li>
<li><h2>Released: 16 Mar 2007 </h2></li>
<li><h2>Genre: Horror, Mystery, Thriller </h2></li>
<li><h2>Plot: A widower returns to his hometown to search for answers to his wife's murder, which may be linked to the ghost of a murdered ventriloquist.</h2> </li>
</ul>
<div id="youtubeDiv"></div>
<script>ytEmbed.init({'block':'youtubeDiv','type':'search','q':'music video','results': 3});</script>
</body>
</html>
20 changes: 20 additions & 0 deletions batch-1/movie-info/basil/new.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
require 'open-uri'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@basilpbabu If you have the new version (with Class) handy, please update this file as well.

require 'json'

puts"Enter the Movie title:"
movie_name=gets.chomp.split(" ").join("+")
url= "http://www.omdbapi.com/?t=#{movie_name}&y=&plot=short&r=json"
trailerurl="http://trailersapi.com/trailers.json?movie=#{movie_name}&limit=1&width=320"
content1 = open(trailerurl).read
trailer_hash=JSON.parse(content1)
content = open(url).read
content_hash=JSON.parse(content)
html_file=File.new("movie.html","w")
movie_details=File.read("index.html")
n=Array['{{Poster}}','{{Title}}','{{Released}}','{{Genre}}','{{Plot}}']
p=Array['Poster','Title','Released','Genre','Plot']
movie_details=movie_details.gsub("{{code}}",trailer_hash[0]["code"])
for i in 0..4
movie_details=movie_details.gsub(n[i],content_hash[p[i]])
end
html_file.puts(movie_details)