Giter VIP home page Giter VIP logo

pseudomyth's Introduction

pseudomyth

A script that parses filenames in a folder looking for videos with common release filename structures and plays them back in an appropriately random order.

Example

$ pip install pseudomyth

$ ls
[Coalgirls]_Clannad_10_(1280x720_Blu-Ray_FLAC)_[3827A783].mkv
[Coalgirls]_Clannad_ED_(1280x720_Blu-Ray_FLAC)_[A230547E].mkv
[Coalgirls]_Clannad_OP_(1280x720_Blu-Ray_FLAC)_[940FB269].mkv
[Commie] Persona 4 - 25 [Director's Cut] [BD 720p AAC] [311CA781].mkv
[Commie] Persona 4 - 26 [True Ending] [BD 720p AAC] [0A24880E].mkv
[HorribleSubs] Space Brothers - 19 [720p].mkv
[HorribleSubs] Space Brothers - 20 [720p].mkv
[HorribleSubs] Space Brothers - 21 [720p].mkv
[HorribleSubs] YuruYuri - 04 [720p].mkv
[HorribleSubs] YuruYuri - 05 [720p].mkv
[SGKK-Ruri] Deadman Wonderland - 01 (1280x720 H264 AAC) [666F0275].mkv
[SGKK-Ruri] Deadman Wonderland - 02 (1280x720 H264 AAC) [CD79F07F].mkv

$ pseudomyth
/人◕ ‿‿ ◕人\  LET’S WATCH 10 KEIONS!
Clannad [10] OP ED
Deadman Wonderland [1, 2]
Persona 4 [25, 26]
Space Brothers [19, 20, 21]
YuruYuri [4, 5]

At this stage, if the list of episodes is to your satisfaction, you could hit enter and pseudomyth would start playing back the first present episode of a random series. Shows with more present episodes are more likely to be picked. In the case of (in this example) Clannad, the opening and ending would be played prior to and following the episode selected.

Once an episode has been played, it is moved to a 'consumed' subdirectory of the current working directory and the cycle begins anew. You could, at this point, either ^C out of the script or hit enter to watch another episode. Because watched episodes are moved, you can stop and resume between episodes at will.

Configuration

If you don't want to use your system's default video player or pseudomyth can't work out what your system's default player is, you can configure an alternative command in a ~/.pseudomyth file. The command is specified as a shell command, where {filenames} will be replaced with the files (usually just one) to be played back. For example, mine looks like this:

[DEFAULT]
command=mpv -fs {filenames}

pseudomyth's People

Contributors

colons avatar

Stargazers

Anne Thorpe avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

theshillito

pseudomyth's Issues

Series designation is case-sensitive

…which could lead to problems. See, for instance:

Chuunibyou Demo Koi ga Shitai! [6] 
Chuunibyou demo Koi ga Shitai! [7, 8] 

In this example, there's a 2/3 chance that episode 7 will be played before episode 6 and, if it is, a 1/2 chance that 8 will also be played before 6. Less than ideal.

Forcing mplayer on people is silly

We should default to open or xdg-open, whichever is present, and look in ~/.pseudomyth for a default command such I could set mine to mplayer -fs {filename} or something.

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.