I'm away from a host with a working Invenio instance to test this on at
the moment, but I think this is a great idea.  And reading over the
patch, it looks very reasonable to me.

Joe

On 06/03/2011 01:51 PM, Benoit Thiell wrote:
> Hi.
> 
> I'm working on allowing the global replacement of displayed record IDs
> by an external system number (e.g. arXiv ID or bibcode). For this I
> need to import search_engine.get_fieldvalues in some modules but can't
> do that because of the problem of reciprocal imports (search_engine
> import module and module import search_engine). Here is a patch that
> moves this sensitive function to a new file that I called
> search_engine_utils. I don't have a strong opinion on the name nor the
> location of this file.
> 
> An advantage of doing this is that we can get rid of the multiple
> implementations of get_fieldvalues() available in Invenio:
> 
> modules/bibformat/lib/bibformat_dblayer.py:def get_fieldvalues(recID, tag):
> modules/bibformat/lib/bibformat_utils.py:    def get_fieldvalues(recID, tag):
> modules/bibindex/lib/bibindex_engine.py:def get_fieldvalues(recID, tag):
> modules/bibrank/lib/bibrank_downloads_similarity.py:def
> get_fieldvalues(recID, tag):
> modules/websearch/lib/search_engine.py:def get_fieldvalues(recIDs,
> tag, repetitive_values=True):
> modules/websearch/lib/websearch_templates.py:def get_fieldvalues(recID, tag):
> 
> Let me know if this is something that is beneficial to Invenio and/or
> what could be added to this new module.
> 
> Cheers.
> 




Reply via email to