wshanks / Zutilo

Zotero plugin providing some additional editing features
Other
1.53k stars 72 forks source link

Zutilo feature request: Actions in context of autocreated 'Amazon.com Link' objects #21

Closed acsr closed 10 years ago

acsr commented 10 years ago

When you visit a book on Amazon or other sites with proper dublin.core metadata markup, you can e.g. auto create Zotero entries of the matching type "book", by clicking the "book" icon in the address bar of Chrome and Firefox. On Amazon.com, inside of a book entry a sub entry object is created with the stereotypic name 'Amazon.com Link'.

Feature for Zutilo:

add menu commands/actions in context of the 'Amazon.com Link' or parent to:

(the menu reading is in the quotes after the -> symbol)

wshanks commented 10 years ago

Okay, I will look into these features. Do you think all of them are necessary or just one of them (prioritized in the order you gave)?

The issues you have with the way Zotero imports Amazon items seem to all be related to the way the Amazon translator works. Would a better solution be to create a modified translator for Amazon? It might also be worth asking the creator or maintainer of the translator about its current functionality. It might be possible to get the Zotero Amazon translator modified.

wshanks commented 10 years ago

After thinking about this more, I think stripping the session data should probably be done in Amazon.com translator.

I could see justifications for the following functions related to URI attachments:

What do you think the workflow would be though? For the first two on the list, an "Edit attachment path" function could be sufficient. It would open a dialog with an editable textbox pre-populated with the attachment path and the user could edit it and hit OK to change the path. If the user just wanted to copy the path, he/she could just use CTRL_C with the textbox content highlighted. The final function could be performed by copying the URI as just described and then pasting it in by hand. Do you think it would be useful enough to have its own function?

adam3smith commented 10 years ago

I think we'd be OK stripping the session info in the amazon translator, I don't see a downside to that - @aurimasv - you agree? We won't be moving the URL to the URL field, though, which, since it routinely shows up in citations, should only contain links to full-texts (but if I understand the OP, that's a request for a Zutilo function anyway).

aurimasv commented 10 years ago

I think we'd be OK stripping the session info in the amazon translator, I don't see a downside to that - @aurimasv - you agree?

Yes, we should store minimal URLs where possible

adam3smith commented 10 years ago

we'd happily accept a patch to that extent.

wshanks commented 10 years ago

Thanks for the input, guys.

@acsr - Can you handle modifying the Amazon translator? I think https://github.com/zotero/translators/blob/master/Amazon.com.js#L91 just needs to be changed to check if doc.location.href ends with something starting with /ref= and if so to strip off that part to the end of the URL, but you might be more familiar with Amazon than me (and probably more familiar with parsing URL's in general).

acsr commented 10 years ago

Thanks for the feedback, we are not alone ;-) !

@willsALMANJ - Grinding this down to the Amazon translator was an absolute correct and cool adjustment. But I am sorry, before I fix this, I should fix the german translation for Zutilo ...

@adam3smith: - I fully agree that for scientific research secondary source Amazon links are not a helpful solution.

ToDo

Background

My personal approach is more aiming at citation for project communication than for puristic scientific use. I use Zotero for this heavily. So now I need to write a custom citation style.

wshanks commented 10 years ago

Can anyone provide here for completeness the URL were the Amazon Translator lives in a repo?

I provided the link to the Amazon translator in its repo in my previous comment:

https://github.com/zotero/translators/blob/master/Amazon.com.js

I think line 91 is the relevant one for sanitizing the Amazon Link URL.

Change to wontfix and open a new one just focusing "Zutilo features for advanced edit of attachments links".

I marked this issue as wontfix. Do you want to open a new issue on editing attachment links? I suggested some options for new functions above, but I don't want to implement features that don't have a use case. I think a function that lets you edit attachment links would be useful. I think maybe everything else you wanted to do could be done by modifying the Amazon translator and your citation style, but I'm not sure.

acsr commented 10 years ago

sorry for overseeing your link.

I fully agree with setting to wontfix. I am comfortable with first adressing the translator and the citation style.

THX for your responses.

adam3smith commented 10 years ago

Armin - just so you're aware - not sure if you are - you can't actually use attached links in citation styles, only the URL field, so you'd still have to move that to the URL field (either manually or in a customized version of the amazon translator) if you want to include amazon links.