From 427e446281a217553c5c2fae917129fff320182c Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 11 Sep 2024 05:16:54 +0200 Subject: [PATCH] Updated README with introduction, features and new variables. --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f83ca31..eea37f3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,30 @@ # reddit-post-dump +A powerful utility to fetch almost all of a reddit user's content. It supports many image and video hosts and has offers extensive filenaming options. + +### Features +Most features are optional and can easily be disabled! + +* Freely configure target paths with variables like username, formatted date, post title, subreddit, image ID, index in album and many more. All variables can be used to create directories +* Fetch any (reasonable) amount of users in one go, with their profile image and description +* Save image descriptions or other variables as metadata (EXIF for JPEG only, broader support coming soon!) +* Avoid duplicates +* Extract single images from albums + +### Supported hosts +* Reddit text/self, images and videos +* Imgur +* Gfycat +* Eroshare archive + +### Plans and ideas +* Avoid redownloading unless specified otherwise +* Support for more image hosts (e.g. vidble, erome) +* Watch-mode (keep the process running and automatically save new posts for specified users) +* Templates for text/self posts (use any variable inside text files) +* Expand metadata support to PNGs, GIFs and videos +* Save additional details to an index file +* Search various archives for deleted posts (controversial, may or may not be implemented) +* Only download non-default profile images (avoid standard avatars) ## Installation reddit-post-dump requires a arbitrarily recent version of Node.js. Before use, dependencies must be installed as follows: @@ -26,11 +52,30 @@ To change the configuration, please refer to `config/default.js`. I recommend no Path patterns dictate where and how a file will be saved. Various variables and options are available, and you may use subdirectories divided by `/`. #### Variables +#### Base +`$base` is an optional variable intended to set the beginning most paths have in common. The variable must be added to each path manually and is not prefixed automatically as to allow for exceptions. + +#### User +* `$user` or `$username`: The nickname of the reddit user that submitted the post +* `$userId`: The ID of the reddit user that submitted the post +* `$userCreated`: The creation date or birthday of the reddit user, formatted according to `dateFormat` described below +* `$userVerified` (boolean): Whether the reddit user is verified +* `$userVerifiedEmail (boolean): Whether the reddit user has verified their e-mail address +* `$userGold` (boolean): Whether the reddit user is a gold member of reddit + +#### Profile +Many reddit users have a 'subreddit' of their own in the form of a profile (not to be confused with users that have created an *actual* subreddit for themselves). These variables are only available for users that have enabled this. + +* `$profileTitle`: The title of the reddit user's profile +* `$profileId`: The ID of the reddit user's profile +* `$profileDescription`: The description of the reddit user's profile +* `$profileOver18` (boolean): Whether the profile contains adult content and requires an 'over 18' age confirmation + ##### Post * `$postId`: The ID of the reddit post * `$postTitle`: The title of the reddit post * `$postUser`: The user that submitted the post, almost always equivalent to the `--user` command line argument -* `$postDate`: The submission date of the reddit post, formatted by the `dateformat` configuration described below +* `$postDate`: The submission date of the reddit post, formatted by the `dateFormat` configuration described below * `$postIndex`: The index of the post according to the sort method * `$host`: Name of the source the content was hosted on @@ -38,17 +83,20 @@ Path patterns dictate where and how a file will be saved. Various variables and * `$albumId`: The ID of the media host album * `$albumTitle`: The title of the media host album * `$albumDescription`: The description of the media host album -* `$albumDate`: The submission date of the media host album, formatted by the `dateformat` configuration described below +* `$albumDate`: The submission date of the media host album, formatted by the `dateFormat` configuration described below ##### Item (individual image, video or text) * `$itemId`: The ID of the individual image or video * `$itemTitle`: The title of the individual image or video * `$itemDescription`: The description of the individual image or video -* `$itemDate`: The submission date of the individual image or video, formatted by the `dateformat` configuration described below +* `$itemDate`: The submission date of the individual image or video, formatted by the `dateFormat` configuration described below * `$itemIndex`: The index of the individual image or video in an album, offset by the `indexOffset` configuration described below -* `$extracted`: When extracting single album items is enabled and the item has been extracted, this variable will display the value of `extractedLabel` as described below in case the item was the only item in an album +* `$extracted` (boolean): When extracting single album items is enabled and the item has been extracted, this variable will display the value of `extractedLabel` as described below in case the item was the only item in an album * `$ext`: The extension of the medium. Must typically be included, but may be omitted for self (text) posts on Unix systems +#### `booleans` +Some variables are booleans and indicate whether or not a property applies. When you use a boolean variable, you must configure a string of text that is only inserted in place of a boolean variable when the variable is true. + ##### `dateFormat` Affects the representation of `$postDate`, `$albumDate` and `$itemDate` and defaults to `YYYYMMDD`. See [this documentation](https://date-fns.org/v1.29.0/docs/format) for an overview of all available tokens.