Table of contents
Overview
This script automates synchronizing files from a local directory to numerous Dropbox folders. It authenticates with Dropbox using OAuth2 (prompting the user for an authorization code). Then it determines the local source directory and the Dropbox folder using command-line parameters. The script recursively traverses the local files, checks for changes or new files (skipping temporary or hidden files), and uploads or refreshes files on Dropbox as needed. It also provides interactive prompts and performance timing for key operations.
- Qt for Python/PySide for GUI capabilities
Activity Badges
Installation
Before using AJA Dropbox, a few other things need to be installed beforehand. These instructions are specific to Windows machines. Note: The terms “command prompt,” “command window,” and “terminal” are used interchangeably to refer to the Windows Command Prompt application.
- Make sure Python is installed on your machine. To do this, open a new Command Prompt window. Open the Windows Start Menu and search for Command Prompt, and open the window. It should be a black screen. Your current directory is listed, looking something like
C:\Users\YourUsername. - In the app, to the right of the
C:\Users\YourUsername, typepython, then enter to check your Python version.- If already installed, the Python version number should appear. Press
Ctrl-Zthen enter to the right of the>>>to exit from putting any more input into Python. - Otherwise, you will have to install Python yourself.
- For Windows: Navigate to Microsoft Store from the Start menu, and search for Python in the apps. Install the latest version.
- After installation, make sure Python is properly installed by repeating step 1.
- If already installed, the Python version number should appear. Press
- There are a few packages we need to install, as well. In terminal, run these three commands separately:
pip install dotenvpip install dropboxpip install PySide6
Great! AJA Dropbox needs these packages to create its GUI and access the Dropbox API. Now that we’ve got all the necessary things installed, we can go ahead and download AJA Dropbox itself.
- In the AJA Github page, navigate to the latest branch. Under the green code button in the top right, click
Download ZIPto download all the files. - After downloading, unzip the files to wherever you’d like.
Installation done! Move on to the User Guide for more information on how to run the app.
User Guide
This section provides a walkthrough of how to use the AJA Dropbox user interface and its capabilities.
How to Run the App
AJA Dropbox is able to be run via the command terminal, directly through Python. No IDE is necessary to run this.
- Navigate to the AJA Dropbox folder you’ve unzipped on your machine.
- Double click the folder to show its contents. Locate the file named
mvp_v3.py, and right click to show more options. - Under the ‘Open with’ menu, there should be the option to run it in your current Python version. Click this.
- A blank terminal window should open, along with an app interface. In the app, follow the instructions to link your account to the app and select your local folder to pull files from, and you should be good.
Naming Conventions
- Files to be uploaded to the Dropbox must follow this specified naming format:
Lastname_Firstname-Documentname.extension - example:
Smith_Amanda-document.pdf - AJA Dropbox will NOT upload any files that do not follow this naming convention.
Usage Notes
- Individual file upload limit is 150 MB.
- The application can move misplaced files to their correct Dropbox folders (for example, misplacing Smith_Amanda-document.txt in folder Lee_Bruce) and create new folders if necessary–HOWEVER, new folders created through the app do not have sharing permissions. User needs to manually give the intended recipent access to the newly created folder on Dropbox.
- Application will also overwrite files of the same name if they’re already present in the target Dropbox folder or subfolders within that folder.
Developer Guide
This section provides information of interest to developers wishing to use this code base as a basis for their own development tasks.
This application uses the Dropbox for Python API.
Application Design
AJA Dropbox is based upon the features our client would like to have. The main goal is to have a program that rarely needs maintenance as they possess no coding knowledge. We are developing an application that would allow the user to maintain the program script itself by creating features that will change the script when neccessary changes are needed.
Data Model
This is our prototype Data Model in which we hope to base our collections off of. This is a design choice that we are currently working in progress.
Development History
The development process for AJA Dropbox conformed to Issue Driven Project Management practices. In a nutshell:
- Development consists of a sequence of Milestones.
- Each Milestone is specified as a set of tasks.
- Each task is described using a GitHub Issue, and is assigned to a single developer to complete.
- Tasks should typically consist of work that can be completed in 2-4 days.
- The work for each task is accomplished with a git branch named “issue-XX”, where XX is replaced by the issue number.
- When a task is complete, its corresponding issue is closed and its corresponding git branch is merged into master.
- The state (todo, in progress, complete) of each task for a milestone is managed using a GitHub Project Board.
Links
Current Functionality
- file uploading
- compares stats of file on local machine and in dropbox cloud, only re-uploads if metadata is changed
- currently mirrors local directory’s hierarchy when uploading
- OAuth account verification
- GUI interface using PyQt
Project Milestones
Team
AJA Dropbox Tool is designed and implemented by Aaron Ancheta, Adrienne Kaneshiro, and Jaira Pader.