chrisgrieser / alfred-bibtex-citation-picker

Citation picker & lightweight reference manager for BibTeX files, via Alfred.
MIT License
144 stars 8 forks source link

[Bug]: fail to copy bibliographic entry when pressing cmd+opt #21

Closed u2003 closed 1 year ago

u2003 commented 1 year ago

Bug Description

I did install pandoc on my mac, but every time I try ⌘⌥ + ↵, nothing is copied, and here is the debug info:

[18:04:23.639] Logging Started... [18:09:59.800] STDERR: Supercharged Citation Picker[Run Script] Error reading bibliography file /Users/yutang/Documents/Resources/Automation/Zotero/Library.bib: (line 902, column 7): unexpected '<'

I wonder what's wrong with my configuration, or whether that's a bug. I would highly highly appreciate it if you could please help me out!

Relevant Screenshot

No response

To Reproduce

just pressing cmd+opt and enter

Debugging Log

[18:09:59.800] STDERR: Supercharged Citation Picker[Run Script] Error reading bibliography file /Users/yutang/Documents/Resources/Automation/Zotero/Library.bib:
(line 902, column 7):
unexpected '<'
[18:25:25.194] STDERR: Supercharged Citation Picker[Script Filter] Starting Buffer Writing
Parser Import successful.
Literature Note Reading successful.
PDF Folder reading successful.
Bibtex Library Reading successful.
Buffer Creation successful.
Buffer Writing Duration: 75ms
[18:25:30.676] STDERR: Supercharged Citation Picker[Run Script] Error reading bibliography file /Users/yutang/Documents/Resources/Automation/Zotero/Library.bib:
(line 902, column 7):
unexpected '<'
[18:25:56.340] STDERR: Supercharged Citation Picker[Run Script] Error reading bibliography file /Users/yutang/Documents/Resources/Automation/Zotero/Library.bib:
(line 902, column 7):
unexpected '<'
[18:27:00.971] Logging Started...

Sample BibTeX Entries

