From 6f36970b34e797a5e2132a7591d72ffc037530e2 Mon Sep 17 00:00:00 2001 From: Lionel Dricot Date: Fri, 18 Feb 2022 15:52:27 +0100 Subject: [PATCH] new info command --- CHANGELOG | 5 ++++- offpunk.py | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index a07f442..8a976da 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,11 +4,14 @@ UPGRADE: Users who subscribed to pages before 0.4 should run once the command "list subscribe subscribed". Without that, the subscribed list will be seen as a normal list by sync. - New list command : "list freeze" and "list suscribe" - Pictures are now displayed directely in terminal (suggested by kelbot) -- Introducing the "open" command to open current page/image/file with external handler. +- "open" command to open current page/image/file with external handler. - "set width XX" now works to set the max width. If smaller, terminal width is used (thanks kelbot for reporting the bug) - RSS feeds are now rendered as Gemlogs to improve consistency while browsing +- "subscribe" will detect feeds in html pages if any - "less" will restore previous position in a page (requires less 572+) - Improved syncing performances and multiple bug/crash fixes. +- "version" will now display info about your system installation +- "info" command will display technical information about current page ## 0.3 - Feb 11th 2022 New Features: diff --git a/offpunk.py b/offpunk.py index 98c2741..171f5e9 100755 --- a/offpunk.py +++ b/offpunk.py @@ -2594,6 +2594,21 @@ Think of it like marks in vi: 'mark a'='ma' and 'go a'=''a'.""" self.marks[line] = self.gi else: print("Invalid mark, must be one letter") + + @needs_gi + def do_info(self,line): + """Display information about current page.""" + out = self.gi.full_title() + "\n\n" + out += "URL : " + self.gi.url + "\n" + out += "Mime : " + self.gi.get_mime() + "\n" + out += "Cache : " + self.gi.get_cache_path() + "\n" + if self.gi.renderer : + rend = str(self.gi.renderer.__class__) + rend = rend.lstrip("") + else: + rende = "None" + out += "Renderer : " + rend + "\n" + print(out) def do_version(self, line): """Display version and system information."""