<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Dropbox on yozy//NET</title>
    <link>https://yozy.net/tags/dropbox/</link>
    <description>Recent content in Dropbox on yozy//NET</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 25 Feb 2012 23:54:55 +0000</lastBuildDate>
    <atom:link href="https://yozy.net/tags/dropbox/feed.xml" rel="self" type="application/rss" />
    <item>
      <title>Autocopy links of files uploaded to Dropbox public folder with a folder action</title>
      <link>https://yozy.net/2012/02/autocopy-links-of-files-uploaded-to-dropbox-public-folder-with-a-folder-action/</link>
      <pubDate>Sat, 25 Feb 2012 23:54:55 +0000</pubDate>
      <guid>https://yozy.net/2012/02/autocopy-links-of-files-uploaded-to-dropbox-public-folder-with-a-folder-action/</guid>
      <description>&lt;p&gt;This tutorial is largely based on &lt;a href=&#34;http://forums.dropbox.com/topic.php?id=4659&#34;&gt;this post on the Dropbox&#xA;forums&lt;/a&gt;, all credit on the script goes to the original&#xA;author Christian G. My contribution is that this script also invokes a Growl&#xA;message (thus, you will need Growl installed) also, the # character is replaced&#xA;by %23 (because Dropbox does not like it much) Here goes the script :&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-applescripts&#34; data-lang=&#34;applescripts&#34;&gt;on adding folder items to this_folder after receiving added_items&#xA;    try&#xA;        set the item_count to the number of items in the added_items&#xA;        if the item_count is equal to 1 then&#xA;            set theFile to item 1 of added_items&#xA;            set theRawFilename to (&amp;#34;&amp;#34; &amp;amp;amp; theFile)&#xA;&#xA;            set tid to AppleScript&amp;#39;s text item delimiters&#xA;            set AppleScript&amp;#39;s text item delimiters to &amp;#34;:&amp;#34;&#xA;            set theFileName to (text item 6 of theRawFilename) as text&#xA;            set AppleScript&amp;#39;s text item delimiters to tid&#xA;&#xA;            set theWebSafeFileName to switchText from theFileName to &amp;#34;%20&amp;#34; instead of &amp;#34; &amp;#34;&#xA;            set theWebSafeFileName to switchText from theWebSafeFileName to &amp;#34;%23&amp;#34; instead of &amp;#34;#&amp;#34;&#xA;&#xA;            set theURL to &amp;#34;http://dl.dropbox.com/u/YOUR_DROPBOX_ID/&amp;#34; &amp;amp;amp; theWebSafeFileName&#xA;            set the clipboard to theURL as text&#xA;&#xA;            tell application &amp;#34;GrowlHelperApp&amp;#34;&#xA;&#xA;                set the allNotificationsList to ¬&#xA;                    {&amp;#34;Public URL&amp;#34;}&#xA;&#xA;                set the enabledNotificationsList to allNotificationsList&#xA;&#xA;                register as application ¬&#xA;                    &amp;#34;CopyDropboxURL&amp;#34; all notifications allNotificationsList ¬&#xA;                    default notifications enabledNotificationsList ¬&#xA;                    icon of application &amp;#34;Dropbox&amp;#34;&#xA;&#xA;                notify with name ¬&#xA;                    &amp;#34;Public URL&amp;#34; title ¬&#xA;                    &amp;#34;Dropbox Public Folder Updated&amp;#34; description ¬&#xA;                    (theURL &amp;amp;amp; &amp;#34; copied to clipboard.&amp;#34;) application name &amp;#34;CopyDropboxURL&amp;#34;&#xA;&#xA;            end tell&#xA;        end if&#xA;    end try&#xA;end adding folder items to&#xA;&#xA;to switchText from t to r instead of s&#xA;    set d to text item delimiters&#xA;    set text item delimiters to s&#xA;    set t to t&amp;#39;s text items&#xA;    set text item delimiters to r&#xA;    tell t to set t to item 1 &amp;amp;amp; ({&amp;#34;&amp;#34;} &amp;amp;amp; rest)&#xA;    set text item delimiters to d&#xA;    t&#xA;end switchText&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;how-to-use-this&#34;&gt;How to use this&lt;/h2&gt;&#xA;&lt;p&gt;First of allyou have to know your Dropbox user ID and change the&#xA;YOUR_DROPBOX_ID to it. This is the number that appears after /u/ in your&#xA;public Dropbox links. Now open the apple script editor and save this script&#xA;into&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;Macintosh HD/Library/Scripts/Folder Action Scripts&lt;/code&gt; as CopyDropboxURL.scpt.&#xA;Next navigate to your Dropbox public folder in finder, right click (or ⌘-click)&#xA;it. Choose Services→Folder Actions Setup&amp;hellip; from the menu. In the menu that&#xA;opens choose the CopyDropboxURL.scpt.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Quick access to the last public url of a file in Dropbox</title>
      <link>https://yozy.net/2011/05/quick-access-to-the-last-public-url-of-a-file-in-dropbox/</link>
      <pubDate>Sun, 08 May 2011 08:00:14 +0000</pubDate>
      <guid>https://yozy.net/2011/05/quick-access-to-the-last-public-url-of-a-file-in-dropbox/</guid>
      <description>&lt;p&gt;I got bored to search for the url after uploading a file to the Dropbox&amp;rsquo;s&#xA;public folder. So I have hacked a quick shell script that takes the public url&#xA;of the latest file you uploaded to your public Dropbox folder and copies it to&#xA;the clipboard. I thought I could share:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/sh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;DROPBOX&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$HOME&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/Dropbox&amp;#34;&lt;/span&gt; dropbox puburl &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$DROPBOX&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/Public/\`ls -1 -t &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$DROPBOX&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/Public | head -n 1\`&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; xclip&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, on OS X I have a folder action which does the same thing automatically&#xA;when a new file is uploaded. I will have to tinker with inotify and get it to&#xA;work on Linux as well.&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
