summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjt14
1 files changed, 7 insertions, 7 deletions
diff --git a/jt b/jt
index 8e3cf02..6b82994 100755
--- a/jt
+++ b/jt
@@ -162,14 +162,14 @@ class FinishCommand(Command):
draft_attch = drafts_dir.get_draft_attachments_dirname(draft_id)
pub_attch = os.path.join(
- self.published_dir(), self.published_basename(draft_mdwn))
+ self._published_dir(), self._published_basename(draft_mdwn))
pub_mdwn = pub_attch + '.mdwn'
if os.path.exists(pub_mdwn):
raise cliapp.AppException('%s already exists' % pub_mdwn)
- if not os.path.exists(self.published_dir()):
- os.makedirs(self.published_dir())
+ if not os.path.exists(self._published_dir()):
+ os.makedirs(self._published_dir())
os.rename(draft_mdwn, pub_mdwn)
if os.path.exists(draft_attch):
os.rename(draft_attch, pub_attch)
@@ -182,7 +182,7 @@ class FinishCommand(Command):
if self._app.settings['push']:
self.push_git()
- def published_dir(self):
+ def _published_dir(self):
subdirs = {
'liw': 'notes',
'ct': 'log/%d' % time.localtime().tm_year,
@@ -192,7 +192,7 @@ class FinishCommand(Command):
subdir = subdirs[self._app.settings['layout']]
return os.path.join(self._app.settings['source'], subdir)
- def published_basename(self, draft_mdwn):
+ def _published_basename(self, draft_mdwn):
if self._app.settings['layout'] in ('liw', 'ct'):
basename = time.strftime('%Y-%m-%d-%H:%M:%S')
elif self._app.settings['layout'] == 'pkb':
@@ -206,7 +206,7 @@ class FinishCommand(Command):
return basename
- def commit_to_git(self, pathnames):
+ def _commit_to_git(self, pathnames):
cliapp.runcmd(
['git', 'add'] + pathname,
cwd=self._app.settings['source'])
@@ -215,7 +215,7 @@ class FinishCommand(Command):
['git', 'commit', '-m', 'Publish log entry'],
cwd=self._app.settings['source'])
- def push_git(self):
+ def _push_git(self):
cliapp.runcmd(
['git', 'push', 'origin', 'HEAD'],
cwd=self._app.settings['source'])