Overview
Transcript, this is a new module developed for showing YouTube Video with Transcript.
The main purpose of this module is integrating the YouTube video's transcript into our site.
- Transcripts are simple since they only contain the text of what was said in the video. This module implements the following functionality,
- Automatically highlighting the transcript text that is what was said in the video.
- Seeking the YouTube video at any point by clicking the transcript. Then YouTube Video will start to run from that particular time.
Why we need this module?
- We can use this module to enhance our website features
- Usefull for the people who cannot understand the spoken dialogue
- This is helpfull for who has hard of hearing to follow the dialog
- Useful for the people who are deaf
Main Idea
Generally we are integrating the YouTube Video alone but my module provides integrating the YouTube Video along with YouTube provided Transcript.
Drupal core version: 7.x
Other information
- Module name: Transcript
- Sandbox project page: https://www.drupal.org/sandbox/manimjs_drupal/2401575
- Git repository, branch 7.x-1.x:
- git clone --branch 7.x-1.x manimjs_drupal@git.drupal.org:sandbox/manimjs_drupal/2401575.git
- git clone --branch 7.x-1.x http://git.drupal.org/sandbox/manimjs_drupal/2401575.git
- Code review: http://pareview.sh/pareview/httpgitdrupalorgsandboxmanimjsdrupal2401575g...
Setting Repository
git clone --branch 7.x-1.x manimjs_drupal@git.drupal.org:sandbox/manimjs_drupal/2401575.git transcript
cd transcript
Requirements
The Drupal 7 version of Transcript needed JQuery 1.5 or later version. Its better to use the JQuery Update module.
Documentation
How it is working?
More About Transcript
Similar projects and how they are different
Media Transcriptions
Watson Transcription
Document Transcriptions.
Comparing with the above modules, my module is entirely different.
- Here, we are fetching the transcript content directly from the YouTube Site. We didn't maintain transcript into our site.
- No need to establish any Authentication or API with YouTube.
- Generally we are integrating the YouTube Video alone but my module provides integrating the YouTube Video with Transcript.
| Comment | File | Size | Author |
|---|
Comments
Comment #1
manimjs_drupal commentedComment #2
PA robot commentedProject 1: https://www.drupal.org/node/2401587
Project 2: https://www.drupal.org/node/2251329
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #4
arunmv commentedHi manimjs_drupal,
Thanks for your contribution.
I have found these issues in your module.
1. The @file block is missing in the file controle.js. Please add it.
2. The downloaded module shows the name '2401575' instead of Transcript.
Comment #5
manimjs_drupal commentedComment #6
rahulbaisanemca commentedHi manimjs_drupal,
I appreciate effort you have take to create this module, i have gone through your module file please just have a look at below tips to improve this module.
1) This is related to youtube-video-transcript.tpl.php file, please add below code on the top of the youtube-video-transcript.tpl.php file
2) This is regarding to name of the function prepare_transcript(). whenever we create a custom function in drupal
we have to write a function name in this format nameofmodule_functionname() {}. please follow these practice.
3) This is regarding your controle.js file
this is good practice to write your javascript code insight jQuery(document).ready(function($) {here is your javascript code.});
writing javascript code insight this function means the js should load after the DOM has been ready...
4)Again this is related to youtube-video-transcript.tpl.php file, here i would like to share very small but good enough thing to use in our coding practice.
a) id="my_youtube_video"
b) class="video_transcript"
Try to avoid "_" in class name or in id, instead use "-".
Thanks,
Rahul.
Comment #7
manimjs_drupal commentedHi arunmv and rahulbaisanemca,
Thank you very much for reviewed. All the issues are fixed except "writing javascript code inside Jquery". The Youtube API's predefined functions couldn't work inside Jquery so that we did not place inside it.
Please do review once again.
Comment #8
rahulbaisanemca commentedmy given issues are fixed by manimjs_drupal,
Thanks,
Rahul.
Comment #9
mdhanasekaran commentedHi manimjs_drupal,
I went through the module you have contributed, this is highly useful for Developers. Appreciate your effort. Keep up the good work and improve the features bit more.
Thanks
M.Dhanasekaran
Comment #10
rahulbaisanemca commentedHi manimjs_drupal,
There some issues to be handle please follow this link:
http://pareview.sh/pareview/httpgitdrupalorgsandboxmanimjsdrupal2401575g...
Thanks,
Rahul
Comment #11
rivimeyFrom the standard checklist:
1. Basic application checks
1.1 Ensure your application contains a repository and project page link. [Not OK: pareview link is broken.]
Use: http://pareview.sh/pareview/httpgitdrupalorgsandboxmanimjsdrupal2401575g...
1.2 Ensure your project is not a duplication. [OK]
2. Basic repository checks
2.1 Ensure the repository actually contains code. [OK]
3. Security Review
3.1 Ensure the project does not contain any security issues. []
4. Licensing checks
4.1 Ensure the repository does not contain a ‘LICENSE.txt’ file. [OK]
4.2 Ensure the repository does not contain any 3rd party (non-GPL) code. [OK]
5. Documentation checks
5.1 Ensure the project page contains detailed information. [Not OK: present but insufficiently detailed.]
5.2 Ensure the repository contains a detailed README.txt. [OK]
5.3 Ensure the code contains a well-balanced amount of inline-comments. [OK]
6. Coding standards and style
6.1 Run an automated review and ensure there are no major issues. [OK -- but]
[Some issues found: 3 warnings about 'Implements']
[Would suggest also adding some unit tests.]
[There are several issues with the coding style: See separate post.]
7. API and best practices Review
7.1 Ensure you are using Drupals API correctly. [API use looks reasonable]
Comment #12
rivimeyI mentioned in the checklist there were issues with the code. These are:
- The javascript file 'controle.js:
+ is written with the functions and variables at the global level, and so 'pollutes' the namespace. I am not a JS programmer but the standard pattern is use the "Drupal.behaviors" JS global with all code wrapped inside it. This also enables Drupal to correctly manage ajax tabs and similar. Even if not using Drupal.behaviors, it would be best to hide all but the external call point.
+ With the JS code using jQuery or 'Zepto' (haven't seen that) it would be helpful to mention this in the project page and indicate if there are version restrictions (e.g. jQ 1.8, 1.9? ...). Especially indicate which jQ version(s) you have tested the JS with.
+ There is a typo: the English word 'start' has no 'e' on the end (starteTranscript), and I would like to see the two numbers (100, 4000) documented and preferably pulled out as named constants.
+ Why is line 27 event.target.playVideo() commented out? Could it be deleted and if so could the whole function be deleted? If not, please include a comment as to why line 27 might be needed in the future.
- The CSS file transcript.css:
+ Looks fine, except that the CSS class names are too generic, especially 'tracks'.
- The file transcript.info:
+ The 'name' here could be improved by prefixing with "YouTube": "YouTube Video Transcript"
- The PHP file transcript.module
+ The configuration menu is put in admin/config, while it might be preferable to put it in admin/config/media to cooperate with other similar modules.
+ There is some sort of key or ID in the source: kswE_n0FNXk which I feel is inappropriate. If a default value is needed, include it as a named constant (define(...)) and indicate in the source what it refers to. Preferably however leave the default blank and also handle appropriately the case where there are invalid inputs (e.g. check that iframe_width/height/video_id are not what you would expect.
+ The function comment for transcript_get_tell_friend is not useful. Please rewrite the comment indicating why the function exists / what overall task it performs.
+ In transcript_get_tell_friend there are two calls to drupal_get_path. Better to assign the result to a local variable and use that. Doing so will also reduce the overlong line length.
+ The transcript_get_tell_friend call includes an error message that is not good English and also not wrapped in t() so is untranslateable. Finally, it would be beneficial to include a or
tag around the text to enable this message to be targetted by CSS.
+ transcript_fetch forms a URL using the php concat (.) operator without checking that the ID or lang variables are the sort of variables expected. It wouldn't hurt to call 'check_plain()' more here.
+ A call is made to 'simplexml_load_string()' -- it would be sensible to record that the simplexml extension to php is required.
+ Just wondering: is it necessary to use 'curl' or would drupal_http_request() be usable? drupal_http_request() is more 'portable' in the sense there is an established way to override it, and it is expected in Drupal php code that this is the way to do http requests. What benefit is use of curl providing here?
+ Line 128 has the expression: "$sec % 3600 / 60", which may not have the result you expect: I suggest you put brackets in to ensure the order of operation and make it clear, and if you actually mean "$sec % (3600 / 60)" then why not write "$sec % / 60" which is the same.
+ Extension opportunity: include a hook_requirements() check that the module is configured properly.
Comment #13
rivimeyComment #14
manimjs_drupal commentedComment #15
manimjs_drupal commentedComment #16
manimjs_drupal commentedComment #17
manimjs_drupal commentedHi rivimey,
Thank you very much for reviewed manually line by line.
All the mentioned issues and corrections have done except the following
Extension opportunity and Configuration to Media. Hope these two are not mandatory.
+ There is some sort of key or ID in the source: kswE_n0FNXk which I feel is inappropriate.
Re: I would like to show the demo video to the developers, so that they can get into this module and integrate easily.
+ A call is made to 'simplexml_load_string()' -- it would be sensible to record that the simplexml extension to php is required.
Re: PHP 5+ support this in default.
Also for design customization, user can copy paste the template file into theme directory.
Please check this once again. Thanks
Comment #18
manimjs_drupal commentedComment #19
sudharson commentedThis looks like a great module and great idea. Thanks for your contribution.
Comment #20
manimjs_drupal commentedComment #21
manimjs_drupal commentedComment #22
rivimeyHi manimjs_drupal,
Great that you found my review useful and thanks for implementing so much of the work.
I see you've updated this issue description in useful ways but the project (sandbox) page is still quite plain. Check out other modules and/or various blog posts as to what is helpful on the project page. For example: https://www.drupal.org/node/2190239, https://www.drupal.org/node/997024
I am also surprised that jquery_update is required; if that is because you need JQ 1.5+ and the default for base D7 is 1.4, then I'd just indicate that jQuery 1.5 or later is needed. jquery_update module is just a way to get that update IIRC.
Ruth
Comment #23
manimjs_drupal commentedComment #24
manimjs_drupal commentedHi Ruth,
I am preparing the detailed description for this module. Please will add and will get back to you. Thanks.
Comment #25
manimjs_drupal commentedComment #26
manimjs_drupal commentedComment #27
manimjs_drupal commentedComment #28
manimjs_drupal commentedComment #29
manimjs_drupal commentedComment #30
manimjs_drupal commentedComment #31
manimjs_drupal commentedComment #32
manimjs_drupal commentedComment #33
manimjs_drupal commentedComment #34
manimjs_drupal commentedThe required description has updated on the project page. Please check this once again.
Comment #35
rivimeyHi again. Many thanks for all the work you've put in. I am setting this to RTBC now, though there are two things that could still be improved before you issue a stable release:
- Please add a similar modules section to the project page with links to the actual projects. Even if the modules are indeed different, someone finding your module and deciding it isn't quite what they are after can use the list for additional options, which helps us all.
- Several of the functions in the .module file has comments like /* Implementation of admin configuration */. The formats Drupal prefers are:
/* Implementation of hook_help(). */
and a short sentence describing why the function exists, for example (but not necessarily):
/* The administration menu configuration form callback function. */
Personally, I feel the current 'Implementation of admin configuration' sort-of-suggests it's a hook when it isn't, which is bad.
This point could be considered a personal one and I suggest you seek other views if you disagree.
Comment #36
manimjs_drupal commentedHi Ruth,
Thanks a lot. yeah sure will add that few corrections.
Comment #37
manimjs_drupal commentedComment #38
manimjs_drupal commentedComment #39
manimjs_drupal commentedComment #40
manimjs_drupal commentedComment #41
manimjs_drupal commentedAll the suggested changes have done.
* Added few additional description with existing modules.
* Created separate file transcript.admin.inc for the admin configuration settings.
* Modified the comments added for custom functions.
Comment #42
manimjs_drupal commentedComment #43
ramkrk commentedComment #44
ramkrk commentedComment #45
rivimey@ramkrk could explain why it's back to needs review?
Comment #46
rahulbaisanemca commentedSwitching back to original status.
Comment #47
cweagansThanks for your contribution!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #48
manimjs_drupal commentedComment #49
manimjs_drupal commentedHi cweagans/rivimey/arunmv/rahulbaisanemca/mdhanasekaran/sudharson
Thanks a lot for reviewing this module. Now it is promoted to full project from sandbox.
A special thanks to rivimey & cweagans for reviewed and provided full description about the corrections required.
Thanks
Mani