please ensure that these libraries mentioned at requirements.txt are installed and usable.
Both relative and absolute addresses are supported, due to the use of the process_address function. However, the route from the root directory to the working folder will need to be established if relative addressing is used.
opengenus_convertor.py contains implementations of various functions to convert, summarise and translate data and to make these functions usable by command line.
once run successfully, you can use them from your local command line interface.
1.url to raw_audio-
for availing this use case, run the function url_to_raw_audio.
Command Line Statement: python opengenus_convertor.py --from=URL --to=audio
Parameters: 2- input_urls_file and output_file_location, both address parameters. Output file is created from scratch, any existing file with same name is overwritten.
Sample Input - a file containing a list of URLs
Sample Output - converted audio files at the working directory
2.url to summarised_audio
for availing this use case, run the function url_to_summarised_audio.
Command Line Statement: python opengenus_convertor.py --from=URL --to=summarised audio
Parameters: 2- input_urls_file and output_file_location, both address parameters. Output file is created from scratch, any existing file with same name is overwritten.
Sample Input - a file containing a list of URLs
Sample Output - converted and summarised audio files at the working directory
3.url to raw text
for availing this use case, run the function url_to_raw_text.
Command Line Statement: python opengenus_convertor.py --from=URL --to=text
Parameters: 2- input_urls_file and output_file_location, both address parameters. Output file is created from scratch, any existing file with same name is overwritten.
Sample Input - a file containing a list of URLs
Sample Output - converted text files at the working directory
4.url to summarised text
for availing this use case, run the function url_to_text_summary.
Command Line Statement: python opengenus_convertor.py --from=URL --to=summarised text
Parameters: 2- input_urls_file and output_file_location, both address parameters. Output file is created from scratch, any existing file with same name is overwritten.
Sample Input - a file containing a list of URLs
Sample Output - converted and summarized text files at the working directory
5.text to summary
for availing this use case, run the function text_to_summary.
Parameters: 2-Input_file,output_file_full_name. Here we need to specify name of the output file as well.
Command Line Statement: python opengenus_convertor.py --from=text --to=summarised text
Sample Input - a text file
Sample Output - summarised content at the working directory
6.audio to video
for availing this use case, run the function audio_to_video.
Parameters: 2- input_file, output_file, both address parameters of the input mp3 and output mp4 files, respectively. Output file is created from scratch, any existing file with same name is overwritten.
Command Line Statement: python opengenus_convertor.py --from=audio --to=video
Sample Input - an audio file
Sample Output - video file at the working directory
7.Translate text
for availing this use case, run the function translate_text_file.
Parameters: 2- input_file, output_file, both address parameters of the input and translated files, respectively. Output file is created from scratch, any existing file with same name is overwritten.
Command Line Statement: python opengenus_convertor.py --from=text --to=translated text
Sample Input - <a href =" for availing this use case, run the function translate_text_file.
Sample Input - an input file in english
Expected Output - translated in french
If converting from text or audio, ensure to write the full name of the output file. Else just mention the directory where the output should be located.