Skip to content
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

Enhancement: Use Zotero items relations (owl:sameAs, dc:replaces, but not dc:relation) to update archiveLocation/extra #26

Closed
bjohas opened this issue Feb 1, 2020 · 14 comments

Comments

@bjohas
Copy link
Collaborator

bjohas commented Feb 1, 2020

Zotero items have these relations:

       "relations": {
            "owl:sameAs": [
                "http://zotero.org/groups/2339240/items/2387P995",
                "http://zotero.org/groups/2339240/items/8RA9UD7W"
            ],
            "dc:replaces": "http://zotero.org/groups/2405685/items/BBQI3VSA",
            "dc:relation": "http://zotero.org/groups/2405685/items/RUSE8WYV"
        },

or (if several merges)

            "dc:replaces": [
                "http://zotero.org/groups/2405685/items/Z2N7IQ6J",
                "http://zotero.org/groups/2405685/items/L6CQTXAK"
            ]

dc:relation is set manually, however, the others are automatic: Some through merging ("dc:replaces"), some through moving to a different library (owl:sameAs).

@retorquere
Copy link
Collaborator

I don't yet understand how these relations would be used for this.

@bjohas
Copy link
Collaborator Author

bjohas commented Feb 18, 2020

The IDs mentioned in those relations ("dc:replaces" and "owl:sameAs", but not "dc:relation") should be written into the item in Extra:

EdTechHub.ItemAlsoKnownAs

(see #27)

@bjohas bjohas changed the title Enhancement: Use Zotero items relations (owl:sameAs, dc:replaces, but not dc:relation) to update archiveLocation Enhancement: Use Zotero items relations (owl:sameAs, dc:replaces, but not dc:relation) to update archiveLocation/extra Feb 22, 2020
@retorquere
Copy link
Collaborator

When should they be written there? And why? If Zotero administrates this already, why duplicate this information rather thanjust showing it?

@bjohas
Copy link
Collaborator Author

bjohas commented Feb 23, 2020

Whenever the plugin function that places IDs into "Extra EdTechHub.ItemAlsoKnownAs", those fields should be checked, and the IDs present be added to "Extra EdTechHub.ItemAlsoKnownAs".

Yes, Zotero administrates it, but e.g. some of the information is removed (e.g. when moving). We want to preserve a full trail of previous IDs, and make that visible to the user.

Does that explain?

@bjohas
Copy link
Collaborator Author

bjohas commented Feb 23, 2020

As I think I have provided the needed information, I'm removing the label. Feel free to re-add!

@retorquere
Copy link
Collaborator

But then I'd have to reconstruct what happened to the item somehow. There's no place to get both the ist and the soll for a save, except for merges.

@bjohas
Copy link
Collaborator Author

bjohas commented Feb 23, 2020

Hmmm. I'm not sure I follow. Are we talking cross purpose? :)

The json shown above is part of the item record, stored in Zotero. I assume that those fields ("dc:replaces" and "owl:sameAs") can be inspected by our plugin.

The proposal is this:

When I use the edtechhub-plugin right-click menu item "Add persistent id -> archiveLocation" (old) or "Add id to Extra" (new), then the plugin inspects "dc:replaces" and "owl:sameAs" (but not "dc:relation"). If there are IDs that currently aren't in

Extra: EdTechHub.ItemAlsoKnownAs

then they should be added (see #27).

I.e. whatever is in "dc:replaces" and "owl:sameAs" at that moment is added. Doesn't matter if that's changed in the past - we can only pick up whats there.

@retorquere
Copy link
Collaborator

So whenever an item changes, I should just write the values of "dc:replaces" and "owl:sameAs" into "alsoknownas"?

@bjohas
Copy link
Collaborator Author

bjohas commented Apr 14, 2020

It would be good to this

  • when I manually use "ETH save item id"
  • when items are merged.

The item merge is destructive, but I cannot see other operations that would be.

@edtechhub edtechhub deleted a comment from edtechbot May 25, 2020
@edtechbot
Copy link
Collaborator

🤖 this is your friendly neighborhood build bot announcing test build 0.0.23.228 ("also on merge")

Install in Zotero by downloading test build 0.0.23.228, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@bjohas
Copy link
Collaborator Author

bjohas commented May 25, 2020

For me, this isn't working yet.

Example

  1. I copy an item from one library to another.

This item now has

        "relations": {
            "owl:sameAs": "http://zotero.org/groups/2317526/items/AESRQWBS"
        },
  1. I right-click, and select "save item id"

Only

        "extra": "EdTechHub.ItemAlsoKnownAs: 2259720:FXTRYUVX",

appears - this is correct, but I was also expecting

2317526:AESRQWBS

Am I misunderstanding?

@bjohas
Copy link
Collaborator Author

bjohas commented May 25, 2020

Also, when two items are merged (with just this plugin installed), no 'item history' is produced. With 0.0.23.226, this worked fine. Maybe the attempt to do the present process during the merge interferes with the history writing?

@edtechbot
Copy link
Collaborator

🤖 this is your friendly neighborhood build bot announcing test build 0.0.23.230 ("merge can't access 'this'")

Install in Zotero by downloading test build 0.0.23.230, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@bjohas
Copy link
Collaborator Author

bjohas commented May 26, 2020

Thank you - this is working! Please release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants