mjpost / bibsearch

Download, manage, and search a BibTeX database.
Other
63 stars 5 forks source link

[POC] Support for macros #13

Closed davvil closed 6 years ago

davvil commented 6 years ago

Set as a PR instead of just pushing in order to think if we want to include this or not.

Implemented macros (can be displayed with bibsearch macros):

@acl:   booktitle: "Annual Meeting of the Association for Computational Linguistics"
@emnlp: booktitle: "Conference on Empirical Methods in Natural Language Processing"
@wmt:   booktitle: "Workshop on Statistical Machine Translation" OR booktitle: "Conference on Machine Translation"

@acl and @emnlp seem to be working fine. @wmt not so much because of the change in name, I still don't have the full hang of "complex" queries in FTS. Macros are supported in the where command, but the ones defined here won't work because of the the booktitle: specification.

If accepted, the macros will be read from ~/.bibsearch/macros, which will be initialized with some values given by us.

Advantage of including this: the whole ugly logic of detecting the "event" is gone.

davvil commented 6 years ago

bibsearch.py search vilar AND \( @wmt \) seems to work. But neither the AND nor the parenthesis cannot be included directly in the macro without having additional problems.

For the record: in the poll int the first CONFERENCE on machine translation, I voted for changing the acronym, even before knowing or thinking about bibsearch :-D

mjpost commented 6 years ago

This looks worth doing to me. I think we should try to get rid of the magic on the command line so that it doesn't require users to memorize special formats.