GithubHelp home page GithubHelp logo

weisslj / choose-next Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 2.0 100 KB

Chooses a file from a directory. Very handy to re-watch tv series!

License: GNU General Public License v3.0

Python 100.00%
random watch series episodes

choose-next's Introduction

choose-next

Chooses a file from a directory. Very handy to re-watch tv series!

Motivation

Sometimes all you want to do is to lie in bed and watch a few episodes. But navigating to the right folder and choosing an episode which you haven't seen yesterday is too much work. With this small script all you have to do is to type "playfuturama" (using tab completion of course!) if you have set up e.g. this alias:

alias playfuturama='choose-next -c "mplayer -fs" "/media/usb/Futurama"'

News

3.0.0 2021-03-29 Require Python 3.6 (no new features, just usage of "try ... from")
2.0.1 2017-05-01 Small fixes, Windows compatible
2.0.0 2017-04-30 Bugfixes, Python 3 support, extensive test suite
1.1 2011-04-26 Bugfixes, --exclude, --include, and -d
1.0 2010-04-26 First working version

Examples

Over the next few weeks you want to watch all Futurama episodes in strict rotation:

# clear existing log file
choose-next --clear /media/usb/Futurama
# no special options needed
alias playfuturama='choose-next -c "mplayer -fs" "/media/usb/Futurama"'

You want to see a random episode (out of order!), but not one you have already seen. You want to prepend the filename so that the rotation order is retained:

playfuturama -rp

You were somehow distracted, and want to watch the last episode again:

playfuturama -l

You want to watch a specific episode, and continue to watch from this point on:

playfuturama -n10 "/media/usb/Futurama/S04E01.avi"

Usage

choose-next [OPTION]... DIR [FILE]...

  DIR        directory to choose from
  FILES      prefer these files before all others

Some options:

  -c CMD, --command=CMD      execute CMD on every selected file; %s in CMD is
                             substituted with the filename, otherwise it is
                             appended to CMD
  --clear                    remove log file and exit
  -l, --last                 play last played file
  -n NUM, --number=NUM       number of files to select (-1: infinite)
  -p, --prepend              prepend selected filename instead of appending
  -r, --random               choose a random file from DIR

Copyright

Copyright (C) 2010-2021 Johannes Weißl
License GPLv3+:
GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.