{ "info": { "author": "Evan Widloski", "author_email": "evan@evanw.org", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "Redrum - Reddit Wallpaper Downloader and Ranker\n==============================================\n\n.. image:: screenshot.png\n\nRedrum is a Reddit wallpaper downloader which scores wallpapers and selects the best based on resolution, aspect ratio, and number of views. It remembers which wallpapers were selected previously so you never see the same image twice.\n\nInstall the systemd units to run the script every two hours.\n\n\nInstallation\n------------\n\n1. Install through pip\n\n .. code:: bash\n\n pip3 install redrum\n\n2. Edit ``~/.config/redrum.ini`` with your preferred options.\n \n3. Install service for automatic wallpaper changing (optional)\n\n .. code:: bash\n\n # copy service files\n cp -u systemd/* ~/.config/systemd/user/\n\n # enable and start systemd timer\n systemctl --user enable redrum.timer\n systemctl --user start redrum.timer\n\n # the service can be triggered manually as well\n systemctl --user start redrum\n\n\n note: If using a python3 virtualenv, change ``ExecStart`` in ``redrum.service`` to ``/path/to/venv/bin/redrum``\n \nUsage\n-----\n\nIf redrum can't find a config file, it will create one in ``~/.config/redrum.ini`` automatically. You should update this file with your screen resolution and preferred subreddits, then run redrum again.\n\n.. code:: bash\n\n >>> redrum\n No config found at /home/evan/.config/redrum.ini. Creating...\n Update config with your preferred options and run redrum again.\n\n >>> redrum\n No previous score cache found at /home/evan/.cache/redrum_cache.json.\n Indexing page #0 from subreddit winterporn\n Indexing page #1 from subreddit winterporn\n Indexing page #2 from subreddit winterporn\n ...\n Selected http://i.imgur.com/3UWbcYG.jpg (EarthPorn) with score 5.21729920261845e-05 out of 5971 images\n The probability of selecting this image was 0.009851421028579594\n Applying wallpaper\n\nScoring algorithm\n-----------------\n\nImages are scored in three steps as follows:\n\n1. Three input scores are calculated for each image in the cache\n\n .. math::\n\n pixel_score = [total image pixels] / [total screen pixels]\n \n ratio_score = [image x-y ratio] / [screen x-y ratio]\n or\n [screen x-y ratio] / [image x-y ratio]\n (whichever is less than 1)\n \n views_score = [# views of this image] / [highest # views of all images]\n \n2. Each input score is run through a sigmoid function, in this case, the `logistic function`_. This helps to provide stronger differentiation between a good and a bad image than could be afforded with a linear method. The logistic function is defined by its ``midpoint`` and the slope at the midpoint, ``k``. \n\n .. image:: https://wikimedia.org/api/rest_v1/media/math/render/svg/2770ecdecd1a6d2375d17f73013905cea5fb2668\n .. figure:: https://upload.wikimedia.org/wikipedia/commons/8/88/Logistic-curve.svg\n :width: 400px\n \n Logistic function with ``midpoint=0``, ``k=1``\n\n\n In `redrum` the logistic function has been normalized such that f(0) = 1.\n .. math::\n\n ratio_logistic_score = (1 + pow(math.e, -ratio_k * (1 - ratio_off)))/(1 + pow(math.e, -ratio_k * (ratio_score - ratio_cutoff)))\n views_logistic_score = (1 + pow(math.e, -ratio_k * (1 - ratio_off)))/(1 + pow(math.e, -views_k * (views_score - views_cutoff)))\n pixel_logistic_score = (1 + pow(math.e, -ratio_k * (1 - ratio_off)))/(1 + pow(math.e, -pixel_k * (pixel_score - pixel_cutoff)))\n \n ``pixel_score``, ``ratio_score``, and ``views_score`` each have their own ``midpoint`` and ``k``, which can be set in ``~/.config/redrum.ini``\n\n .. _logistic function: https://en.wikipedia.org/wiki/Logistic_function\n \n3. The three logistic scores are then multiplied to calculate an image's ``final_score``. This score is used to do a random weighted select of all images in the cache. An image with a ``final_score`` that is twice the score of another image is twice as likely to be selected during the random selection.\n\nTuning the scoring algorithm\n----------------------------\nYou can adjust the scoring algorithm if you aren't satisfied with the images being selected. ``redrum_tune`` allows you to quickly adjust the ``midpoint`` and ``k`` of the logarithmic function and view its effects on the ``final_score``. You need to run ``pip install redrum[tune]`` to install the extra dependencies (matplotlib, numpy).", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/evidlo/redrum", "keywords": "Reddit wallpaper changer", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "redrum", "package_url": "https://pypi.org/project/redrum/", "platform": "", "project_url": "https://pypi.org/project/redrum/", "project_urls": { "Homepage": "https://github.com/evidlo/redrum" }, "release_url": "https://pypi.org/project/redrum/1.5.2/", "requires_dist": null, "requires_python": "", "summary": "uses math to select wallpapers from Reddit", "version": "1.5.2" }, "last_serial": 4515161, "releases": { "1.4.5": [ { "comment_text": "", "digests": { "md5": "9e4c83c80f1b85fe754305cfc115a787", "sha256": "de19b086fb83331e37bc4c34f742d7a6e02ba38c3beb2e769f96de97d51daa7e" }, "downloads": -1, "filename": "redrum-1.4.5.tar.gz", "has_sig": false, "md5_digest": "9e4c83c80f1b85fe754305cfc115a787", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7095, "upload_time": "2017-04-19T05:33:48", "url": "https://files.pythonhosted.org/packages/72/53/3239eb4ba3105db5b0a7ee195846c204fbf6495c27d557f0a83fc6e2a14f/redrum-1.4.5.tar.gz" } ], "1.4.6": [ { "comment_text": "", "digests": { "md5": "f93f71e09f5f7c01deffdf41b4ff97b1", "sha256": "310c9ca9e20faa3d20caa28aec39a7f7524a6577031471666834a2bc6230fcfe" }, "downloads": -1, "filename": "redrum-1.4.6.tar.gz", "has_sig": false, "md5_digest": "f93f71e09f5f7c01deffdf41b4ff97b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17576, "upload_time": "2017-05-17T03:27:39", "url": "https://files.pythonhosted.org/packages/28/25/0a7523dc49e6baf8c8e877d1cd1eaaf3f88af06e29e92a9b7bece6ceacf5/redrum-1.4.6.tar.gz" } ], "1.4.7": [ { "comment_text": "", "digests": { "md5": "6f6158681ee08302ed7a5c4f36b71fb0", "sha256": "4836d23ea042d324137afda9b21f16d3de13bfce9f90bf5baf31a0267d6dd7f5" }, "downloads": -1, "filename": "redrum-1.4.7.tar.gz", "has_sig": false, "md5_digest": "6f6158681ee08302ed7a5c4f36b71fb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17582, "upload_time": "2017-05-17T03:31:41", "url": "https://files.pythonhosted.org/packages/af/ea/b5e4ebf244e437259b17c5ab9067a584d7a9f49bb6a79827cb346f3bb302/redrum-1.4.7.tar.gz" } ], "1.4.8": [ { "comment_text": "", "digests": { "md5": "604075456cd91354db794efcb12b0c79", "sha256": "7354a1908e944f9fd16ed42e37076c2fbe5349b814c554cc0b4f825a2ac6d53f" }, "downloads": -1, "filename": "redrum-1.4.8.tar.gz", "has_sig": false, "md5_digest": "604075456cd91354db794efcb12b0c79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15645, "upload_time": "2017-05-29T16:02:31", "url": "https://files.pythonhosted.org/packages/a5/a5/5a08fb3ff3cbc42f427965c75d079f7b29fb0b74a4cd7ff71bff44f39a01/redrum-1.4.8.tar.gz" } ], "1.5.0": [ { "comment_text": "", "digests": { "md5": "33442b838b6e4b0499b6b6d8ca14bfd3", "sha256": "5a589955e92e6c1f2e843bf0443d9c63041ec15dd2a8500ae9757336d093eb86" }, "downloads": -1, "filename": "redrum-1.5.0.tar.gz", "has_sig": false, "md5_digest": "33442b838b6e4b0499b6b6d8ca14bfd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16753, "upload_time": "2017-11-07T02:49:16", "url": "https://files.pythonhosted.org/packages/82/f4/34a257f264e769674a92f5ae585c551c34e35f32ab56c3af6f84b4b2276f/redrum-1.5.0.tar.gz" } ], "1.5.1": [ { "comment_text": "", "digests": { "md5": "d81cdd45a20a6995842415592528b7f4", "sha256": "3f8dae6964553bc5ca4b580f6be5f574150939f19532706e1c73f844a439c31f" }, "downloads": -1, "filename": "redrum-1.5.1.tar.gz", "has_sig": false, "md5_digest": "d81cdd45a20a6995842415592528b7f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16937, "upload_time": "2017-11-15T05:19:21", "url": "https://files.pythonhosted.org/packages/03/ef/b90cf7215eb28bbe279bbdd24b041d306a981dabc993ced7cf7f93e26a17/redrum-1.5.1.tar.gz" } ], "1.5.2": [ { "comment_text": "", "digests": { "md5": "62f96149b51da1ff99b1de4af8c4c30b", "sha256": "d1b3cba1f8901e65ce04b3f33047b73e3206b7df5a12d01494b7231b2b4d3004" }, "downloads": -1, "filename": "redrum-1.5.2.tar.gz", "has_sig": false, "md5_digest": "62f96149b51da1ff99b1de4af8c4c30b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16967, "upload_time": "2018-11-22T03:51:20", "url": "https://files.pythonhosted.org/packages/bf/1d/c60af61259fb0f146a47442abf70fddc05c1f7bb54b36aa11e92af31aed3/redrum-1.5.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "62f96149b51da1ff99b1de4af8c4c30b", "sha256": "d1b3cba1f8901e65ce04b3f33047b73e3206b7df5a12d01494b7231b2b4d3004" }, "downloads": -1, "filename": "redrum-1.5.2.tar.gz", "has_sig": false, "md5_digest": "62f96149b51da1ff99b1de4af8c4c30b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16967, "upload_time": "2018-11-22T03:51:20", "url": "https://files.pythonhosted.org/packages/bf/1d/c60af61259fb0f146a47442abf70fddc05c1f7bb54b36aa11e92af31aed3/redrum-1.5.2.tar.gz" } ] }