I have been thinking about managing my Offpunk list files that I might be modifying on either, or both, my netbook and some main laptop. Since this is mostly about new parts that might have gotten added, I didn’t want to introduce some full-blown version control to this. Instead, I figured that I could start ensuring the files end with a time-specific marker when was the file last appended before sync that would also be useful to the humanβ¦
Tag: offpunk
Subscription into list rather than tour β Offpunk draft feature patch
Offpunk has a feature where any updated links from a subscribed list will be added to tour on sync. I expanded on that feature by making it possible to parameterize #subscribe with a list name like #subscribe(some_list_name) to the result of the links getting added to that list, with just the one link to that list getting added to tour.
Read More “Subscription into list rather than tour β Offpunk draft feature patch” »
Slash-hierarchical list names β my draft implementation for Offpunk
More draft patches for Offpunk from me that I haven’t particularly tested much yet.
Offpunk has no support for slash-containing list names β it just crashes on an attempt, because the names are neither supported by creating directories nor sanitized to not contain slashes. I wrote a patch for that. And another to make the all lists view, and other logic involving iterating through all lists like subscriptions and syncs, traverse them all, flatly for now.
Read More “Slash-hierarchical list names β my draft implementation for Offpunk” »
Bugfix for list URI for my Offpunk redirections implementation draft
On top of Amending my Offpunk redirection implementation, I have now fixed the issue where list:/// would get turned into list:/ URIs when there would be a redirection rule for just a wildcard netloc, such as one that for any URL purges the utm_source tracking query parameter. That was resulting in user’s inability to list any list.
I have introduced an exception that requires redirections to be explicitly applicable only to list: URIs in case of list URIs.
Read More “Bugfix for list URI for my Offpunk redirections implementation draft” »
Amending my Offpunk redirection implementation
As it turned out the next afternoon, my code was buggy.
This is a sequel to the post Experimentally expanding Offpunk browser Part 1 (nightly) from yesterday.
The blocked domains were saving as redirection with destination URL interpreted as //BLOCK/, deleting redirections was broken because of the same CLI parsing issue, and it was still only possible to have one rule for one domain glob, no matter how specific through the criterions.
The only reason why -silent was working for them was because of this.
I am now hashing the entire criterion into the dict, and for that I had to add frozendict dependency to the project because good to write words sometimes, because I just turned that into a tuple.
More bugs found: especially that I didn’t really apply the specificity of the rules to BLOCK rules, and they were always acting on the netloc regardless. Now lemme just drop you the patches right below. First is a tiny patch for more predictable behavior of fragment templating, then the big one.
Update: I posted another bugfix post to this draft implementation of mine, see Bugfix for list URI for my Offpunk redirections implementation draft
Note: this post publishes the patches, but doesn’t diff any code nicely. These patch files are not exactly made for directly reading except for the commit message of the longer one, which I will maybe paste here too:
Read More “Amending my Offpunk redirection implementation” »
Experimentally expanding Offpunk browser Part 1 (nightly)
https://offpunk.net β that’s the original project that this might get upstreamed to in some parts
Note: since publication I have found numerous bugs in my implementation. Rewrites upcoming. I just can’t work silently without at least a blog post every day.
Update: now please apply the subsequent patches before trying out anything. The code here below was bad.
Here is the new post: Amending my Offpunk redirection implementation
What does my large patch bring? (a post-publish added summary)
So far, Offpunk only allows you to redirect from one netloc (usually host or host:port) to another. At that, it won’t match if the origin netloc had an explicit port number specified. I wanted a redirections engine that would allow me to redirect to a different port, on a different host, under a path and with some suffix β like .json.
I also wanted to eliminate the hardcoded redirects and domain blocks and put them into a user’s rc file. But that required adding them to user’s rc. I didn’t want to alter a user’s existing offpunkrc, so I came up with the idea to create a pre-rc for the user (later, only such that would already have their rc, as new users can just get the actual rc pre-filled and only get a pre-rc created if new defaults come from upstream).
Read More “Experimentally expanding Offpunk browser Part 1 (nightly)” »