How should addons store item-specific data?
Just tried to post this on the dev list as a reply toPossible read/unread solutionbut (as always) google deleted my post right away with two different accounts.So I post it here as a more general topic.
What is the best way for an addon to store item-specific data?This data should sync and some addon require that the user can see the information.Currently, I don' think there is a good solution.Here are some options
188BET靠谱吗1) Hijack a zotero field (e.g.google scholar citation)
+ syncs, visible to the user in item info and tree
- a hack, some citation styles show the extra field, only one addon can do it
2) Use attachment notes (not separate notes) for information (e.g.zotfile)
+ syncs, pretty much unlimited information, multiple addons could use it
- only works for attachments, visible but not accessible, also a hack
3) addon database (e.g.lyx)
+ clean, separately maintained database
- does not sync, information not visible to user
Other ideas?
The "Possible read/unread solution" thread on the dev list talks about hidden tagsas a possibility but I am not sure.Is the google scholar citations addon supposed to add tags like cite_3, cite_34 etc to items?How can the user see this information?When I define the zotfile tags '_tablet' and '_tablet_modified' as hidden, can the user still assign a color to them so that they are easily visible?What is about saved searches?
The good thing with the current '_tablet' tags is that they a) sync, b) can have colors so that the user can easily highlight the items, and c) can be part of saved searches.The bad thing is that the user can use the number shortcuts to add and remove the tags, which confuses zotfile.The google scholar citations addon has a different set of requirements (mainly that the information is visible to the user both as an optional column in the item tree and as a field in the item info).Could hidden tags solve all these problems?
But let's get back to the more general problem: I don't see a good way for addons to store item specific information that syncs and can be visible to users.I am using attachment notes for information that should not be visible to the user.The google scholar addon hijacks the extra field, which can be annoying because some citation styles add that information to the bibliography.A separate database is neither visible to the user nor syncs (at least I think so).So it doesn't work for zotfile and google scholar citations.Other solutions would be greatly appreciated.I thought about an additional database field that stores extension data as json such as {"zotfile":..., "gscholar": ...} but not sure whether that is a good solution.
What is the best way for an addon to store item-specific data?This data should sync and some addon require that the user can see the information.Currently, I don' think there is a good solution.Here are some options
188BET靠谱吗1) Hijack a zotero field (e.g.google scholar citation)
+ syncs, visible to the user in item info and tree
- a hack, some citation styles show the extra field, only one addon can do it
2) Use attachment notes (not separate notes) for information (e.g.zotfile)
+ syncs, pretty much unlimited information, multiple addons could use it
- only works for attachments, visible but not accessible, also a hack
3) addon database (e.g.lyx)
+ clean, separately maintained database
- does not sync, information not visible to user
Other ideas?
The "Possible read/unread solution" thread on the dev list talks about hidden tagsas a possibility but I am not sure.Is the google scholar citations addon supposed to add tags like cite_3, cite_34 etc to items?How can the user see this information?When I define the zotfile tags '_tablet' and '_tablet_modified' as hidden, can the user still assign a color to them so that they are easily visible?What is about saved searches?
The good thing with the current '_tablet' tags is that they a) sync, b) can have colors so that the user can easily highlight the items, and c) can be part of saved searches.The bad thing is that the user can use the number shortcuts to add and remove the tags, which confuses zotfile.The google scholar citations addon has a different set of requirements (mainly that the information is visible to the user both as an optional column in the item tree and as a field in the item info).Could hidden tags solve all these problems?
But let's get back to the more general problem: I don't see a good way for addons to store item specific information that syncs and can be visible to users.I am using attachment notes for information that should not be visible to the user.The google scholar addon hijacks the extra field, which can be annoying because some citation styles add that information to the bibliography.A separate database is neither visible to the user nor syncs (at least I think so).So it doesn't work for zotfile and google scholar citations.Other solutions would be greatly appreciated.I thought about an additional database field that stores extension data as json such as {"zotfile":..., "gscholar": ...} but not sure whether that is a good solution.
-
dstillmanedited May 1, 2014I allowed your new address, which hopefully Google will hate less.If there's anything from this message that you want, post it as a follow-up to that message, and I'll delete this thread.