From Vincent Jousse to ~lioploum/offpunk-packagers
Hi, Those questions are great questions that we indeed need to address, and I’m open to suggestions here. My first approach was to only provide the regular version of unmerdify, tag versions, and make it a dependency of offpunk. After some discussions with Ploum who wanted as few dependencies as possible to offpunk and was not convinced by the multi files approach of unmerdify, I tried to bundle unmerdify with offpunk as a Proof Of Concept. I suppose that we now need to decide what we do with unmerdify. Do we make it a dependency to offpunk? And if so, do we keep the one file
From Vincent Jousse to ~lioploum/offpunk-devel
Hi, Those questions are great questions that we indeed need to address, and I’m open to suggestions here. My first approach was to only provide the regular version of unmerdify, tag versions, and make it a dependency of offpunk. After some discussions with Ploum who wanted as few dependencies as possible to offpunk and was not convinced by the multi files approach of unmerdify, I tried to bundle unmerdify with offpunk as a Proof Of Concept. I suppose that we now need to decide what we do with unmerdify. Do we make it a dependency to offpunk? And if so, do we keep the one file
From Vincent Jousse to ~lioploum/offpunk-devel
On 2/11/25 21:15, Ploum wrote: > > Hi Vincent, > Hi, > Thanks a lot for the patch. I’ve tried it and it seems that it breaks a > few feature. I need to investigate more but the tour is not working > properly anymore. Does it work at least for the `go` command? It’s the only one that I have tested as I am not a daily user of offpunk for now.
From Vincent Jousse to ~lioploum/offpunk-devel
--- ansicat.py | 169 +++++++++++++-- offpunk.py | 52 ++--- opnk.py | 39 +++- unmerdify.py | 574 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 785 insertions(+), 49 deletions(-) create mode 100755 unmerdify.py diff --git a/ansicat.py b/ansicat.py index dfbd30a..9ba4a76 100755 --- a/ansicat.py +++ b/ansicat.py @@ -23,6 +23,13 @@ try: except ModuleNotFoundError: [message trimmed]
From Vincent Jousse to ~lioploum/offpunk-devel
This patch superseeds the prior one I sent regarding the unmerdify integration. After discussing with Ploum, I’ve decided to put unmerdify in a single file directly bundled with offpunk to ease dependencies and files management. I’ve tried to make the changes to offpunk files as small as possible and I’ve reverted some non-required changes I made in the previous patch to facilitate the review. For unmerdify to work, you need to first clone this repository on your disk https://github.com/fivefilters/ftr-site-config. Then provide the path to offpunk:
From Vincent Jousse to ~lioploum/offpunk-devel
--- ansicat.py | 877 +++++++++++++++++++++---------------- cert_migration.py | 5 +- netcache.py | 646 ++++++++++++++++----------- netcache_migration.py | 7 +- offpunk.py | 18 +- offutils.py | 174 ++++---- opnk.py | 184 +++++--- pyproject.toml | 2 +- tests/geminiclient_test.py | 2 +- tutorial/make_website.py | 2 +- 10 files changed, 1120 insertions(+), 797 deletions(-) diff --git a/ansicat.py b/ansicat.py [message trimmed]
From Vincent Jousse to ~lioploum/offpunk-devel
`ruff` is now the de facto standard for code formatting in the Python world. Sending atomic patches to offpunk is pretty hard for me as I automatically apply `ruff` formatting to all the files and it creates unrelated diffs. This patch applies `ruff` formatting to all the files and should contain no regression. We may want at some point to enforce `ruff` formatting to avoid differences between contributors, but this is out of the scope of this patch. I will base my future work (especially the unmerdify integration) on this patch. Vincent Jousse (1):
From Vincent Jousse to ~lioploum/offpunk-devel
Hi, I’ll have a look, the changes are due to automatic linting by ruff, I’ll have to find a way to deactivate it for offpunk I guess ^^ I’ll keep you posted. On 1/27/25 16:09, Ploum wrote: > Hi Vincent, > > I’ve downloaded unmerdify and ftr-site-config. I’ve check your offpunk > branch but there are tons of changes which seem to not be related to > unmerdify at all. >
From Vincent Jousse to ~lioploum/offpunk-devel
Hi there, Following some recent discussions on the mailing list, I took the time to integrate `unmerdify` to offpunk. `unmerdify` https://codeberg.org/vjousse/unmerdify is a python lib using the rules from https://github.com/fivefilters/ftr-site-config to extract the content of a webpage (the rules are mainly used by wallabag at the moment https://github.com/wallabag/wallabag/ ). The idea is to use `unmerdify` if installed and if a rule for the current URL exists. It will fallback to the current behavior of using Readability if `unmerdify` can't find a rule for the current url.
From Vincent Jousse to ~lioploum/offpunk-devel
I was going through the code and I found some nits in the prompt code (using `.get` with a default value on dicts) and decided to take the occasion to setup some tests. I've updated the README accordingly (tests need `pytest` and `pytest-mock` to be installed). The `README.md` has been reformated using a markdown linter, I hope you don't mind. --- README.md | 92 +++++++++++++++++++++----------------- offpunk.py | 26 +++++------ requirements-dev.txt | 2 + [message trimmed]