Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Can I somehow use u1sdtool to find out which files have I published on Ubuntu One (and possibly with their public URL)? Now, I have to use the web interface for that.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

You can't use u1sdtool for this, but you can use SyncDaemonTool, which lets you talk to Ubuntu One's syncdaemon directly, to do what you want via a short Python script:

from twisted.internet import glib2reactor
glib2reactor.install()
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
from twisted.internet import reactor, defer
from ubuntuone.platform.tools import SyncDaemonTool

@defer.inlineCallbacks
def print_public_files():
    print "calling"
    sd = SyncDaemonTool()
    pf = yield sd.get_public_files()
    for f in pf:
        print "%(path)s -> %(public_url)s" % f
    reactor.stop()

if __name__ == "__main__":
    reactor.callWhenRunning(print_public_files)
    reactor.run()

You'll find documentation on everything that SyncDaemonTool can do on the Ubuntu One developer site.

share|improve this answer
    
Wonderful, thank you very much! –  semberal Oct 3 '12 at 15:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.