aboutsummaryrefslogtreecommitdiff
path: root/colors/base16-rebecca.vim
diff options
context:
space:
mode:
Diffstat (limited to 'colors/base16-rebecca.vim')
-rw-r--r--colors/base16-rebecca.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/colors/base16-rebecca.vim b/colors/base16-rebecca.vim
index a33ff41..d32f14f 100644
--- a/colors/base16-rebecca.vim
+++ b/colors/base16-rebecca.vim
@@ -172,8 +172,8 @@ call <sid>hi("MatchParen", "", s:gui03, "", s:cterm03, "", "")
call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "")
-call <sid>hi("Search", s:gui03, s:gui0A, s:cterm03, s:cterm0A, "", "")
-call <sid>hi("Substitute", s:gui03, s:gui0A, s:cterm03, s:cterm0A, "none", "")
+call <sid>hi("Search", s:gui01, s:gui0A, s:cterm01, s:cterm0A, "", "")
+call <sid>hi("Substitute", s:gui01, s:gui0A, s:cterm01, s:cterm0A, "none", "")
call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "")
ent.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/usr/bin/env python
import configparser
import mutagen
import os

from models.track import Track


def run(path=None):
    print("Scanning files")

    if path is not None:
        if os.path.isdir(path):
            store_dir(path)
        else:
            store_file(path)
    else:
        store_dir("/media/Music")


def store_file(path):
    m = mutagen.File(path, easy=True)
    if m:
        if not Track.store(path, m):
            print("Problem saving %s" % (path,))


def store_dir(path):
    file_store = []

    for root, dirs, files in os.walk(path):
        for name in files:
            file_path = "".join([root, "/", name])
            file_store.append(file_path)

    file_store.sort()
    j = 0
    media_files = 0
    print("Storing files")
    for file_path in file_store:
        j += 1
        m = mutagen.File(file_path, easy=True)
        if m:
            if not Track.store(file_path, m):
                print("Problem saving %s" % (file_path,))

            media_files += 1
        print(
            "%d%% complete, (%d files)" % (((j / len(file_store)) * 100),
                                           j)
        )
    print("Stored %d tracks" % (media_files,))


def delete_file(path):
    track = Track.find_by_path(path)

    if track:
        track_album = track.album
        track_artists = track.artists

        track.delete()

        if track_album and len(track_album.tracks) == 0:
            track_album.delete()

        for artist in track_artists:
            if len(artist.tracks) == 0:
                artist.delete()


def update_file(path):
    m = mutagen.File(path, easy=True)
    if m:
        track = Track.find_by_path(path)
        track.update(m)


def update_track_filename(oldpath, newpath):
    track = Track.find_by_path(oldpath)
    track.filename = newpath
    track.save()

if __name__ == "__main__":
    config = configparser.ConfigParser()
    config.read("mach2.ini")

    run(config["DEFAULT"]["media_dir"])