The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniWeb > OmniWeb General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Filename problem on download persists in beta Thread Tools Search this Thread Display Modes
Hi everyone :)

During the 5.5 SP testing, I submitted a bug stating that when I downloaded PO files from various sites, Omniweb added a ".txt" extension to the filename, resulting in filename.po.txt instead of filename.po .

I gave details of how this happened, and of sites where it happened. Unfortunately, the problem persists in the betas. A PO file is a gettext translation file, a particular kind of text file, with its own extension: filename.po . The PO template files (as yet untranslated) are filename.pot . This format is very well-known, so it shouldn't come as a surprise to Omniweb.

Is there any progress with this bug? Can I track the progress? I waste way too much time manually changing filenames on download.
 
WebKit adds this because the server is sending the file as text.
 
The server admin has to set the correct mime type.

I see this downloading Newton packages. Some sites, the PKG file comes down as text with a .pkg.txt ending, but on others, it comes down fine as a binary PKG file. Same thing happens with DMGs and others.

You can also use a renaming utility to help you with problem files. I use A Better Finder Rename, but there re many, some free.
 
Quote:
Originally Posted by Clytie
I waste way too much time manually changing filenames on download.
Hi Clytie, in the meantime, here's an Automator action to save you some effort in the renaming of your downloads (apologies for the width of the image, but it wasn't very legible at a smaller size):



That is, launch Automator and select Finder in the Library. Select the Rename Finder Items action from the list of Finder actions and drag into the main window. You'll be prompted to add a Copy Finder Items action first as a precaution - up to you whether you do or not, but it isn't necessary.

Input the settings as indicated below then go to the File menu and select Save As Plugin... and pick Finder as the target for the plug-in:



Now, when you download one or more of your .po files and they are converted into .po.txt files, you can simply select them and pick the Automator action from the contextual menu listing when you right click and it will automatically correct the names for you by changing the .po.txt to .po only:



P.S. Don't call your plug-in .po.txt to .po when you save it (i.e. dot po dot txt to dot po) - this will make it invisible to the Finder and it won't show up in the contextual menu item.

P.P.S. This is the type of thing that Automator is excellent for.

Last edited by JKT; 2006-08-24 at 03:13 PM..
 
I have to say--we have some of the coolest and most helpful users around!

Another workaround for the issue is to use the "Download to ..." contextual menu item in OmniWeb--that will default to the name you want and *not* change it when the mime-type is noticed.

The current behavior is controlled by NSURLDownload which is an Apple class. Unfortunately it doesn't distinguish between a suggested filename in the response of the server, and it making its own suggestion based on the mimetype so it is hard for us to cleanly resolve this issue in a general way.
 
Thankyou very much, each of you, for your offer of help. :)

I am still a little surprised that Omniweb behaves like this. Camino 1.0.2, for example, does not. Downloading the file rhythmbox.vi.po from one of the same Gnome status pages I listed, gets me rhythmbox.vi.po.txt via Omniweb and rythmbox.vi.po via Camino. Does Camino not use Webkit?

Also, the "Download to..." contextual menu item in Omniweb, which downloads the file to the selected download folder for that site, also adds the "txt" extension to .po files. I've been using this command all the time, since I download individual files so often.

If this were happening on a minority of translation servers, I would take Handcam's suggestion and ask them to reset the MIME type. However, it happens on all the translation servers. That sounds more like a weakness in OW/Webkit than in the widely varying server software used.

In any case, I shall enjoy creating the Automator action. I haven't spent any time with Automator, since I found early on that the first few things I wanted to do weren't supported, but more applications probably have Automator actions now. I'll look into it again. :)
 
It also happens in Safari, in my experience. Camino does not use WebKit.
 
Ah. My mistake. I thought all three of them used Webkit. ;)
 
Camino uses Gecko, the Mozilla web rendering engine (also used in Firefox).
 
Just a quick suggestion to add to what others have already suggested: you can attach a script to a folder, and whenever a new file gets added to that folder, the script will automatically be run on the new file. This way, you don't even need to manually run the script: just save your files from OW, and by the time you switch over to Finder and navigate to the files, the names will have been corrected for you. This type of script is called a Folder Action, and you can find more about it in the Finder's help (switch to Finder, then select Mac Help from the Help menu).

I just checked, and along with AppleScript scripts, you can save Automator workflows as Folder Actions. For more details. pull up Finder help as above and search for "folder actions"; you want the article titled, "Running an Automator action when a folder is changed", which for me is the first article listed in the results.

Last edited by Bob Williams; 2006-08-24 at 11:59 PM..
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Post-sleep Sync Problem Persists b-dr OmniFocus 2 for Mac (Private Test) 2 2013-04-28 02:30 AM
Incorrect filename charset in download auntieyi OmniWeb Bug Reports 0 2012-09-05 02:45 AM
Download links for beta all dead? michaelaye OmniGraffle General 1 2011-05-02 01:04 PM
Where download OF beta jochen OmniFocus 1 for Mac 29 2007-08-14 05:08 PM
Background tab download problem (sp10) udecker OmniWeb Bug Reports 5 2006-05-12 08:28 PM


All times are GMT -8. The time now is 11:54 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.