Feed The Platypus Mac OS

broken image


We use cookies to improve our services. Allow Cookies Cookies Settings. Windows Download. Darwin is the core operating system of Apple Inc.' S Mac OS X, and runs on an open sourcekernelcalled XNU. Apple first released it to the open source community in 2000. Darwin integrates a number of technologies, most importantly the Mach3.0kernel, operating system services based on 4.4 BSD(Berkeley Software Distribution, particularly FreeBSD), high-performance networking facilities,. Use Platypus to create an application from your bash script. This approach avoids needing to use AppleScript. Platypus is a developer tool that creates native Mac applications from command line scripts such as shell scripts or Perl, Ruby and Python programs. Platypus is a powerful developer tool for creating application wrappers around scripts, i.e. For creating MacOS X applications that execute a bundled script. Scripts can thus be run seamlessly from the graphical window environment, making elegant Mac OS X-native applications from scripts. Here are some of the features Platypus has to offer. What you need is Platypus. Platypus is a developer tool for the Mac OS X operating system. It can be used to create native, flawlessly integrated Mac OS X applications from interpreted scripts such as shell scripts or Perl and Python programs.

I have been writing scripts to help manage the systems I administer for a very long time now. In fact one of the first open source applications I published back in 1998 was MySqlBackUp. MSBU was a simple bashshell script that basically simplified backing up of my web servers‘ MySqldatabases. However since I only wanted to write the script once and crontab is I wrote the script to be somewhat adaptive. Meaning that I did not want to edit the script every time someone added another database. https://truewfiles627.weebly.com/compress-all-2-2.html.

I know many out there are turned off by the simplicity of bash and will immediately jump into perl, python, ruby or even php but I honestly feel that you are overlooking elegance of bash's simple design. Advanced shell scripting especially in bash is almost always a learning experience, but one that I think is absolutely essential to better understanding the system architecture. Be that as it may I am not here to tout the merits of shell programming with bash. In stead I would like discuss some advanced scripting topics. Engine 91 mac os.

Obviously if you can write a script to perform a specific function or tasks automatically then the client does not have to really get involved. However sometimes a shell script isn't exactly the right venue for your client's project because there need to be some sort of interaction. Let's be honest not all users are created equal some, not matter how much training you give, can not handle even a second on the command line. I mean every sysadmin has seen the look of horror descend upon a users face as you open a terminal. It is rare that I have heard users gasp in awe at the terminal. Although a few times I did hear a user utter I had no idea that was even there.

Recently one of my clients needed a solution to simplify the data packaging and transmittal from a satellite office to the central office. We investigated all of the usual suspects quickly ruling out things like file shares, ftp services and even email because of attachment size limits. My client wanted something so simple an intern monkey with almost no training could do it. So using blib as the foundation I wrote a script to bundle the files in question and transmit the bundle to the destination via ssh. Obviously this was not user proof and I would have to work on something a bit more simple but the proof of concept was enough to get the client to sign off on doing some more heavy programming.

What Do Platypus Sound Like

I decided that the absolute easiest option would be to create a drag and drop input driven script. The change make the script take argument input was relatively simple I added the following code snippet to the script and set the necessary variables:

All that this snippet does is verify the argument passed and attempt to explode the file name out from the directory path. If there is no argument passed then it simply lists the files available on the destination server. At this point the user still needs to enter a command like warpfile MyFile.report on the command line but we are now one step closer to our goal.

At this point I needed to riddle out how to turn a bash shell script into a application that supports drag and drop. On many other UNIX based systems like PC-BSD it is a simple task, Linux and even Windows make this relatively simple as well. Unfortunately Mac OS X is not as easy which is perplexing for a UNIX based operating system. Design hero mac os. Fortunately I found an application called platypus that eases the task of creating Mac OS X applications out of scripts.

The

Although I will not walk through the entire operation of platypus as I believe the application is more than self explanatory I will recommend that you take the time to properly set the preferences before digging in. I converted my warpfile script into an even more basic version because I wanted to ensure that the script did no require any external code. I then used platypus to convert this new version into DropWarp along with the fancy custom icon shown below. Keep the keep mac os.

Feed The Platypus Mac Os X


Now I am able to drag a file or folder to the icon and it get transmitted as if through a wormhole to the destination server. I accomplish this through the magick of Passwordless ssh authentication. However this is obviously less than optimal as I do not want to have to setup ssh keys for every user that this could possibly be used by. I mean the idea here was to make this low on the administrative overhead and as much as I like recurring billable hours I also like my clients to recommend me for more work not more mundane work.

Types of platypus

Although I will not walk through the entire operation of platypus as I believe the application is more than self explanatory I will recommend that you take the time to properly set the preferences before digging in. I converted my warpfile script into an even more basic version because I wanted to ensure that the script did no require any external code. I then used platypus to convert this new version into DropWarp along with the fancy custom icon shown below. Keep the keep mac os.

Feed The Platypus Mac Os X


Now I am able to drag a file or folder to the icon and it get transmitted as if through a wormhole to the destination server. I accomplish this through the magick of Passwordless ssh authentication. However this is obviously less than optimal as I do not want to have to setup ssh keys for every user that this could possibly be used by. I mean the idea here was to make this low on the administrative overhead and as much as I like recurring billable hours I also like my clients to recommend me for more work not more mundane work.

This left me with few options fortunately Mac OS X ships with the venerable rsync already installed so all that I need to do is setup rsync services on the destination server as well as a generic account. I will go into setting up an rsync server in more detail in a subsequent article but for now suffice to say this is the ideal solution for this client. They can now email the DropWarp.app to the satellite office personnel and everyone can place it on their desktops. They can immediately start sending their reports and other files to the icon which transmits the data properly tarballed to the destination server all without having to know how to do anything other than drag and drop.

Related articles

Platypus Website

  • Unix shell script for removing duplicate files (amit-agarwal.co.in)
  • Easy bash scripting with shflags (spf13.com)
  • Cut and read files – Bash Shell Scripting – Sintax (antarktikos.wordpress.com)
  • rfc::Bash Library organization and contributions (jafdip.com)




broken image