瀏覽代碼

Updated documentation.

Jacob Levernier 9 年之前
父節點
當前提交
84a5d61ccc

文件差異過大導致無法顯示
+ 2 - 2
video_privacy_enhancer/Readme.md


+ 2 - 2
video_privacy_enhancer/video_privacy_enhancer.py

@@ -37,7 +37,7 @@ SETTINGS
 # Do not use a leading or trailing slash below (e.g., use "images/video-thumbnails"):
 output_directory_for_thumbnails = "images/video-thumbnails"
 
-# See the note above re: adding support for other video services to this list.
+# See the note in the Readme file re: adding support for other video services to this list.
 supported_video_services = {
 	"youtube": {
 		"shortcode_not_including_exclamation_point": "youtube",
@@ -56,7 +56,7 @@ In order for this plugin to work optimally, you need to do just a few things:
 	PLUGIN_PATH = "/pelican-plugins"  
 	PLUGINS = ["video_privacy_enhancer"]
 
-2a. If necessary, install jQuery on your site (See https://stackoverflow.com/questions/1458349/installing-jquery -- the jQuery base file should go into your Pelican themes 'static' directory)
+2a. If necessary, install jQuery on your site (See https://stackoverflow.com/questions/1458349/installing-jquery -- the jQuery base file should go into your Pelican theme's 'static' directory)
 
 2b. Copy the jQuery file in this folder into, for example, your_theme_folder/static/video_privacy_enhancer_jQuery.js, and add a line like this to the <head></head> element of your website's base.html (or equivalent) template:
 	`<script src="{{ SITEURL }}/theme/video_privacy_enhancer_jquery.js"></script> <!--Load jQuery functions for the Video Privacy Enhancer Pelican plugin -->`

+ 1 - 1
video_privacy_enhancer/video_service_thumbnail_url_generating_functions.py

@@ -25,7 +25,7 @@ def generate_thumbnail_download_link_youtube(video_id_from_shortcode):
 def generate_thumbnail_download_link_vimeo(video_id_from_shortcode):
 	"""Thumbnail URL generator for Vimeo videos."""
 	
-	# Following the Vimeo API at https://developer.vimeo.com/api#video-request, we need to request the video's metadata and get the thumbnail from that. To do this, we'll use the requests module both to get and parse the JSON for this task.
+	# Following the Vimeo API at https://developer.vimeo.com/api#video-request, we need to request the video's metadata and get the thumbnail from that. First, then, we'll get the metadata in JSON format, and then will parse it to find the thumbnail URL.
 	video_metadata = urllib.urlopen("https://vimeo.com/api/v2/video/" + video_id_from_shortcode + ".json") # Download the video's metadata in JSON format.
 	video_metadata_parsed = json.load(video_metadata) # Parse the JSON
 	video_thumbnail_large_location = video_metadata_parsed[0]['thumbnail_large'] # Go into the JSON and get the URL of the thumbnail.