Hello,

Drupal newbie here. I wrote a quick plugin for BibTeX format. It was pretty much based on the JSON code.

Here is my content type setup:
- Author field: text - textfield - unlimited values (for multiple authors) - views custom label: author
- Entry type field: text - textfield (a field to indicate the BibTeX entry type, i.e: book, article, etc)
- Year field: text - textfield - views custom label: year

Some limitation compared to other formats: field output is always 'normal'; there's only one theme "simple"

Please help review it if you have time. Hopefully it will be helpful for some :)
Cheers.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Renee S’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Renee S’s picture

Status: Needs review » Reviewed & tested by the community

These work for me!

yannickoo’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs work

Thanks so much for this patch! If you are new to Drupal check out the Drupal coding standards. There are missing spaces after if and foreach etc.

  1. +++ b/views_bibtex.module
    @@ -0,0 +1,337 @@
    +    'api' => '2.0',
    

    Why did you use the 2.0 as API version and not 3.0?

  2. +++ b/views_bibtex.module
    @@ -0,0 +1,337 @@
    +    // Build a pseudo-node from the retrieved values.
    

    This will only works for nodes? Maybe we should move with the times and support every entity type here.

  3. +++ b/views_bibtex.module
    @@ -0,0 +1,337 @@
    +        $object->class = drupal_clean_css_identifier(strtolower($id));//views_css_safe($id);
    

    We can remove the comment here.

anthonylindsay’s picture

Hi BPM, I installed the patch and output a BibTex feed to see. Comparing it visually with some examples http://www.xandi.eu/bib2x/files/example.bib it looks like it does the job, but the entry type label does not appear to be printed.