Closed bjohas closed 5 years ago
It does have access to the username, but I thought you wanted this as a change on zotfile?
No - it's not related to ZotFile. I'll add to the project kanban regarding the zotfile change (whcih I think is no longer needed, as I'll explain). Link to card with explanation here: https://github.com/retorquere/zotero-edtechhub/projects/1#card-24470472
I have a slightly amended request.
somestring.pdf
should change to
somestring-bjohas-20190721-{ID}.pdf
where {ID} is the first part of archiveLocation. I.e. if archiveLocation is A;B;C;D, then {ID}=sanitised(A), where 'sanitised' replaces '/' and ':' (and other characters that should not be in filenames) with '_'. So e.g. if
archiveLocation = 10/d254jm;2339240:NDCLGGGP
then the file becomes
somestring-bjohas-20190721-10_d254jm.pdf
If archiveLocation is empty, then could there let's just use
somestring-bjohas-20190721-__NO_AL__.pdf
(If it's easy to do a popup, then there could be a warning too, but that's really not necessary if it counts as UI.)
(I've also omitted 'copy' as it's pretty clear that we're dealing with a copy)
Rationale: This creates a copy, that can be used as a copy, but also bakes in the archiveLocation. THis means the PDF can now be used outside Zotero (e.g. in analysis software) without losing the reference to Zotero.
:robot: this is your friendly neighborhood build bot announcing test build 0.0.13.46 ("fixes #10")
Install in Zotero by downloading test build 0.0.13.46, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
this currently only works for linked and imported files. Snapshots (imported URLs) are considerably more work and don't fit the use-case anyhow it seems to me.
Totally fine - our use-case is just to duplicate imported files. Linked files are great too. Snapshots not necessary.
Have tested - works well!
10/d254jm becomes 10d254jm but should become 10_d254jm.
Should I remove linked?
You mean remove linked files? No, I can see that being useful to people. So if it's working, then leave it in!
:robot: this is your friendly neighborhood build bot announcing test build 0.0.13.47 ("fixes #10")
Install in Zotero by downloading test build 0.0.13.47, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
10/d254jm becomes 10d254jm but should become 10_d254jm.
This should be fixed in .47
Many thanks! I cannot see the option to duplicate the attachment any more. Why might that be?
Hold on - it seems to work on some files, but not all... Hmm...
Can I add you to a library to illustrate the problem?
Can you request access to this library via Zotero? https://www.zotero.org/groups/2339240/edtechhub
How large is this library?
:robot: this is your friendly neighborhood build bot announcing test build 0.0.13.48 ("logging for file dup")
Install in Zotero by downloading test build 0.0.13.48, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
Can you
Help
- Debug Output Logging
- Restart with Logging Enabled...
Help
- Send EdTech hub debug log
OK, let me do that!
In this output, the first right click was not successful Ii.e. didn't give the option to duplicate). The 2nd right click (on another item) was successfu. (i.e. it did give the option to duplicate). As far as I can tell, both items are 'similar' - same type, one PDF attachment (not a link)...
Of the first, it says it's an imported URL (which I though was a website snapshot), which is why it's not enabled.
You don't have to manually attach the logfile BTW. Step 5/6 will give me the logfile automatically.
They are both PDFs - they come up with the PDF logo, and I've check the file system location too.
If you select Show file
from the popup menu for the first one, do you see a single PDF?
Yes ... and if I copy the PDF e.g. to Downloads, and re-import, a new item is created. On that item, the 'duplicate' function works.
I'm not surprised by that. I'm surprised the original shows as imported URL. I'll ask on zotero-dev.
:robot: this is your friendly neighborhood build bot announcing test build 0.0.13.50 ("import URL can also be PDF")
Install in Zotero by downloading test build 0.0.13.50, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
Thank you! This works now also on the items that didn't work before.
Does that mean this issue is done, or do we need to wait for zotero-dev?
Would it be worth releasing 0.0.14 ?
Done. I already got confirmation from zotero-dev.
Thanks!
https://github.com/zotero/zotero/issues/1626
A string would need to be added to the duplicate: "-copy-"+date", e.g. "-copy-20190721" before the ".pdf" (or whatever type the attachment is) to indicate that it's a newer version. I.e.
somestring.pdf
if copied today would change to
somestring-copy-20190721.pdf
I don't know whether the plugin has got access to the user name? In that case it would be even better if the string was "-copy-"+user+date, i.e.
somestring-copy-bjohas-20190721.pdf