diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-09-17 11:26:09 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-09-17 11:26:09 (GMT) |
commit | 8fc4e97fa131b4cd4bc5b0a474696cad762e39bd (patch) | |
tree | 5db40bc459274160e6533cefb2316dc6414071b2 | |
parent | ad901d11c09225aba5cc4285a60d60ec6aaf04e9 (diff) |
Use basename for uploaded files by default in copy-to-journal script #1372
-rwxr-xr-x | bin/copy-to-journal | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/copy-to-journal b/bin/copy-to-journal index ce72f2b..cf2cf20 100755 --- a/bin/copy-to-journal +++ b/bin/copy-to-journal @@ -10,6 +10,7 @@ import sys import os import optparse +from gettext import gettext as _ if os.path.exists("/tmp/olpc-session-bus"): os.environ["DBUS_SESSION_BUS_ADDRESS"] = "unix:path=/tmp/olpc-session-bus" @@ -68,11 +69,13 @@ if __name__ == "__main__": if options.title: entry.metadata['title'] = options.title else: - entry.metadata['title'] = fname + entry.metadata['title'] = os.path.basename(fname) # Use the description given, otherwise leave it blank. if options.description: entry.metadata['description'] = options.description + else: + entry.metadata['description'] = _('From: %s') % fname # Lastly, if any tags are given, combine them into a single string # and save them. |