Skip to content

markwillis82/Sugar-Sync-Linux-Client

Repository files navigation

SugarSync Linux Client - EARLY ALPHA release

Author: Mark Willis
Email: Mark.w@immat.co.uk

Welcome to my sugar sync client. Below are details on how to use.
Please be aware this code is still buggy and missing some important functionality.
There are comments through most of the codebase but some of it may not make sense / be quite messy.
It does need a bit of a clean

REQUIREMENTS
	php iNotify (src provided)
	php-pcntl
	php-posix (need to confirm?)
	php-mysql
	Built on php 5.3.2
	MySql 5.0+

OPTIONAL REQUIREMENTS:
	notify-send - http://ubuntuforums.org/showthread.php?t=1411620

INSTALLATION

iNotify src is provided but it is also available through pear:

	sudo aptitude install php5-dev pear
	sudo pecl install channel://pecl.php.net/inotify-0.1.4

Update setup.conf with the required setting for MySQL and your sugar sync account
path_to_sync/path_to_tmp need to be absolute paths

I've added tmp files into folders so git will commit them.

path_to_tmp needs to exist and be writable by the user


Create a mysql database and run the install_db.sql script



After further development the program will run as a daemon but for now it is just through the commandline so you can run the program "singleshot.sh"

for example:
$: ./singleshot.sh


All output is sent to the debug.log file for debugging.

Things still not working:
	File DELETE/RENAME
	** This just requires more code being added to account for the iNotify actions

	Downloading new files once program running
	** We need to iterate through the entire sugarsync account looking for any updated timestamps / not excisting in our database.
	   This could cause a load issue?


Things that do work:
	File Creation/Moving into sync folder
	** This works whilst the program is not running (and detected on startup)
	   and whilst program is running (by iNotify)

	Shared Account Monitoring
	** If you have access to another accounts shared folders these will also be downloaded into the sync directory


TODO
Lots of bug testing
Check for tmp folder on install

High Priority:
	Convert MySQL to SQLite
	Add Delete File code
	Add File Renaming Code
	
	Better file detection within database lookups - Need to check the whole folder route, not just parent folder.
	For Example:
		/testA/FolderA/newfolder/file1.txt
		/testA/FolderB/newfolder/file1.txt
		
	A command to check the existance of file1.txt will fail on the second attempt as it will find it in FolderA
	(fix somewhere in xml.class.php)
	
	
Low Priority
	Change config loading statements to a loop, reduce duplication

If you would like to contribute please drop me an email.