Example #1
0
def start(title):
    tasksFile = tasks_file.TasksFile(date_helpers.today_str())
    content = get_file_content()
    time_now = date_helpers.time_now_aprox()
    title = ''.join(list(filter(None, list(title))))
    content = content + "\n" + '- ' + time_now + ' ' + title
    write_content_to_file(content)
Example #2
0
def start(title):
  tasksFile = tasks_file.TasksFile(date_helpers.today_str())
  content = get_file_content()
  time_now = date_helpers.time_now_aprox()
  title = ''.join(list(filter(None, list(title))))
  content = content + "\n" + '- ' + time_now + ' ' + title
  write_content_to_file(content)
Example #3
0
import os
import sys
import shutil

script_path = __file__
if os.path.islink(__file__):
    script_path = os.path.realpath(script_path)

sys.path.insert(0, os.path.join(os.path.dirname(script_path), "../api"))

import click
import lib.date_helpers as date_helpers
import app.tasks_file as tasks_file

today_file_name = date_helpers.today_str() + '.md'
today_full_path = tasks_file.FILE_PATH + today_file_name
template_path = tasks_file.FILE_PATH + 'template.md'


def get_file_content():
    try:
        with open(todaytoday_full_path) as x:
            content = x.readlines()
    except FileNotFoundError as e:
        content = ''
    return content


@click.group()
def cli():
Example #4
0
import os
import sys
import shutil

script_path = __file__
if os.path.islink(__file__):
  script_path = os.path.realpath(script_path)

sys.path.insert(0, os.path.join(os.path.dirname(script_path), "../api"))

import click
import lib.date_helpers as date_helpers
import app.tasks_file as tasks_file

today_file_name = date_helpers.today_str() + '.md'
today_full_path = tasks_file.FILE_PATH + today_file_name
template_path   = tasks_file.FILE_PATH + 'template.md'

def get_file_content():
  try:
    with open(todaytoday_full_path) as x:
      content = x.readlines()
  except FileNotFoundError as e:
    content = ''
  return content


@click.group()
def cli():
  pass