Please use our GitHub Issues page for all new support inquiries. If you need to contact us directly, please e-mail [email protected]

Sometimes, videos attached to the openshapa files seem to cause all sorts of issues. The file doesn't open, or it opens up with the video but without a controller, etc etc. It would be great if there's a script to unattach the video from the file. I think Kari's helped me with this before?

asked 18 Feb '12, 07:16

GladysChan's gravatar image

GladysChan ♦♦
164116
accept rate: 0%

edited 23 Jul '12, 09:40

Clinton's gravatar image

Clinton
111171924


All you have to do is load the file and re-save it, it will be saved without the associated videos. Here's the one I've used, it will re-save any .opf files on your desktop in a folder called new_files.

begin

if not File.exists?(File.expand_path("~/Desktop/new_files"))
    Dir.mkdir(File.expand_path("~/Desktop/new_files"))
end

for file in Dir.new(File.expand_path("~/Desktop"))
    if file.include?(".opf")
        $db, pj = load_db(File.expand_path("~/Desktop") + '/' + file)
        save_db(File.expand_path("~/Desktop/new_files/") + '/' + file)
    end
end

end

permanent link

answered 18 Feb '12, 07:33

KariKretch's gravatar image

KariKretch
31224
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×32
×4

question asked: 18 Feb '12, 07:16

question was seen: 4,607 times

last updated: 23 Jul '12, 09:40

powered by OSQA