A gem to rename files downloaded from premium porn sites. In short, this is a ruby-based CLI that can batch rename files to give them more meaningful names. This tool does not bulk download videos from the mentioned sites.
Currently supports the following websites (characters in brackets are the abbreviations used to specify site client, more on that later):
- Aletta Ocean Live (ao)
- Babes (bb)
- Bang (bg)
- Blacked Raw (vx)
- Blacked (vx)
- Brazzers (bz)
- Casting Couch (wa)
- Digital Playground (dp)
- Evil Angel (ea)
- Exotic4k (wa)
- FantasyHD (wa)
- GoodPorn (gp)
- Holed (wa)
- Lubed (wa)
- Mofos (mo)
- My Very First Time (wa)
- NF Busty (nf)
- Nanny Spy (wa)
- POVd (wa)
- PassionHD (wa)
- Puremature (wa)
- Reality Kings (rk)
- Slayed (vx)
- SpyFam (wa)
- Tiny 4k (wa)
- Tushy Raw (vx)
- Tushy (vx)
- Twistys (tw)
- Vixen (vx)
- Wicked (wi)
gem install xxx_rename
The videos should be downloaded from the original site since this tool uses the scene name to search and rename.
Always run the tool without the --save flag to see what actions the tool will take.
The rename command is the most important command of the CLI. You need to call rename command as follows xxx_rename rename <path> args
. The <path>
parameter lets you specify a file or a directory (use .
if you are already in the directory you want). Typically, the args are specified using --args
syntax. These can be:
--site site_client
: A site client tells the CLI which source/API to use to lookup file metadata and how to fetch searchable params from the filename. This parameter is mandatory and should be one of the params listed above. e.g.--site bz
. Using the incorrect site client will have no changes over your files.--save
: An optional param but very important. Unless you explicitly invoke the CLI with--save
, the CLI will not modify your files.--output
: This is an optional param where you need to specify a path to an existing output file. If you don't provide this, the CLI will look for an existing output file in your current directory. If none exists, it will create one for you. This file is used to store the last name of the files before renaming (useful if you want to rollback your changes at a later point of time).--nested
: Specify this flag if you want the CLI to scan files inside the current directory recursively. If this flag is not provided, the CLI will only scan for files inside the directory where it was invoked from.--verbose
: As the name suggests, the flag makes the CLI output some extra information for you to know what's happening at any given time.
Other than these args, the CLI also expects extra arguments for specific site clients.
--username <username>
: Require if your site client is alettaoceanlive.com.--password <password>
: Require if your site client is alettaoceanlive.com.
Example usage can look like:
xxx_rename rename --site=wa ./lubed-she-shoots-he-scores-720.mp4
xxx_rename rename --site=bz . --save
xxx_rename --help
Commands:
xxx_rename help [COMMAND] # Describe available commands or one specific command
xxx_rename rename object --site=SITE # Rename a file or files inside a folder
xxx_rename rollback file # Rollback changes created by the rename tool
You need to pass the cli two additional flags --username [Your email address]
and --password [Your password]
Why? The only way xxx_rename can fetch the scene info from a file is by actually looking visiting each scene and looking at the filename of the scene. This can only be done by logging into your account which is why the tool asks for your login credentials. Rest assured the tool will not leak your credentials anywhere (check the source code if you want).
Also, the CLI has to first fetch all the metadata before it can make a match so it's recommended that you use this option for bulk renames.
NFBusty's search API is restricted behind a paywall. But the filename has enough information that the CLI can fetch the information by just scraping the website. Hence this option will also first get the information of all the scenes before making any matches.
Bang has been really tricky to implement and the current implementation makes an average of 4-5 API calls before matching a file. This can be improved in a later release but for now, keep in mind that using bang site client will be considerably slower than the other site clients. However, once a file is renamed, the recommended syntax stores a six-digit ID of the file inside the new filename. This should make subsequent renames faster.
While downloading videos from porn sites, they always end up giving unhelpful names which don't make any sense. eg. slip-and-slide_1080p.mp4
. Not only is this useless, it makes organising the files a living hell if the number of files are too large. Solution: You can keep track of the downloads and create folders on the fly.
With this gem, you can download all the videos in any folder you want and this command will scan through the folder looking for the video files and rename them in one of these formats:
- <scene name> [C] <collection name> [F] <female actor(s)> [M] <male actore(s)>.mp4
- <scene name> [F] <female actor(s)> [M] <male actore(s)>.mp4 if collection data is not available
- <scene name> [C] <collection name> [A] <actor(s)>.mp4 if API doesn't differentiate between male and female actors.
Moreover, the API also tries to get the release date of the scene and sets them as the date created of the file.
Thanks to the amazing APIs exposed by websites and some web scraping, this service reads the scene name from the file and searches for the exact match using the API. The only case where this can fail is if the API fails or limits the response (e.g. a pornstar is removed from their site or a very specific type of error called "Banned Search Word"). The gem will only rename the file if the names are an exact match. That said, it can fail if there are two scenes with the exact same name and there's no fix for this issue.
Yes! The rename
command will only rename files if you pass the --save
flag. Without the flag it just outputs what the file will be renamed to. So say you want to give your own naming format, you can fork this project, change the scheme and review what the generated names will be.
Yes again! The rename
command emits a response.csv
file in the folder from where it was invoked. Use the rollback
command to revert back the changes and you will get your files in the original condition.
If you really want to test out this tool, give it a single file instead of an entire directory and review it yourself.
The tool works on the assumption that the videos are downloaded from the original site. I don't support piracy and this constraint ensures that this tool knows what to expect in its input.
That said, sites like bang, archangelvideo, julesjordan and naughtyamerica are not supported since the file names of the downloaded scenes don't have enough information for the CLI to guess the website of the scene.
Now that Bang.com is supported from version 2.0.0.alpha4, I believe it's not impossible to add support for these sites. It's just very difficult and I don't plan on implementing them anytime soon.
Any site that provide a meaningful filename and have a usable API/website. Raise a request on the issues page with the name of the website you want to get support for and a list of original filenames (not the actual files). I can't promise if I will be able to implement it but the request will be open for someone in the community to integrate.