zotero-better-bibtex icon indicating copy to clipboard operation
zotero-better-bibtex copied to clipboard

Req: shortened citekeys through a look-up table

Open glocalglocal opened this issue 2 years ago • 10 comments

Log ID: 8VKUX4NC-euc

Revisiting an earlier idea.

When the author is an organisation, BBT correctly produces citekeys like these: britishbroadcastingcorporationBBCHandbook19751976 departmentfordigitalculturemediaandsportConsultationRenewalDigital2021

The names of organisations are supposed to appear in full in Zotero and in references, but it would be more practical if citekeys looked like these: bbcBBCHandbook19751976 dcmsConsultationRenewalDigital2021

I suppose one way to achieve that is adding a user-defined translation table, (re)generating citekeys, and possibly pinning the affected citekeys. The translation table would replace, say, all instances of departmentfordigitalculturemediaandsport with dcms.

This may be done with any user selected string, anywhere in the citekey (not just organisations or authors).

glocalglocal avatar May 06 '22 20:05 glocalglocal

I think I can reactivate #2081 when I get back home, sounds like that does what you want.

retorquere avatar May 06 '22 20:05 retorquere

The CSV mapping you are describing there would do the job. Ideally, the functionality would be eventually incorporated into the Zotero Preferences dialogue, but I am not sure how many people would actually use the feature. IMV it is an obvious and significant addition. At least the file could be linked to from Preferences. I am using .2554 at the moment.

glocalglocal avatar May 06 '22 21:05 glocalglocal

I'm not keen on UI work, and I don't think the zotero UI framework has an editable grid, so I'd have to create it from scratch.

retorquere avatar May 06 '22 21:05 retorquere

I was thinking of something like your '@string definitions' tab with entries like:

British Broadcasting Corporation; bbc
United Nations; un

But a clickable relative path to the csv file will also be fine.

glocalglocal avatar May 06 '22 21:05 glocalglocal

Oh I suppose that's doable. I could make it so that you could copy-paste from a spreadsheet for easier bulk editing.

retorquere avatar May 06 '22 21:05 retorquere

Not sure why 'awaiting-user-feedback' was added.

glocalglocal avatar Jun 07 '22 19:06 glocalglocal

I should have removed it. It is always automatically added after I comment, and removed if someone else comments.

retorquere avatar Jun 07 '22 19:06 retorquere

Newlines can't be pasted into the hidden prefs. I'll have to think of another way

retorquere avatar Jun 17 '22 20:06 retorquere

I am guessing the hidden prefs don't take strings that are long enough to accommodate many comma separated pairs in one line. It's not elegant, but how about using a dummy bibliography entry to store this and other data for the plugin? It's a bit hacky and the users will have to make sure they don't delete the dummy source, but there are advantages (eg these preferences will automatically synchronise across installations with the sources). But there may be better ways to do this.

glocalglocal avatar Jun 18 '22 12:06 glocalglocal

It's not the length, the hidden prefs editor eats newlines.

I'll think about using a zotero item.

retorquere avatar Jun 18 '22 12:06 retorquere