Skip to content
/ cons Public

makes consuming media so fast and easy that one might consume too much

License

Notifications You must be signed in to change notification settings

scottjad/cons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cons

makes consuming media so fast and easy that one might consume too much

Overview

Cons is a command line media library primarily for consuming temporary media. Like iTunes but for video, pdfs, and audio. It’s not intended for managing a permanent music/video library. Files can also be removed/added through normal file management tools.

Dependencies

  • Ruby
  • youtube-dl (recommended if you want to download videos)
  • aria2 (recommended not required)

Install

cd ~/src
git clone https://github.com/scottjad/cons.git
ln -s ~/src/cons/cons ~/bin/cons # or add to PATH
cp ~/src/cons/config.default ~/.cons_config.rb
$EDITOR ~/.cons_config.rb # setup your apps
mkdir ~/Desktop/cons # unless your library already exists

Usage

TaskCommand
Show librarycons
Add item from urlcons http://youtu.be/1xVw6PsSinI
Play itemcons 0
Play item selected from dmenucons -
Replay last item playedcons last
Consume next new itemcons next
Remove itemcons rm 0
Remove all consumed non-sticky itemscons clean
Mark item for keepin’cons keep 0
Add item to queue for latercons http://youtu.be/0dx-7vwJJrc queue
Retry failed/queued downloadscons retry
Add item from filecons mv ~/video.mp4

Notes

Selecting items with dmenu

If you use “-” as an id, such as “cons -” or “cons rm -“, then cons will prompt you for the item using dmenu.

Consumed and keep flags

In the file listing there are flags to designate various states. “*” means consumed and “!” means don’t delete.

Persistent ids

The id’s listed will persist until you do another listing. So if you remove item 0, item 1 does not become item 0 until you list the library again.

Leave off the –

You can leave off the – in options. For example, type “cons keep 0” instead of “cons –keep 0”.

Special identifiers

”-” and “last” are special identifiers. Instead of an id, you can use them to interactively choose a file with dmenu or use the last item consumed, respectively. For example, “cons rm -” to choose a file to delete, or “cons keep last” to mark the last item consumed for keeping.

Item shortcut

There are a few shortcuts that only work as the first parameter, such as “cons http://foo.com/bar” (shortcut for “cons –url http://foo.com/bar”) and “cons 0” (shortcut for “cons –item 0”)

misc folder

By default items added to the library are placed under the misc folder. If you would like to put them in a different folder when adding use the –dir option, e.g. “cons –dir youtube –url http://www.youtube.com/watch?v=T2xh9-UPSlU

Improvements

Increase playback speed

export CONS_PLAYBACK_SPEED=1.61

Faster youtube downloads

If you use rbrito’s youtube-dl fork (use-other-downloaders branch) then you can use aria2c with 5 (up to 16) concurrent connections.

Bookmark

export cons=~/Desktop/cons
cd $cons

Stumpwm interface

Deprecated: Use the integrated dmenu interface instead https://github.com/scottjad/dotfiles/blob/master/.stump/cons.lisp

FAQ

Why aren’t you using xdg-open/gnome-open for everything?

They return immediately so the file gets marked as consumed and renamed sometimes before the program has a chance to read it. I haven’t come up with a good solution yet so only use these as last resort.

Why does your ruby suck?

This is the longest thing I’ve written in ruby. Improvement forks welcome.

Authors

Scott Jaderholm < my first name at my last name dot com >

About

makes consuming media so fast and easy that one might consume too much

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages