Git Product home page Git Product logo

bib-publication-list's People

Contributors

blankenberg avatar kynan avatar vkaravir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bib-publication-list's Issues

New browser tab for links and spacing adjustment between search input

#19

Normally as a user while looking at your research contribution, I would like to open number of research artifacts at the same time and would not want to loose the context of the index page where the contributions are listed. Hence, it is better to open up a new browser tab for each research artifact.

The search input seemed a bit messy, I think equal spacing from bottom and top would make it more neater visually.

Output style

How would I go about modifying the output format? E.g. if I want authors to be shown as last name, first initial.

File Path leads to a 'Syntax error, unrecognized expression: output/bib/resources.bib'

I would change it to something like:

return function(bibSrc, bibElemId, opts) {
...
        var $bibSrc = null;
        if(bibSrc.indexOf('/') === -1) {
            $bibSrc = $(bibSrc);
        }

        if ($bibSrc && $bibSrc.length) { // we found an element, use its HTML as bibtex
            new Bib2HTML($bibSrc.html(), $pubTable, options);
            $bibSrc.hide();
        } else { // otherwise we assume it is a URL
            var callbackHandler = function(data) {
                new Bib2HTML(data, $pubTable, options);
            };
            $.get(bibSrc, callbackHandler, "text");
        }

Citation and legend display

As promised, here are the code snippets for the citations that I recreated. They most closely resemble IEEE format citations (where we publish most of our results). There is some error handling integrated (e.g. if you leave out certain common fields like page numbers) but I only suited the error handling to our needs and not for every possible case.

I'll paste the code here since I'm not sure what else to do with it. We'll see how gitHub handles to formatting...

    inproceedings: function(entryData) {
        var year;
        if(entryData.year=='T.A.'){year="To appear";}
        else{year=entryData.year;}
        return this.authors2html(entryData.author)+", \""+entryData.title+",\" In <em>" +
            entryData.booktitle + "<\/em>, " + year + ((entryData.address)?", " +
            entryData.address+"":"") + ((entryData.pages)?", pp. " + entryData.pages+"":"") + "." ;
    },
            article: function(entryData) {
        var year;
        if(entryData.year=='T.A.'){year="To appear";}
        else{year=entryData.year;}
        return this.authors2html(entryData.author) + ", \"" + entryData.title + ",\" <em>" +
            entryData.journal+"<\/em>" + ((entryData.volume)?", Vol. " + entryData.volume+"":"") +
            ((entryData.number)?"("+entryData.number+")":"") + ((entryData.pages)?", pp. " +
            entryData.pages+"":"") + ((entryData.address)?", " + entryData.address + " ":"") + ", "+year+".";
    },
    book: function(entryData) {
        var year;
        if(entryData.year=='T.A.'){year="To appear";}
        return this.authors2html(entryData.author) + ", <em>" + entryData.title + "<\/em>, " +
            entryData.publisher + ", " + year + ((entryData.issn)?", ISBN: " + entryData.issn + ".":".");
    },
    inbook: function(entryData) {
        return this.authors2html(entryData.author) + ", \"" + entryData.chapter +
            "\" in <em>" + entryData.title + "<\/em>, " +
            ((entryData.editor)?"Edited by " + entryData.editor + ", ":"") +
            entryData.publisher + ", pp. " + entryData.pages + ", " +
            ((entryData.series)?"<em>" + entryData.series + "<\/em>, ":"") +
            ((entryData.volume)?"Vol. " + entryData.volume + ", ":"") +
            entryData.year + ((entryData.issn)?", ISBN: " + entryData.issn + ".":".");
    },

I also changed the stats2html function a little bit which prints the legend. I had some css conflicts with other style tags in my site so I just coded the raw style into the paragraph tag.

    var stats2html = function(item) {
        var str='<p style=\'margin: 0px; font-size: 11px; font-weight: bold; maring-bottom: 10px; border-bottom:1px solid lightGray;\'>'+item.year+' (total '+item.count+')<\/p>';
        str+='<ul>';
        $.each(item.types, function(type,value) {
            str+='<li>'+bib2html.labels[type]+' '+value+'<\/li>';
        });
        return str+'<\/ul>';
    };

You can see the changes here: http://ncr.mae.ufl.edu/index.php?id=publications_searchable

Handling non-numeric years

We typically have several publications which have been accepted to journals, but do not have complete citations yet. i.e., they are to appear. We like to include these 'to appears' in our citation list because it can often take up to a year for the paper to actual appear in the journal after it has been accepted. The easiest way I could think to add this functionality was to just list the bib entry year as "T.A.". The sorting seems to handle the non-numeric year just fine in the main list, but the graph columns at the top seem to be a little funky. It probably just needs some small error handling snippet to fix it, but I'm not super experienced with JS to know where to find where that code is.

As for handling the "T.A." in the actual citation, I was able to handle that in my custom citation print code, which I'll send to you one I've worked out all the bugs. Getting close to finishing!

Is it possible to add column?

Hello,
this tool is really great. I wonder if its possible to ad a column to the table and insert some new data (by manipulating the code).

I would like to add the Keywords of my bibtexfile to another column.

I thought this might work by editing the code by adding the italic code, but it doesn't work.

bibentries.push([item.year, item.keywords, bib2html.labels[item.entryType], html]);
....
var table = this.$pubTable.dataTable({ 'aaData': bibentries,
'aaSorting': this.options.sorting,
'aoColumns': [ { "sTitle": "Year"},
{ "sTitle": "Keywords"},
{ "sTitle": "Type", "sType": "type-sort", "asSorting": [ "desc", "asc" ]},
{ "sTitle": "Publication", "bSortable": false }],
'bPaginate': false
});

Is there a way I could achieve 4 columns?

Visualisation not visible with many bibtex entries

Hi,

This is great software, thanks for sharing!

I'm adopting it for a research group. There are 457 entries in the bibtex file for all publications within the group. Here is the bibtex file:

http://www.macs.hw.ac.uk/~dsg/dblp2bibtex/dsg-publications.bib

The bib-publication-list visualisation isn't visible for this bibtex file:

http://www.macs.hw.ac.uk/~dsg/wp/?page_id=1278

If I zoom into the web page, I can faintly see a few colours in the visualisation, though the colours aren't clear and the bars for book/journal/article/ etc.. are very thin.

Is there anything I can do, to make the visualisation: the colours, and distinguishing the types of publications, clear without zooming into the visualisation?

Thanks!

Multiple publication tables in a single HTML file?

I was trying to make multiple lists of publications for a survey webpage. However, if I add a second table and

 section (with new ids, of course) and call bibtexify on them, I only get the first table.

My first attempt at this was to just break up the listing in example.html and add a new table with a new id. Only the first table is generated in this case.

In my second try, I renamed both tables ("books" and "papers") and gave them a class of "bibtex". This gets a DataTables warning: Unable to re-initialise DataTable. Please use the API to make any configuration changes required. Does this mean that the code implies a single datatable?

add option to hide missing fields

If an item like page numbers for a journal article is missing from the BibTeX file, that item shows up in red letters as "missing" in the rendered output. Is there a way to hide missing fields entirely? In this example, both the "missing" and the "pp." preceding the page numbers would not be included in the rendered output. I know some fields are missing in the file but there's nothing I can do about it to fix the file, and red "missing" makes my page look less professional.

Licence?

If I am not mistaken, the license of your source code is not explicitly given.
I assumed you were sharing this code for us to study, tweak and edit it, and that's I have tried to do with https://github.com/aubertc/bib-publication-list.

However, I am not sure under which license I should release this edited code: can you please advise?

Duplicate legend entries?

The default mappings in bib2html.labels cause duplicate entries in the legend when multiple items are mapped to the same legend label.

"Conference" appears twice, because both @inproceedings and @conference map to Conference label (graph from here):

image

For now, I'll probably just change bib2html.labels so every entry is unique, but would be grateful for any suggestions. (and: thank you for this software!)

Sorting using column buttons

The new default year/type sorting is working great. However, if you click to sort a column by type, and the resort the columns by year (using the arrows), the entries do not align by year/type, they reorder by year/random (not really random, most likely in whatever order they are pulled from the database). I would assume that you'd like the entries to be sorted by year/type again after you click on the year column's sort arrow.

Bibtex fails to load with certain files.

I have a rather long bibtex file. The table didn't load. After some trial and error I realized that an escape character in the wrong position triggers the error.

A bibtex with the following line won't load because of the backslash at the end "}". May be this is a special case where a file is used to point to a directory

File = {C:\Studium\6_Semester\Soziologie\stata},

If it is hard to handle this pattern, may be a warning could be dropped.

Felix

Improve display of year labels on visualization for high number of years

I have a library with publications from the 1800s to present day. The timeline visualization tries to cram all those years as labels on the x-axis, resulting in overprinting labels.

Feature request: Have the visualization hide some x-axis labels so that there is reasonable padding (5 px, say?) minimum between labels.

Fail to parse Editor in Book Chapter

Hello,

There seems to be an error when parsing Editors of a book chapter.
If the "inbook" entry type is used the editor appears as "object Object".
If the "incollection" entry type is used instead, then the editor field is simply ignored and the entry is categorized as "Misc".

See the MWEs below.
Thanks for your support!

bib:
@inBook{doe2017,
author = {John Doe},
editor = {Jane Doe},
chapter = {Chapter title},
publisher = {The publisher},
title={Book title},
year = {2017},
pages={1-3}
}

Output:
John Doe (2017). Chapter title in Book title, Edited by [object Object], The publisher, pp. 1-3.

bib:
@incollection{doe2017,
author = {John Doe},
editor = {Jane Doe},
chapter = {Chapter title},
publisher = {The publisher},
title={Book title},
year = {2017},
pages={1-3}
}

Output:
John Doe (2017). Book title.

Feature Request: Passing additional options to underlying dataTables object

I would like to pass on additional options to the underlying dataTables object, for example dynamically hide columns by making a call like this:

bibtexify("somefile.bib", "pubTable", {"columnDefs": [{"visible": false, "targets": [1]}]});

However the additional options are not passed on to the underlying dataTables object. See:
https://github.com/vkaravir/bib-publication-list/blob/master/src/bib-publication-list.js#L259

Do you have any specific reasons for not passing any 'user-provided' options further down the call chain? It is possible to do something like this for example (assuming user_options holds my custom options):

var table = this.$pubTable.dataTable($.extend({}, { 'aaData': bibentries,
            'aaSorting': this.options.sorting,
            'aoColumns': [ { "sTitle": "Year" },
                { "sTitle": "Type", "sType": "type-sort", "asSorting": [ "desc", "asc" ] },
                { "sTitle": "Publication", "bSortable": false }],
            'bPaginate': false
        }, user_options));

Is this something that you could perhaps implement to increase the flexibility of your implementation?

Bib file formatting not support

Does my bib needs to be in particular format to get the output ?
Following error is thrown when I provide as an input the complete bib file but when I just provide three to four selective content elements they generate accurate table.

bib-list-min.js:284 Uncaught TypeError: this.raiseError is not a function
    at BibTex._determineCase (bib-list-min.js:284)
    at BibTex._extractAuthors (bib-list-min.js:276)
    at BibTex._parseEntry (bib-list-min.js:253)
    at BibTex.parse (bib-list-min.js:230)
    at Bib2HTML.initialize (bib-list-min.js:369)
    at new Bib2HTML (bib-list-min.js:369)
    at bib-list-min.js:382
    at 127.0.0.1/:237

Bar graph visualization and legend sorting

These aren't high priority, but things that you might think are beneficial. What type of sorting is the popup window on the protovis legend using? Appears to be random. I know its printing the data in the stats2html but can't figure out how you'd throw sorting in there. (still learning js :)) Should it sort the types in the legend by the the preferenced sorting type you implemented in the main list? i.e., defaulty by book, inbook, journal, conference, etc... but adjustable.

And this is pushing it and completely an idea for the future perhaps, but what do you think about color coding each of the bars in the graph based on the percentage of the yearly output for each type. So for example if there were 4 books, 4 journal papers and 4 conference papers in 2010, the 2010 bar would have 33% blue (for books), 33% red (for journals) and 33% orange (for confs). Colors sorted by the same variable sorting preference. Might add a little spice to visualization! (or look terrible and cluttered).

bibdownloaded is not defined

I got the following error in my Javascript console.

Uncaught ReferenceError: bibdownloaded is not defined 

It seems your web page also issues the same error. But it works fine. I could not get it to work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.