-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.html
198 lines (169 loc) · 9.33 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<meta charset="UTF-8"><style>html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
body{
color:#444;
font-family:Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif;
font-size:12px;
line-height:1.5em;
background:#fefefe;
width: 45em;
margin: 80px auto;
padding: 5em 5em;
outline: 1300px solid #FAFAFA;
}
a{ color: #0645ad; text-decoration:none;}
a:visited{ color: #0b0080; }
a:hover{ color: #06e; }
a:active{ color:#faa700; }
a:focus{ outline: thin dotted; }
a:hover, a:active{ outline: 0; }
span.backtick {
border:1px solid #EAEAEA;
border-radius:3px;
background:#F8F8F8;
padding:0px 3px 0px 3px;
}
::-moz-selection{background:rgba(255,255,0,0.3);color:#000}
::selection{background:rgba(255,255,0,0.3);color:#000}
a::-moz-selection{background:rgba(255,255,0,0.3);color:#0645ad}
a::selection{background:rgba(255,255,0,0.3);color:#0645ad}
p{
margin:1em 0;
}
img{
max-width:100%;
}
h1,h2,h3,h4,h5,h6{
font-weight:normal;
color:#111;
line-height:1em;
}
h4,h5,h6{ font-weight: bold; }
h1{ font-size:2.5em; }
h2{ font-size:2em; }
h3{ font-size:1.5em; }
h4{ font-size:1.2em; }
h5{ font-size:1em; }
h6{ font-size:0.9em; }
blockquote{
color:#666666;
margin:0;
padding-left: 3em;
border-left: 0.5em #EEE solid;
}
hr { display: block; height: 2px; border: 0; border-top: 1px solid #aaa;border-bottom: 1px solid #eee; margin: 1em 0; padding: 0; }
pre , code, kbd, samp {
color: #000;
font-family: monospace;
font-size: 0.98em;
border-radius:3px;
background-color: #F8F8F8;
border: 1px solid #CCC;
}
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 5px;}
pre code { border: 0px !important; }
b, strong { font-weight: bold; }
dfn { font-style: italic; }
ins { background: #ff9; color: #000; text-decoration: none; }
mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }
ul, ol { margin: 1em 0; padding: 0 0 0 2em; }
li p:last-child { margin:0 }
dd { margin: 0 0 0 2em; }
img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
table { border-collapse: collapse; border-spacing: 0; }
td { vertical-align: top; }
@media only screen and (min-width: 480px) {
body{font-size:14px;}
}
@media only screen and (min-width: 768px) {
body{font-size:16px;}
}
@media print {
* { background: transparent !important; color: black !important; filter:none !important; -ms-filter: none !important; }
body{font-size:12pt; max-width:100%;}
a, a:visited { text-decoration: underline; }
hr { height: 1px; border:0; border-bottom:1px solid black; }
a[href]:after { content: " (" attr(href) ")"; }
abbr[title]:after { content: " (" attr(title) ")"; }
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
pre, blockquote { border: 1px solid #999; padding-right: 1em; page-break-inside: avoid; }
tr, img { page-break-inside: avoid; }
img { max-width: 100% !important; }
@page :left { margin: 15mm 20mm 15mm 10mm; }
@page :right { margin: 15mm 10mm 15mm 20mm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3 { page-break-after: avoid; }
}</style><style>
img{display:block;}
.download img{display: inline;}
.done{
text-decoration: line-through;
}
</style>
<p><a href="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a></p>
<h1>Coursera Video Downloader Bookmarklet</h1>
<p>This bookmarklet adds functionality to <a href="http://coursera.org">Coursera</a>'s Video Lectures page to download and organize multiple videos at once with curl.</p>
<p><img alt="Screenshot of the Coursera Video Downloader Bookmarklet" src="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet/raw/master/screenshots/coursera_videos_after_bookmarklet.png" /></p>
<p>The bookmarklet generates bash code that can be entered directly into the command line and will download the selected videos sequentially. The videos are organized in the following structure:</p>
<pre><code>1. Introduction - Why Model?/
1. Why Model?.mp4
2. Intelligent Citizens of the World.mp4
...
2. Segregation and Peer Effects/
...
</code></pre>
<h2>Use</h2>
<ol>
<li><span id="step1" class="">Navigate to this project's <a href="http://christiangenco.github.com/Coursera-Video-Downloader-Bookmarklet#step2">GitHub Page</a>. (<a href="#why_github_pages">Why?</a>)</span></li>
<li><a name="step2"></a>Drag and drop this link to your bookmarks bar: <a href="javascript:((function()%7Bvar%20s%3Ddocument.createElement('script')%3Bs.setAttribute('type'%2C'text%2Fjavascript')%3Bs.setAttribute('charset'%2C'UTF-8')%3Bs.setAttribute('src'%2C%22https%3A%2F%2Fraw.github.com%2Fchristiangenco%2FCoursera-Video-Downloader-Bookmarklet%2Fmaster%2Fcoursera_downloader.js%22)%3Bdocument.documentElement.appendChild(s)%3B%7D)())">Coursera Downloader</a>.
<img alt="Bookmarklet" src="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet/raw/master/screenshots/bookmarklet.png" /></li>
<li>Navigate to the "Video Lectures" page of any Coursera course.
<img alt="Coursera Video Lectures" src="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet/raw/master/screenshots/coursera_videos_page.png" /></li>
<li>Click the "Coursera Downloader" bookmarklet in your bookmarks bar. This will add checkboxes to each video and a command output section at the top of the page.
<img alt="Coursera Video Lectures After Bookmarklet" src="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet/raw/master/screenshots/coursera_videos_after_bookmarklet.png" /></li>
<li><a name="select_all"></a> Select the videos you wish to download.</li>
<li>"Select all" and "copy" the generated bash code in the text area near the top of the page.
<img alt="Copy Bash Code" src="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet/raw/master/screenshots/copy_code.png" /></li>
<li>On your machine, open a terminal and navigate to the location you'd like your videos downloaded to.
<img alt="cd to video download location" src="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet/raw/master/screenshots/cd_to_folder.png" /></li>
<li>Paste the GIGANTIC command into your terminal and hit enter.
<img alt="Past in generated code" src="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet/raw/master/screenshots/terminal.png" /></li>
</ol>
<p>Your selected videos will now be downloaded with the <span class="backtick">curl</span> utility and organized as described above.</p>
<h2>Notes</h2>
<p><a name="why_github_pages"></a><em>Why do I have to navigate to this project's <a href="http://christiangenco.github.com/Coursera-Video-Downloader-Bookmarklet">GitHub Page</a> before installing the bookmark?</em></p>
<p>The GitHub-flavored markdown renderer on <a href="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet">this project's repo page</a> doesn't allow inline javascript, which is how the bookmark functions, so the simple "drag-and-drop" into your bookmarks bar doesn't work. GitHub pages allow this.</p>
<h2>Other Coursera Downloader Tools</h2>
<ul>
<li><a href="https://github.com/jplehmann/coursera">coursera-dl</a> by <a href="https://github.com/jplehmann">jplehmann</a>: "Script for downloading Coursera.org videos and naming them." (python)</li>
<li><a href="https://github.com/LoganDing/Coursera.org-Downloader">coursera_downloader.py</a> by <a href="https://github.com/LoganDing/">LoganDing</a>: "A python script to download lectures (videos and slides) from Cousera.org" (python)</li>
</ul>
<h2>Acknowledgements</h2>
<p>This project is an expansion of <a href="https://gist.github.com/1989008">a gist</a> by <a href="https://gist.github.com/csabapalfi">csabapalfi</a>.</p>
<h2>Contact</h2>
<p>Suggestions are welcome! Please tweet your bugs or improvements to <a href="http://twitter.com/cgenco">@cgenco</a>.</p>
<hr />
<p>Get the source code on GitHub: <a href="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet">christiangenco/Coursera-Video-Downloader-Bookmarklet</a></p>
<div class="download">
<a href="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet/zipball/master">
<img border="0" width="90" src="https://github.com/images/modules/download/zip.png"></a>
<a href="https://github.com/christiangenco/Coursera-Video-Downloader-Bookmarklet/tarball/master">
<img border="0" width="90" src="https://github.com/images/modules/download/tar.png"></a>
</div>
<script type="text/javascript">
var e = document.getElementById("step1");
e.setAttribute("class", "done"); //For Most Browsers
e.setAttribute("className", "done"); //For IE; harmless to other browsers.
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-30513002-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>