Package: mmm
File        : README.md
Maintainer  : Felix C. Stegerman <flx@obfusk.net>
Date        : 2018-09-16

Copyright   : Copyright (C) 2018  Felix C. Stegerman
Version     : v0.4.2
License     : GPLv3+PyPI VersionBuild
StatusGPLv3+Descriptionm - minimalistic media managerm keeps track of which files you’ve played (or are still playing) and
thus allows you to easily continue playing the next file (using vlc or
mpv).Supports importing existing playing/watched data from Kodi.Stores its data in JSON files (one per directory) in~/.obfusk-m;
you can put this directory in git if you want a changelog :)NB: extracting the timestamp from the vlc config and mpv output is a
little hacky :(NB: m uses$PWDto make sure it sees the current path the same as
the shell it is run from (i.e. it does not resolve the path by following
symlinks, allowing the link targets to be relocated); unfortunately,
this means that itdoes notsee two directories as identical if they
are accessed using different paths, even if the resolved path is the
same. So you may want to avoid using different paths to the same
directory (and--dir).Examples$cd/some/media/dir$mls# list files ([*] = skip, [x] = done, [>] = playing, [ ] = new)[x]Something-01.mkv[x]Something-02.mkv[x]Something-03.mkv[x]Something-04.mkv[x]Something-05.mkv[x]Something-06.mkv[>]Something-07.mkv0:04:04[]Something-08.mkv[]Something-09.mkv$mnext# plays current/next episode (i.e. #7) w/ vlc$mld# list dirs (shows #playing, #new for indexed subdirectories)(2!)DirA()DirB(1>0!)DirC(0!)DirDCommands include:list/ls,list-dirs/ld,list-all/la,next,play FILE,mark FILE,unmark FILE,skip FILE,index,playing,watched,skipped,todo.See also the tests in the source code (also available asm examples)
for more examples.Command-linem is designed to work well with other command-line tools:$m--colourld|column$m--colourls|tail$cat"$(mdb-file)"|jq.dirGUIIn situations where you prefer simple keybindings to typing on the
command-line, you can use them-guiwrapper.Help$m--help# global options & subcommands$mls--help# subcommand (ls in this case) options & argument(s)$mexamples# show some examples (from the tests)RequirementsPython >= 3.5.InstallingYou can just putm.pysomewhere on your$PATH(in e.g.~/bin; I suggest calling itm, but you’re free to choose another
name).You may want to clone the repository instead of just downloadingm.pyto be able to get new versions easily.Alternatively, you can install m using pip (the Python package manager)
or build and install a Debian package.NB: the pip and Debian packages are calledmmminstead ofm.Using git$cd/some/convenient/dir$gitclonehttps://github.com/obfusk/m.gitobfusk-m$cd~/bin# or some other dir on your $PATH$ln-s/some/convenient/dir/obfusk-m/m.pymUpdating:$cd/some/convenient/dir/obfusk-m$gitpullUsing pip$pip3install--usermmm# for Debian; on other OS's you may need# pip instead of pip3 and/or no --userBuilding a Debian package$sudoaptinstalldebhelperdh-pythonpandoc# install build dependencies$cd/some/convenient/dir$gitclonehttps://github.com/obfusk/m.gitobfusk-m$cdobfusk-m$dpkg-buildpackage$sudodpkg-i../mmm_*_all.debConfiguration FileYou can set/override some defaults in~/.obfusk-m/config.json; for
example:{"add_exts":[".mp3",".ogg"],"colour":true,"exts":[".avi",".m4v",".mkv",".mp4",".ogv",".webm"],"ignorecase":true,"numbers":true,"numeric_sort":true,"only_indexed":true,"player":"mpv","show_hidden":true}TODOupdate README + version (4x + dch) + package (deb + pip)!ack TODOdebian Tag:?use markdown for README now that pypi supports itas soon as I have wheel >= 0.31.0 in Debianno need to buildREADME.rstsetup.py:with_name("README.md"),long_description_content_type = "text/markdown"more file extensions!documentsafe()vs--zero_pty_run: also minimize output if not a tty?fixm _testwhen run via wrapper (m.MErrorvsMError)?Maybem--virtualfoo/bar{ls,...}+m virt[--update][--title]*[--url]*[--url-template][--episodes][--browser]+VIRTUAL:/foo/bar+virt__*.json+m{watching,...}--include-virtual?test edge cases/failures?--config-dir?testEND_SECS?note usage of dyn vars?bash completion?m mv?--treeforplayingetc.?--json?kodi db export/sync?sign pypi package?fix.exist()race conditions?uselocale.strcollvs--ignorecase?CAVEATSBecause thealiascommand uses symlinks internally, you should
probably not create symlinks nameddir__*.jsonin~/.obfusk-munless you know what you are doing.LicenseGPLv3+