@book{aronssonNationalMuseumsNationbuilding2014,
  title = {National {{Museums}} and {{Nation-building}} in {{Europe}} 1750-2010: {{Mobilization}} and Legitimacy, Continuity and Change},
  shorttitle = {National {{Museums}} and {{Nation-building}} in {{Europe}} 1750-2010},
  author = {Aronsson, Peter and Elgenius, Gabriella},
  year = {2014},
  month = dec,
  publisher = {{Routledge}},
  abstract = {Europe's national museums have since their creation been at the centre of on-going nation making processes. National museums negotiate conflicts and contradictions and entrain the community sufficiently to obtain the support of scientists and art connoisseurs, citizens and taxpayers, policy makers, domestic and foreign visitors alike. National Museums and Nation-building in Europe 1750-2010 assess the national museum as a manifestation of cultural and political desires, rather than that a straightforward representation of the historical facts of a nation.   National Museums and Nation-building in Europe 1750-2010 examines the degree to which national museums have created models and representations of nations, their past, present and future, and proceeds to assess the consequences of such attempts. Revealing how different types of nations and states \textendash{} former empires, monarchies, republics, pre-modern, modern or post-imperial entities \textendash{} deploy and prioritise different types of museums (based on art, archaeology, culture and ethnography) in their making, this book constitutes the first comprehensive and comparative perspective on national museums in Europe and their intricate relationship to the making of nations and states.},
  googlebooks = {o0q2BQAAQBAJ},
  isbn = {978-1-317-56915-2},
  langid = {english},
  keywords = {Social Science / Archaeology}
}

@article{assael2022,
  title = {Restoring and Attributing Ancient Texts Using Deep Neural Networks},
  author = {Assael, Yannis and Sommerschield, Thea and Shillingford, Brendan and Bordbar, Mahyar and Pavlopoulos, John and Chatzipanagiotou, Marita and Androutsopoulos, Ion and Prag, Jonathan and {de Freitas}, Nando},
  year = {2022},
  month = mar,
  journal = {Nature},
  volume = {603},
  number = {7900},
  pages = {280--283},
  issn = {0028-0836, 1476-4687},
  doi = {10.1038/s41586-022-04448-z},
  abstract = {Abstract                            Ancient history relies on disciplines such as epigraphy\textemdash the study of inscribed texts known as inscriptions\textemdash for evidence of the thought, language, society and history of past civilizations               1               . However, over the centuries, many inscriptions have been damaged to the point of illegibility, transported far from their original location and their date of writing is steeped in uncertainty. Here we present Ithaca, a deep neural network for the textual restoration, geographical attribution and chronological attribution of ancient Greek inscriptions. Ithaca is designed to assist and expand the historian's workflow. The architecture of Ithaca focuses on collaboration, decision support and interpretability. While Ithaca alone achieves 62\% accuracy when restoring damaged texts, the use of Ithaca by historians improved their accuracy from 25\% to 72\%, confirming the synergistic effect of this research tool. Ithaca can attribute inscriptions to their original location with an accuracy of 71\% and can date them to less than 30\,years of their ground-truth ranges, redating key texts of Classical Athens and contributing to topical debates in ancient history. This research shows how models such as Ithaca can unlock the cooperative potential between artificial intelligence and historians, transformationally impacting the way that we study and write about one of the most important periods in human history.},
  langid = {english},
  keywords = {_tablet},
  file = {/Users/yutang/Library/Mobile Documents/com~apple~CloudDocs/Documents/书籍/K-历史、地理/Assael et al_2022_Restoring and attributing ancient texts using deep neural networks.pdf}
}

@book{AtlanticLittleBrown,
  title = {Atlantic, {{Little}}, {{Brown Books}}},
  publisher = {{Little, Brown.}},
  googlebooks = {zvSXYgEACAAJ},
  langid = {english}
}

@misc{attributedtopolygnotos450,
  title = {Pelike (Jar) with {{Perseus}} Beheading the Sleeping {{Medusa}}},
  author = {{Attributed to Polygnotos}},
  year = {ca. 450-440 B.C.},
  abstract = {Subject: Athena Women Medusa Perseus Style: Classical},
  file = {/Users/yutang/Documents/Zotero/storage/7JSWDG35/Pelike (jar) with Perseus beheading the sleeping Medusa. Attributed to Polygnotos. Greek (Attic), Classical, red-figure, ca. 450–440 b.c. Terracotta, H. 18 ⅞ in. (47.8 cm), Diam. 13 ½ in. (34.3.png}
}

@book{babeu2011,
  title = {"{{Rome}} Wasn't Digitized in a Day": Building a Cyberinfrastructure for Digital Classicists},
  shorttitle = {"{{Rome}} Wasn't Digitized in a Day"},
  author = {Babeu, Alison},
  year = {2011},
  publisher = {{Council on Library and Information Resources}},
  address = {{Washington, DC}},
  abstract = {"The author provides a summative and recent overview of the use of digital technologies in classical studies, focusing on classical Greece, Rome, and the ancient Middle and Near East, and generally on the period up to about 600 AD. The report explores what projects exist and how they are used, examines the infrastructure that currently exists to support digital classics as a discipline, and investigates larger humanities cyberinfrastructure projects and existing tools or services that might be repurposed for the digital classics."--Landing page},
  isbn = {978-1-932326-38-3},
  langid = {english},
  keywords = {_tablet_modified},
  annotation = {OCLC: 748710625},
  file = {/Users/yutang/Library/Mobile Documents/com~apple~CloudDocs/Documents/书籍/K-历史、地理/Babeu_2011_Rome wasn't digitized in a day-Rome wasn't digitized in a day.pdf}
}

@article{badoud2018,
  title = {{La Victoire de Samothrace, d\'efaite de Philippe~V}},
  author = {Badoud, Nathan},
  year = {2018},
  journal = {Revue arch\'eologique},
  volume = {66},
  number = {2},
  pages = {279--306},
  publisher = {{Presses Universitaires de France}},
  address = {{Paris cedex 14}},
  issn = {0035-0737},
  doi = {10.3917/arch.182.0279},
  abstract = {Depuis sa d\'ecouverte en 1863, la Victoire de Samothrace a vu sa chronologie osciller entre 323 et 31~av.~J.-C., tandis que l'identit\'e de son commanditaire \'etait elle aussi d\'ebattue. L'analyse des donn\'ees arch\'eologiques et \'epigraphiques d\'emontre qu'il s'agit d'une d\'edicace rhodienne, sans doute \oe uvre du sculpteur Pythokritos, actif entre ca 210 et ca 165 av. J.-C. La prise en compte du contexte historique et topographique conduit \`a penser que le monument a \'et\'e \'elev\'e en 197 av. J.-C., au terme de la deuxi\`eme guerre de Mac\'edoine, pour comm\'emorer la d\'efaite de Philippe~V \`a la bataille de Chios, quatre ans plus t\^ot. La statue n'entretient pas de rapport \'etroit avec la frise ext\'erieure du Grand Autel de Pergame. Le navire qui en forme le pi\'edestal n'est ni une trih\'emiolie ni une t\'etr\`ere, mais une pent\`ere~; la d\'eesse ne s'y pose pas, mais en d\'ecolle apr\`es son \'epiphanie.},
  langid = {french},
  keywords = {Bataille de Chios,Battle of Chios,Philip V of Macedon,Philippe V de Macédoine,Pythokritos,Rhodes,Victoire de Samothrace,Winged Victory of Samothrace},
  file = {/Users/yutang/Documents/书籍/K-历史、地理/Badoud_2018_La Victoire de Samothrace, défaite de Philippe V.pdf}
}

@book{bailin2003,
  title = {安藤忠雄论建筑},
  translator = {白林},
  year = {2003},
  month = jan,
  publisher = {{{$<$}a href="https://book.douban.com/press/2281"{$>$}中国建筑工业出版社{$<$}/a{$>$}    {$<$}br{$>$}                                                   译者:                        {$<$}a class="" href="/search/\%E7\%99\%BD\%E6\%9E\%97"{$>$}白林{$<$}/a{$>$}    }},
  isbn = {978-7-112-05370-4},
  keywords = {/unread}
}

@book{baogangshengZhengZhiXueTongShi2015a,
  title = {政治学通识},
  author = {{包刚升}},
  year = {2015},
  month = nov,
  publisher = {{北京大学出版社}},
  abstract = {本书是作者在复旦大学政治学课程讲义的基础上修改润色而成的。本书力求成为一部通俗易懂、深入浅出的政治学普及入门读物。这部书正是为那些对政治和公共事务感兴趣的读者朋友们而写的。通过本书,作者希望能够帮助读者加深对中国政治与世界政治的认知,帮助读者理解政治学领域的重大议题、主要理论与基本方法,帮助读者养成健全与系统的政治思考能力。},
  isbn = {978-7-301-26352-5},
  annotation = {9.2/4914}
}

Buffer Files

archive.zip

Workflow Configuration

CleanShot_2023-01-18_18 17 33@2x

Checklist

chrisgrieser commented 1 year ago

I just tried your sample bibtex entry, and it works fine for me. it looks like it's not an issue with your config, but rather with your BibTeX file:

[18:09:59.800] STDERR: Supercharged Citation Picker[Run Script] Error reading bibliography file /Users/yutang/Documents/Resources/Automation/Zotero/Library.bib: (line 902, column 7): unexpected '<'

could you copypaste the entry in your .bib file that occurs around line 902? that one should be the issue.

u2003 commented 1 year ago

Thank you for the early reply! Here is the entry:

@book{<>zhongwenbanbianjibu2008, title = {塞西尔.巴尔蒙德}, author = {《建筑与都市》中文版编辑部}, year = {2008}, month = jan, publisher = {{{$<$}a href="https://book.douban.com/press/2311"{$>$}中国电力出版社{$<$}/a{$>$} {$<$}br{$>$} 副标题: 《建筑与都市》中文版发行三周年纪念特别专辑}}, abstract = {这本专集集中了塞西尔{$\cdot$}巴尔蒙德的作品和思想。塞西尔{$\cdot$}巴尔蒙德,一位世界声誉卓著的设计师、结构工程师、作家,同时身兼奥雅那工程顾问有限公司的副总裁。他用数字、音乐、数学作为重要线索重新定义了形式的源起。迄今为止,他与世界最为著名的建筑师们成功创作了许多标志性建筑及设计。最近的项目包括有,与瑞姆{$\cdot$}库哈斯合作设计的位于北京的CCTV新楼及位于葡萄牙的波尔图音乐厅以,与丹尼尔{$\cdot$}李伯斯金合作的世界贸易中心等。他还曾经在美国哈佛大学建筑研究生院、耶鲁大学建筑学院、宾西法尼亚大学等众多的大学建筑学院中任教或进行讲演,发展了形式生成的基本教义。书中大量的专门论述集中展示了塞西尔{$\cdot$}巴尔蒙德和奥雅那高级几何部门创作的业已建成的或正在进行中的作品以及迷人的创作过程。, Cecil Balmond is an internationally renowned structur..., (展开全部)}, isbn = {978-7-5083-6186-4}, keywords = {/unread} }

chrisgrieser commented 1 year ago

@book{<>zhongwenbanbianjibu2008,

yeah, that is the issue, <> are not valid characters for a citekey, which is why pandoc complains. Remove the <> and it should work