diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-03-01 18:37:02 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2009-03-02 14:45:12 (GMT) |
commit | 9fa6e94c3c25e44328f8e97f046b388c599c5969 (patch) | |
tree | f88766ebe396a0070b1c4534aa907afb22a3c1db /xol.py | |
parent | 9f17fdffdb50136ab61a60911219032e35d528d8 (diff) |
Reflect to last .xol changes in sugar
Diffstat (limited to 'xol.py')
-rw-r--r-- | xol.py | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -19,7 +19,7 @@ import book logger = logging.getLogger('infoslicer')
def publish(activity, force=False):
- if not [i for i in book.custom.map if i['ready']]:
+ if not [i for i in book.custom.index if i['ready']]:
alert = NotifyAlert(
title=_('Nothing to publich'),
msg=_('Mark arcticles from "Custom" panel and try again.'))
@@ -71,11 +71,15 @@ def publish(activity, force=False): 'To view these articles, open the \'Browse\' Activity.\n' \
'Go to \'Books\', and select \'%s\'.' % (title, title)
- book.custom.sync()
+ book.custom.sync_article()
+ book.custom.revision += 1
+
jobject.metadata['title'] = title
_publish(title, jobject)
jobject.destroy()
+ book.custom.sync_index()
+
"""
@author: Matthew Bailey
@@ -113,7 +117,7 @@ def _dita_management(zip, uid, title): images = {}
- for entry in book.custom.map:
+ for entry in book.custom.index:
if not entry['ready']:
continue
@@ -170,10 +174,10 @@ def _info_file(zip, uid, title): """
libraryfile = ['[Library]',\
'name = %s' % uid,\
- 'bundle_id = info.slice.%s' % uid,\
+ 'bundle_class = %s' % uid,\
'global_name = info.slice.%s' % uid,\
'long_name = %s' % title,\
- 'library_version = 1',\
+ 'library_version = %d' % book.custom.revision,\
'host_version = 1',\
'l10n = false',\
'locale = en',\
|