-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple URLs per bookmark / Alternative URLs for bookmarks #720
Comments
Buku uses SQLite database (and therefore a fixed set of columns for storing data), with uniqueness constraint on the …I had some thoughts to implement support for “extending” records by adding customizable extra fields, but those would be stored in a separate table (likely requiring another table for schemas) and I can't promise they'll be quite as easily accessible as the regular (“static“) fields (meaning, no guarantees that these fields would be searchable or that such a search would be performant). Though at the level of printing out existing records, it should still be possible 🤔 For the time being, for personal use, your hacky workaround should work just fine I'd say. Though it's certainly more convenient to place it into a script within |
in such occations, I set the same tags.
You can assign a table for URL which would be connected to a given ID of the entries tables. Then again, the representation of an entry is URL, so doing this might puzzle people when they would want to understand the buku database, and then again this can be covered in buku documentation. In one of my syndication projects I assign a table for links @piegamesde if your proposal is implemented, then what data would be the unique data for an entry? The only unique data that I think of would be the entry ID which is set by buku. In XMPP, there is XEP-0209: Metacontacts which regards to a case which an XMPP contacts might have an Email, IRC, TEL (whoever still uses telephony), and even XMPP (in case a contact holds more XMPP accounts) as additional contact information. So we might learn of a fashion of doing this by looking into XEP-0209. |
@sjehuda As I said, the URL is the only reliable identifier of a record here. The "ID" is nothing more than an incidental ordering index (which is not an essential part of the data and can change at any time). For all intents and purposes, URL is the identifier of a record here. |
I agree. |
After learning how the database works, I'd propose keeping one URL as primary key and the others separately as "mirrors". |
We might want to imitate The "rel" Attribute of The Atom Syndication Format.
|
Sometimes an internet resource is not unique and may be accessed through different ways. Especially decentralized things tend to have multiple mirrors or entry points. This could also be used to provide links to archived versions of web pages.
I know I could always put the links into the free-form description field*, but I'd like to explore whether more structured approaches with this feature as a first-class citizen would be possible.
One question that would need to be decided in that context is whether the other URLs should be of same importance or instead having one "primary" URL with "mirrors". This decision probably also depends on the details of the database format and backwards compatibility considerations.
* hacky implementation:
buku --nostdin --print --json | jq --raw-output '.[] | [ .uri, (.description | split("\r\n") | .[] | scan("^mirror: (.*)$")) ] | flatten | .[]'
This will print you all normal URIs plus any description lines starting with "mirror: ".The text was updated successfully, but these errors were encountered: