-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Internal url handler for referencing other entries #5369
Comments
Good suggestion, I suggest an enhancement: So this will be (taking the first example above):
|
Yea ok that seems reasonable, I will change it in the examples |
We should make it application agnostic in case others want to implement it. Recommend something like |
If others want to implement it I would say that the sceme should just be I was thinking of using the tld as the type of identifier used and the sld as the type of entity referenced. <a href="keepass://group.path/root/accounts/">Opens the "accounts" group by path</a>
<a href="keepass://entry.uuid/21ea1457b4ec418496d1811b0a9b67cb/">Opens the "github" entry by uuid</a> As soon as there is agreement on this I will rewrite the main comment and work out a full specification. |
Using the tld is clever, go ahead and write up the final proposal. |
Alright here it is keepass-url-spec.md. I'm happy to take any feedback because this is really the first time I've written something comparable |
Hmmmmm, couple points, then I will show some changes through examples.
<a href="keepass://group.path/accounts/">Show the "accounts" group</a>
<a href="keepass://entry.path/accounts/github/">Focuses on the entry in it's parent group</a>
<a href="keepass://entry.path/accounts/github?edit">Opens the main edit widget of "github"</a>
<a href="keepass://entry.uuid/21ea1457b4ec418496d1811b0a9b67cb?edit">Opens the main edit widget of "github"</a>
<a href="keepass://entry.path/accounts/github?edit#advanced">Opens the advanced edit widget of "github"</a>
<a href="keepass://entry.path/accounts/github?edit#history">Opens the history edit widget of "github"</a>
<a href="keepass://entry.path/accounts/github?attribute=backup%20codes">
Opens the advanced edit widget of "github" and selects the "backup codes" attribute</a>
<a href="keepass://backup%[email protected]/accounts/github">
Opens the advanced edit widget of "github" and selects the "backup codes" attribute</a>
<a href="keepass://entry.path/accounts/github/?attribute=Notes&line=2">Select line 2 of "github" notes</a>
<a href="keepass://entry.uuid/21ea1457b4ec418496d1811b0a9b67cb?customdata=_LAST_MODIFIED">
Hightlights the "_LAST_MODIFIED" key value pair in the plugin data widget</a>
<a href="keepass://db.uuid/34eb1447b7ec218446d1451b0c9b49a1?entry=21ea1457b4ec418496d1811b0a9b67cb&attribute=Password">
Go to open database with uuid 34eb1447b7ec218446d1451b0c9b49a1 open the entry with
uuid 21ea1457b4ec418496d1811b0a9b67cb and highlight it's password</a> I would love this syntax to replace/augment the I am in favor of supporting a scheme like |
I actually didn't know that you can't name an additional attribute "Title", "Password" and so on, so a distinguishment between
I opted for choosing the third level domain to specify the attributeType because a user might have an attachment called "Notes", which then would make the attribute "Notes" inaccessible. Same goes with custom / plugin data. I like the Another thing I am not completely sure about is Suppporting |
Attributes are all the same. There are a few reserved names. You can see them in EntryAttributes.h |
alright I see |
I realize you are comparing attachments and attributes. Those are two completely different aspects of an entry. To reference an attachment by name I would craft this url:
I modified my examples above to actually use the query string as intended. |
So what I'm still wondering about is the syntax for history items. In my scheme I used the part before the @ (which is now used for attributes) to reference them by timestamp. Should this not be implemented at all or should I use some other url segment for it? Additionally, the db entity type still causes some headache for me, as this url doesn't specify the referenceType of the entry. The following would be my approach <a href="keepass://[email protected]/34eb1447b7ec218446d1451b0c9b49a1/?entry.uuid=21ea1457b4ec418496d1811b0a9b67cb">
Go to open database with uuid 34eb1447b7ec218446d1451b0c9b49a1 open the entry with
uuid 21ea1457b4ec418496d1811b0a9b67cb and highlight it's password
</a>
<a href="keepass://[email protected]/34eb1447b7ec218446d1451b0c9b49a1/?entry.path=/accounts/github/">
Go to open database with uuid 34eb1447b7ec218446d1451b0c9b49a1 open the entry with the path /accounts/github/ and highlight it's password
</a>
<a href="dbref://db.uuid/34eb1447b7ec218446d1451b0c9b49a1/?entry.path=/accounts/github/&attribute=Password">
Go to open database with uuid 34eb1447b7ec218446d1451b0c9b49a1 open the entry with the path /accounts/github/ and highlight it's password
</a>
<a href="dbref://db.uuid/34eb1447b7ec218446d1451b0c9b49a1/?entry.path=/accounts/github/&attachment=notes.txt">
Go to open database with uuid 34eb1447b7ec218446d1451b0c9b49a1 open the entry with the path /accounts/github/ and highlight a file named "Notes.txt"
</a> |
History of entries should be referenced through the query string: I like the entry.uuid and entry.path query selectors for the db entity, keeps it consistant. |
alright that sounds good. I will update my specification as soon as possible. |
After a lot of thinking I came up with a overhaul of the specification. I think it all comes togeher quite nicely now. However I changed some syntax for edge cases. Notably, that widget referencing doesn't require https://gist.github.com/networkException/b1ccad6f338fe086db6f38031fb431a8 Please tell me if I forgot to add something, I haven't done everything on one go. |
The action of We would also want to include actions for |
So |
Not a read only version, just select it in the entry view. The edit action opens the entry edit widget and the anchor points to the tab to show (if included) |
Ok so the syntax you proposed looked like this:
Now what I suggested:
As it gives use to the fragment without breaking consistency and creating an unnessearry edge case. The fragment is not related to the query string at it doesn't make sense to store a value of a key in the query string in the fragment. A completely different idea would be to drop the usage of the fragment and just use the query string:
The more I think about it I actually like it more. It still provides a descriptive key |
I like that better too, the dropping of fragments |
Alright that should be changed now. I'm quite happy with the consistency of the new edit syntax. |
I really just wish we could use the simple, already implemented references for this
with some basic html attributes to do stuff, rather than weird, long url schemas: Some examples:
Would also love to display information from other entries (or the same entry) simply by referencing it.
Which would be displayed as
As well as special reference syntax for our own attributes
We should use UUIDs as they are more stable than paths if we move entries around, and it seems much simpler/easier. Attributes also allow more features to be added and chained together, which is generally horrible with GET parameters. I guess your method is technically more HTML compliant, though. |
Summary
Add a url sceme for referencing other entries.
This request would make use future html support with the anchor tag.
Examples
For this example I'm using a simple database structure:
The entry "github" is nested inside the group "accounts", which itself is nested inside "root".
In the advanced edit widget there is an additional attribute called "backup codes".
I'm open for more suggestments / adjustments to the sceme
Context
This feature could allow users to further organize their database.
For example someone might have one entry for payments, but they for example still want a reference
for all payments made on github in their github account entry.
The text was updated successfully, but these errors were encountered: