Drag & Drop of .zip files onto Panorama app icon would be great


#1

When using Apple’s Numbers app on iOS, if the user chooses to Export a spreadsheet using the CSV format, Apple chooses to automatically .zip the file and then allow the user to transport it via Text or Mail, (or other choices.)

When I exported the spreadsheet from my iPhone via Text, I wanted to be able to drag the .zip file from my Messages app to the Panorama app icon in the Dock so as to have Panorama X automatically open the spreadsheet into a new database file. Alas, because Panorama X does not accept .zip files for the Drag & Drop, it was more cumbersome than it needed to be.

I’d like to see Panorama X allow .zip files, and if the .zip file should happen to have multiple .csv files within it, then multiple new databases should be created.


#2

I don’t think this requires a change to Panorama X; there is a built in Mac solution available. I believe what you want can be accomplished by dragging and dropping onto a properly set up Automator workflow’s icon. I’m not very experienced with it, but I know it can handle drag and drop input and process that input through a series of steps. It should be able to unzip anything the finder can unzip and route the results to Panorama X. Checkout it’s built in help and look for additional help with it online.


#3

Why not save your (iOS) Numbers file in iCloud, open it again on the Mac and save the file as a .csv file there? Then there is no need to unpack a .zip archive; the exported file is just comma separated text.


#4

And on the other hand, it is just a double click in the Finder to unzip the archive. Then you have the text file Panorama (6 or X) can handle.

And there are ways to automate that workflow (e.g. Folder actions, Automator, Hazel).


#5

I’ve never heard of any other program that handled .zip files in the way Robert is proposing. I can see why you want this feature, but even if Panorama X did this, I think it would be so obscure that probably Robert would be the only person that ever used it. I think Kurt’s solutions are probably the way to go.


#6

I think it would be an enormous security risk. I would not want to unleash an unzip and open application of any type on any platform.


#7

If Apple is going to set a new standard of zipping a csv file when they export, then it seemed logical that Panorama could take the responsibility to unzip on Import. I had previously seen web apps zip exported files but I had not thought much of them. When Apple does something, I listen. With the recent mention of ProVUE going in the iOS direction, it would seem that now might be the time to pay attention to potential new flow patterns for data that Apple is setting.

As for security, my suggestion was for the unzip to happen when the user manually dragged the zipped message from their Messages window (or an email) on top of the Panorama X dock icon. Apple has already built into the OS the ability to zip and unzip by double clicking on a zipped file. Removing that step does not increase a security risk. Panorama would only look for those exact same file types to import that it was previously importing. Panorama X would NOT run a zipped application.


#8

First of all, I would not call this a new Apple standard. In fact, this is the way, how Apple’s Numbers iOS app handles exporting .csv files, and I think they want to minimize risks of damaging the text files – due to text encoding issues – during a mail or messages transfer.

My second point is there is no need for Panorama to become an unpacking utility. You, the Panorama user, are able to unpack .zip archives procedurally in (or from) Panorama, because Panorama can invoke an AppleScript that calls the Finder and lets it expand the .zip archive.

I just recorded a simple script that unpacks a .zip archive in my downloads folder:

tell application "Finder"
activate
set target of Finder window 1 to folder "Downloads" of folder "myUserShortname" of folder "Users" of startup disk
open document file "myArchive.zip" of folder "Downloads" of folder "myUserShortname" of folder "Users" of startup disk
end tell

#9

I’d like to add that other apps like my iOS banking app are exporting regular .csv files.


#10

Your suggestion is about the furthest that I can imagine from what I suggested.

The Mac is popular because ‘It just works’. Each user should not have to write AppleScripts to do things. That is a Unix geek way of thinking. In my opinion, if Apple is going to create a .zip file when the user requests a .csv file, then it is incumbent on the recipient application that might accept a .csv file, to also unzip or at least look inside of a .zip file.

Panorama X does not need to become ‘an unpacking utility’ as Panorama can call on OS functions to do this work. Yes, it was using Numbers that brought this to my attention. And yes, it becomes a standard when Apple chooses to do things. And no, I do not think that Apple is attempting to minimize damage during transit as it is just as easy to ‘damage’ a .zip file as it is a .csv file.

Personally I believe it is a bad choice for Apple to .zip a small .csv file as .zip files are often used for obfuscation and phishing. With Numbers in iOS, it is a single file that is typically small in size. A user has no idea what is in a .zip file and they just open it up imagining that it is safe. It would be much safer, as well as easier for the user, if Panorama X handled the safety concern and ascertained if the .zip file contained a ‘safe’ file that could then be automatically imported. Safety was one of my concerns besides ease of use.


#11

For what it might be worth I see there is a way to look inside a zip file using Panorama commands without uncompressing it first.

arraylast(array(shellscript({unzip -l /Users/gary/Desktop/Downloads/Reybro.zip}),4,¶),".")

This will give the extension of the first file in the zipped bundle - in this case it is “pdf”. You could also test to make sure only one file is inside as well. If you want a directory listing with info on all the files inside you would simply use:

shellscript({unzip -l /Users/gary/Desktop/Downloads/Reybro.zip}),

This then gives the following for this particular zip file:

Archive: /Users/gary/Desktop/Downloads/Reybro.zip
Length Date Time Name


83657  02-08-2017 13:48   Free-font-of-the-week-license.pdf
71783  02-08-2017 13:48   Reybro.jpg
34604  02-08-2017 13:03   Reybro-Regular.otf
   50  02-15-2016 15:41   Font Bundles - The Best Free and Premium Fonts.url

190094 4 files


#12

I don’t have any knowledge what an UNIX geek would do or think. I am a Mac user since 1984. And I know a lot of things that work perfectly on my Mac because I have learned a little bit about automation on the Mac.

You seem to dislike all the constructive options that others and I were offering (Folder Actions, Automator, AppleScript, Hazel). That’s O.K. for me. Lesson learned.

As I am writing this, I see Gary’s shellscript advice coming up. Thank you, Gary! This time I learned something useful.


#13

Actually, shell commands aren’t necessary for any of this – Panorama X has built in features for handling compressed archives.

I agree. I just checked, and Numbers (on macOS) will not import a zipped csv file, it won’t even allow it to be dropped. If they add that capability in a future version, that would be the appropriate time to consider adding such a feature to Panorama.


#14

I get an “Unknown statement” error when I try to use archivecontents( .


#15

That is because it is a function and not a statement.


#16

OK, got it:

message archivecontents("~/Documents/Snapshot.zip")

works as expected.


#17

iTunes handles zip files (eg zipped audio collections) in this manner