Skip to content

lainiwa/ph-marks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

status licence

💋 Pornhub Bookmarks at Your CLI

ph-marks is a zsh plugin, that will let you bookmark pornhub videos. It will not download the videos, only their meta information and thumbnails.

Screenshot

Installation

Dependencies

First of all you will need some dependencies to be present on your system for this plugin to work.

Here is a table of them. The links will lead to the "install" section of each dependency.

Name Description Necessity Note
coreutils Basic command line tools in UNIX-like systems required You are likely to already have them
jq or query-json JSON parser required jq is more likely to be present in your repo. However, query-json is a faster alternative.
youtube-dl Video (metadata) downloader required It is best to install the latest version with pip as older version might lag behind pornhub most recent changes
fzf Fuzzy picker optional These two are required for interactive video filtering
ueberzug In-terminal image viewer optional

Plugin install

Install with your favourite zsh plugin manager:

zinit load lainiwa/ph-marks

Getting Started

Type ph <TAB> to see available subcommands.

Let's add a first video to your library:

$ ph add 'https://www.pornhub.com/view_video.php?viewkey=ph5e6b2338e1256'

The other option is specifying just the viewkey instead of a full link: ph add ph5e6b2338e1256.

Now list your available videos with the following command:

$ ph list
https://www.pornhub.com/view_video.php?viewkey=ph5e6b2338e1256 "WHY Porn Changes the Brain | Science of NoFap [SFW]"

Definitely not the video to be had in one's porn bookmarks 🤣! Let's delete it:

$ ph delete ph5e6b2338e1256

Note you can ph delete <TAB> to insert the id of the video automatically.

Now add a bunch of videos to our library (for educational reasons only):

$ ph add \
    ph5c877ca9b5f1e ph5c877cecbb277 ph5c87cc007de24 \
    ph5c2a66302d63c ph5c585ffeede61 \
    ph5c0f6597271b0 ph5ddb8051f0d36

Let's say you feel sapiosexual today. You can then issue a search by title:

$ ph title facts and logic
https://www.pornhub.com/view_video.php?viewkey=ph5c0f6597271b0 "Ben Shapiro DESTROYS FEMALE LIBERAL WITH FACTS AND LOGIC"
https://www.pornhub.com/view_video.php?viewkey=ph5ddb8051f0d36 "Ben Shapiro gets BRUTALLY FUCKED by FACTS and LOGIC!!!!"

You can pipe ph commands into each other to filter them even further:

$ ph title facts and logic | ph cat anal
https://www.pornhub.com/view_video.php?viewkey=ph5c0f6597271b0 "Ben Shapiro DESTROYS FEMALE LIBERAL WITH FACTS AND LOGIC"

Categories do not make much sense sometimes...

Configuration

Configuration is being done via environment variables:

Variable Default value Meaning
PH_MARKS_HOME ~/.pornhub Directory with all the fetched video metadata
PH_MARKS_PARALLELIZATION 5 Number of parallel metadata fetches
PH_MARKS_BROWSER_CMD

Auto detection:

  • firefox --private
  • chrom{e,ium} --incognito
  • etc
Command to use to open a link in browser

Examples

Command Translation
ph category webcam
cinema::
ph tag squirting
whale::
ph tag squirting | ph fzf | ph open Interactively pick a 🐳: and watch it in browser
ph tag fake_taxi | ph open Search and open 🚕 in browser
ph ti facts and logic | ph del keep nothing but feels
ph ls | ph del keep nothing
rm ~/.pornhub/* basically same as above
ph tag mexican ukrainian | ph cat big_ass (:mexico: ∪ :ukraine:) ∩ :peach:

Feedback

If you have found a bug, file a bug report.

About

💋 Pornhub bookmarks at your CLI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published