Home > Programming > Public directories in Dropbox

Public directories in Dropbox

A few weeks ago a friend asked me how to share directories in Dropbox. I couldn’t really figure it out myself, so I told him to zip the files. It wasn’t the most elegant solution, but it worked sorta. It wasn’t until just recently that I had a better solution. It still isn’t the best, but it’s definitely a step in the right direction.

Basically what I did was created a python script that generates an HTML file with links to the files in the public directory (the current working directory).

I haven’t worked with HTML in a really long time, so this was a fun little thing.

Now my first attempt at this wasn’t very glamorous, but I needed a rough idea on how this was going to work.

Ok cool, I had a working prototype. It wasn’t pretty, but that’s fine for now. I put a little more work into it by changing the html, getting rid of the bullet points, and I even added some graphics for non-image files.

Now I know what you’re thinking, “Bro you have some killer art skills” Thanks! I’ve settled on this for now, as it works  pretty well for most people’s needs.

In the future I will probably make it look less amateur. Feel free to add your own icons, and filetypes. Feedback and comments welcome.

Just run the python script and it will make an html file called ‘pub_dir.html’. That will be your folder to share with people.

Bugs I can think off the top of my head:

  • the folder links won’t work due to naming errors

Here is the download link:

http://www.mediafire.com/?c67634qx6z3kcwy

Advertisements
Categories: Programming Tags: ,
  1. vegard1992
    February 28, 2011 at 4:42 AM

    hello, my name is vegard j and for years ive struggled with my life, mainly because of one problem; sharing folders with my friends on dropbox
    at first it barely affected me, but the problem grew and day by day i saw myself receding into my own secluded world. it has affected not only my own wellbeing but the happiness and quality of life of my closest ones; my family.
    finally! i can share my folders with my friends! thank you prof oak for saving me and my familys happiness!
    sincerely,
    vj

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: