从目录中选择文件。很方便再看电视剧!

choose-next的Python项目详细描述


动机

有时候你只想躺在床上看几集。但是 导航到正确的文件夹并选择一个您尚未看到的插曲 昨天的工作太多了。有了这个小剧本你所要做的就是 键入“playfuturama”(使用tab键完成课程!)如果你设置了例如 此别名:

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

新闻

2.0.12017-05-01Small fixes, Windows compatible
2.0.02017-04-30Bugfixes, Python 3 support, extensive test suite
1.12011-04-26Bugfixes, ^{tt1}$, ^{tt2}$, and ^{tt3}$
1.02010-04-26First working version

示例

在接下来的几周里,你想严格地看所有的《未来》剧集 旋转:

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

你想看一个随机的插曲(无序!),但你已经没有了 看到。您需要预先设置文件名,以便保留旋转顺序:

playfuturama -rp

不知何故你分心了,想再看最后一集:

playfuturama -l

您希望观看特定的一集,并从现在开始继续观看:

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

用法

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

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
如何使用JSON将值从安卓 java类传递到php?   Java MySQL语法错误不会消失   java Android应用程序无法启动活动   bytebuffer在Java中从字节解码实数   java我无法在php中解码json对象   Swing中的JavaFX集成   java如何在JPA实体bean中使用或注释虚拟字段,该字段不应持久化到数据库中   来自另一个活动的java访问方法   java Tapestry动态生成图像   java有没有一种正则表达式方法可以将一组字符替换为另一组字符(比如shell tr命令)?   java通过转换gson将一些特定的表导出为文件   用java格式化字符串并写入文件   Java使用Graphics2D矩形在面板中创建2D平铺贴图?