Пример #1
0
def exist_msg(bookmark_name):
    bmk_exist = 'Bookmark already exists. Overwrite'
    return '\n{} {} {}?'.format(
        label('info'),
        bmk_exist,
        color('yellow', bookmark_name)
    )
Пример #2
0
def list_bookmarks():
    bookmark_object = ManageBookmark('mock', 'mock')
    all_bookmarks = bookmark_object.list_bookmark()
    click.echo('Saved bookmarks:')
    for bookmark in all_bookmarks:
        bookmark_path = bookmark_object.read_bookmark(bookmark)
        click.echo('{} {} {}'.format(label('list'), bookmark.ljust(17),
                                     bookmark_path))
Пример #3
0
def bookmarked_msg(bookmark_name):
    return '{} {} {}'.format(
        label('good'),
        color('yellow', bookmark_name),
        'has been bookmarked.'
    )
Пример #4
0
def bookmark_msg(bookmark_name):
    return '\n{} {} {}'.format(
        label('info'),
        'Do you want to bookmark',
        color('yellow', bookmark_name)
    )
Пример #5
0
from marlin.manage import ManageBookmark
from marlin.styles import label
import click

commands = {
    'bookmark':
    '{} {} {}'.format(label('good'), 'bookmark'.ljust(15),
                      'Bookmark current folder'),
    'rmark':
    '{} {} {}'.format(label('bad'), 'rmark'.ljust(15), 'Remove a bookmark'),
    'marlin':
    '{} {} {}'.format(label('run'), 'marlin'.ljust(15),
                      'Swim through the terminal!\n')
}


def main():
    click.echo('Usage: COMMAND [bookmark-name]\n')
    click.echo('Commands:')
    for command in commands:
        click.echo(commands[command])

    list_bookmarks()


def list_bookmarks():
    bookmark_object = ManageBookmark('mock', 'mock')
    all_bookmarks = bookmark_object.list_bookmark()
    click.echo('Saved bookmarks:')
    for bookmark in all_bookmarks:
        bookmark_path = bookmark_object.read_bookmark(bookmark)
Пример #6
0
def msg_deleted(bookmark_name):
    return '{} {} {}'.format(label('bad'), color('yellow', bookmark_name),
                             'has been deleted.')
Пример #7
0
def msg_not_exist(bookmark_name):
    return '\n{} {} {}'.format(label('bad'), color('yellow', bookmark_name),
                               'does not exist.')
Пример #8
0
def msg_delete(bookmark_name):
    return '\n{} {} {}'.format(label('info'), 'Do you want to delete',
                               color('yellow', bookmark_name))