Removed live play feature as it does not work.
This commit is contained in:
parent
fdd63c0497
commit
c49e446f35
1 changed files with 6 additions and 15 deletions
|
@ -37,7 +37,6 @@
|
|||
"class configs: \n",
|
||||
" #@markdown ## Configuration\n",
|
||||
" method = \"ascii-color\" #@param [\"filled-ascii\", \"ascii-color\", \"just-ascii\"]\n",
|
||||
" action = \"download\" #@param [\"run\", \"download\"]\n",
|
||||
"\n",
|
||||
"# Set screen formatting. \n",
|
||||
"class formatting:\n",
|
||||
|
@ -67,7 +66,7 @@
|
|||
"try: \n",
|
||||
" from google.colab import files; from google.colab import output\n",
|
||||
"except: \n",
|
||||
" info.err(formatting.font.bold + 'You are not using this in Google CoLab. ' + formatting.clear + 'For this to work, please do so. ')\n",
|
||||
" info.err(formatting.font.bold + 'Google CoLab is required to run this.' + formatting.clear + ' This requires components only available in Google CoLab servers.')\n",
|
||||
" os.kill(os.getpid(), 1)\n",
|
||||
"\n",
|
||||
"# Install apt programs and python modules. \n",
|
||||
|
@ -170,12 +169,8 @@
|
|||
" if check_file_exists(): os.system('rm -rf output.old.sh && mv output.sh output.old.sh -v')\n",
|
||||
"\n",
|
||||
" def process():\n",
|
||||
" if configs.action == \"download\":\n",
|
||||
" info.status('Processing the video. This will take some while.')\n",
|
||||
" !video-to-ascii -f video.mp4 -o output.sh --strategy {configs.method}\n",
|
||||
" else:\n",
|
||||
" info.status('Processing the video. After some while, the video will play.')\n",
|
||||
" !video-to-ascii -f video.mp4 --strategy {configs.method}\n",
|
||||
" info.status('Processing the video. This will take some while.')\n",
|
||||
" !video-to-ascii -f video.mp4 -o output.sh --strategy {configs.method}\n",
|
||||
"\n",
|
||||
" def check_success():\n",
|
||||
" if check_file_exists():\n",
|
||||
|
@ -188,24 +183,20 @@
|
|||
"\n",
|
||||
" attemptReplace()\n",
|
||||
" process()\n",
|
||||
" if configs.action == \"download\":\n",
|
||||
" check_success()\n",
|
||||
" check_success()\n",
|
||||
"\n",
|
||||
"def download_results():\n",
|
||||
" info.status('Downloading the output…')\n",
|
||||
" try:\n",
|
||||
" files.download('output.sh')\n",
|
||||
" except:\n",
|
||||
" info.err('The file could not be downloaded, but it is available for manual downloading at the files view in the sidebar.')\n",
|
||||
" else:\n",
|
||||
" info.success('The file was succesfully downloaded.')\n",
|
||||
" info.err('The file could not be downloaded automatically, but it is available for at the files view in the sidebar.')\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" get_dependencies()\n",
|
||||
" download_video()\n",
|
||||
" render()\n",
|
||||
" if configs.action == \"download\":\n",
|
||||
" download_results()\n",
|
||||
" download_results()\n",
|
||||
"\n",
|
||||
"main()"
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue