{"id":13617533,"url":"https://github.com/radude/rentry","last_synced_at":"2025-04-14T08:57:03.800Z","repository":{"id":42027475,"uuid":"117091792","full_name":"radude/rentry","owner":"radude","description":"Markdown pastebin from command line","archived":false,"fork":false,"pushed_at":"2024-12-21T17:41:59.000Z","size":22,"stargazers_count":513,"open_issues_count":14,"forks_count":28,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-07T01:11:18.954Z","etag":null,"topics":["cli","console","markdown","markdown-editor","markup","paste","pastebin","pastebin-client","pastebin-service","publishing","shell","terminal"],"latest_commit_sha":null,"homepage":"https://rentry.co","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/radude.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-11T11:33:51.000Z","updated_at":"2025-04-06T17:46:34.000Z","dependencies_parsed_at":"2024-01-14T15:23:10.659Z","dependency_job_id":"e6278693-716f-43a6-99bd-8029138f7829","html_url":"https://github.com/radude/rentry","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":0.09523809523809523,"last_synced_commit":"176a31c5c447815115be5582022695754a353ee4"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radude%2Frentry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radude%2Frentry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radude%2Frentry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radude%2Frentry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radude","download_url":"https://codeload.github.com/radude/rentry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852120,"owners_count":21171839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","console","markdown","markdown-editor","markup","paste","pastebin","pastebin-client","pastebin-service","publishing","shell","terminal"],"created_at":"2024-08-01T20:01:43.267Z","updated_at":"2025-04-14T08:57:03.781Z","avatar_url":"https://github.com/radude.png","language":"Python","funding_links":[],"categories":["Python","cli"],"sub_categories":[],"readme":"# rentry\n\n\u003ca href=\"https://rentry.co/\"\u003e\u003cimg width=\"110\" height=\"110\" src=\"https://rentry.co/static/logo-border-fit.png\" align=\"right\" alt=\"rentry.co markdown paste repository\"\u003e\u003c/a\u003e\n\n[Rentry.co](https://rentry.co) is markdown-powered paste/publishing service with preview, custom urls and editing. \n\nThis repository contains a simple script that allows pasting and editing from command line interface. It also gives examples for accessing each endpoint programatically.\n  \n## Installation\n\n##### Manually:  \n```sh\nwget https://raw.githubusercontent.com/radude/rentry/master/rentry -O ./rentry \u0026\u0026 chmod +x ./rentry\n```\n\n\n\npip install -r 'requirements.txt'\ncp env_example .env\n\n## Usage (Command Interface)\n\n```console\n$ rentry --help\n\nUsage: rentry {new | edit | raw} {-h | --help} {-u | --url} {-p | --edit-code} text\n\nCommands:\n  new     create a new entry\n  edit    edit an existing entry's text\n  raw     get raw markdown text of an existing entry\n  delete  delete an entry\n    \nOptions:\n  -h, --help                 show this help message and exit\n  -u, --url URL              url for the entry, random if not specified\n  -p, --edit-code EDIT-CODE  edit code for the entry, random if not specified\n  -f, --field FIELD-NAME     the field you wish to update (use on update command only)\n  -v, --value VALUE          the value you wish to update (use on update command only)\n\nFields: (for use on update command only)\n  edit_code\n  url\n  modify_code\n\nExamples:\n  rentry new 'markdown text'               # new entry with random url and edit code\n  rentry new -p pw -u example 'text'       # with custom edit code and url \n  rentry edit -p pw -u example 'text'      # edit the example entry\n  cat FILE | rentry new                    # read from FILE and paste it to rentry\n  cat FILE | rentry edit -p pw -u example  # read from FILE and edit the example entry\n  rentry raw -u example                    # get raw markdown text\n  rentry raw -u https://rentry.co/example  # -u accepts absolute and relative urls\n\n  rentry delete -p pw -u example          # deletes an entry\n  rentry update -p pw -u example -f 'edit_code' -v 'new-pw'   # Sets the edit code to something new\n  rentry update -p pw -u example -f 'url' -v 'new_url'        # Sets the url to something new\n  rentry update -p pw -u example -f 'modify_code' -v 'm:1'    # Sets the modify code to something new\n  rentry update -p pw -u example -f 'modify_code' -v ''       # Unsets the modify code\n  \n```\n\n##### Url\n\nOptional Url can be set (`-u, --url URL`)  \nIt goes rentry.co/HERE. If no Url was set then random Url will be generated automatically.\n\n##### Edit code\n\nOptional edit code can be set (`-p, --edit-code EDIT-CODE`)  \nIt can be used to edit the entry later. If no edit code was set then random edit code will be generated automatically. Generated edit code will be shown to you only once, so remember it or save it. You can share this code with anyone so a group of people can edit the same entry.\n\n## Usage (API)\n\nSee the example scripts for a quick start.\n\nSend a standard POST request to the below endpoints. Make sure to provide a csrf token and a request header.\n\nStarred fields are required. replace [url] with the actual URL in question (without brackets).\n\nExample endpoint (Editing rentry.co/example): /edit/example\n\nAll fields that can be used as well as set (url, edit_code, modify_code) have new_ appended to their names when setting them.\n\n### Returns\n\n* status\n* content (if status is not 200, the error will be displayed here. Otherwise, all return values below are returned contained within this field)\n\n### /new\n\nFields:\n\n* csrfmiddlewaretoken *\n* text *\n* metadata\n* url\n* edit_code\n\n### /edit/[url]\n\nYou may provide a modify code to the edit_code field if one is set. Use this to give other people edit access to a page without the ability to steal it.\n\nFields:\n\n* csrfmiddlewaretoken *\n* edit_code *\n* text\n* metadata\n* update_mode\n* new_url\n* new_edit_code\n* new_modify_code (provide 'm:' to unset, this matches the website's functionality)\n\n### /raw/[url]\n\nFields:\n\n* csrfmiddlewaretoken *\n* url\n\nHeaders:\n\nrentry-auth (contact support@rentry.co for a code to use here. This header then gives access to all posts at /raw). Or use it as a page's metadata value : SECRET_RAW_ACCESS_CODE to permit raw access without this header.\n\nReturns:\n\n* text\n\nTo fetch metadata, please use /fetch endpoint\n\n### /fetch/[url]\n\nFields:\n\n* csrfmiddlewaretoken *\n* edit_code *\n\nReturns:\n\n* url\n* url_case (if you set the URL with a different case structure than all lowercase, this will reflect that)\n* views\n* pub_date (YYYY-MM-DD T HH:MM:SS) (will not change if deleted and re-created)\n* activated_date (if deleted and re-created, this is when this occured last)\n* edit_date\n* modify_code_set (bool)\n* text\n* metadata (returns as an object with key/value pairs. Each value is the entire set metadata value as a single string)\n* metadata_version\n\n### /delete/[url]\n\nFields:\n\n* csrfmiddlewaretoken *\n* edit_code *\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradude%2Frentry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradude%2Frentry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradude%2Frentry/lists"}