Modify

Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#5396 closed task (fixed)

Plugin can't find non-attachment bib files

Reported by: Ariel Balter Owned by: Roman Mohr
Priority: high Component: TracBibPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

The plugin works great with local bib files. I can't seem to get it to work with non-local bib files. I've tried various types of paths: other wiki pages (e.g. wiki:<page name>/attachment, wiki:<page name>:attachment), and also sources in the repo (e.g. source:<folder>:file, source:<folder>/file, http://<full path in url bar to file>). I always get a message like:

Error: Macro BibAdd(http://myotherstuff.org/heartstuff/browser/StereoPhotogrammy/marker_refs_simple.bib) failed
Attachment 'wiki:heartstuff/MarkerReconstruction: http://myotherstuff.org/heartstuff/browser/StereoPhotogrammy/marker_refs_simple.bib' does not exist.

Any suggestions? Thanks, Ariel (abalter)

Attachments (0)

Change History (12)

comment:1 Changed 15 years ago by Ariel Balter

I created two pages that you can view, but not the source.

FakeRef

Location

http://myotherstuff.org/heartstuff/wiki/FakeRef

Source

[[BibAdd(fakeref.bib)]]

This page holds a fake bib file.

This page has a citation to a reference [[BibCite(someref09)]].

[[BibNoCite(selvikThesis89)]]
[[BibRef()]]

Attachment

fakeref.bib

@article {someref09,
author = "Ariel Balter",
title = "This is a test reference",
journal = "Proceedings of Trac Hacks",
pages = "999",
volume = "1",
number = "3",
year = "2009",
}

@article{selvikThesis89,
author = "Selvik G",
journal = "Acta orthopaedica Scandinavica. Supplementum",
title = "Roentgen stereophotogrammetry. A method for the study of the kinematics of the skeletal system.",
pages = "1-51",
volume = "232",
year = "1989",
type = "article"
}

BibTest

Location

http://myotherstuff.org/heartstuff/wiki/BibTest

Source

[[BibAdd(wiki:FakeRef/fakeref.bib)]]

This page has a citation to a reference in a bib file attached to [wiki:FakeRef another page]. [[BibCite(someref09)]].

[[BibNoCite(selvikThesis89)]]
[[BibRef()]]

comment:2 Changed 15 years ago by Roman Mohr

Type: defecttask

Hi,

At the moment the plugin is not follwing the typical trac syntax, for example to load a file from the repo just use

[[BibAdd(path/to/bib.bib,<revision>)]]

Make sure NOT to add a "source:" string before the path. For a svn repository "head" is most of the time sufficient as revision and for git "master". e.g.:

BibAdd(trunk/sci.bib,head)

should to it.

Loading from other wiki pages than the local page is also not possible at the moment. I hope to find some time to change the program the next days to support standard trac syntax.

Hope I could help

comment:3 Changed 15 years ago by anonymous

I commited an update tody to support more trac like links.

The new api in the trunk is:

[[TracBib(source:file[@rev])]] 
[[TracBib(attachment:[wikipage/]file)]]

Examples:

[[BibAdd(source:bib.bib@2)]]
[[BibAdd(source:bib.bib@latest)]]
[[BibAdd(source:bib.bib)]]
[[BibAdd(attachment:fiol.bib)]]
[[BibAdd(attachment:test/lala.bib)]]

Please test and report. thx.

comment:4 Changed 15 years ago by Roman Mohr

Resolution: fixed
Status: newclosed

Now you can also use wiki pages themselve to load items. Syntax:

[[BibAdd(wiki:pagename)]]

The bibtexentries must be in a code block. See [TracBibPlugin] for furhter details.

Feel free to reopen the ticket if you still have problems, I consider this as fixed.

comment:5 Changed 11 years ago by anonymous

Hi,

I'm having problems with this plugin. I attached a bib file in a wiki page which path is:

wiki/references/bibliography

On that page I use the following line to include the bib file:

[[BibAdd(attachment:references.bib)]]

Everything is ok if I try to cite a reference from that file in that wiki page. For instance:

[[BibCite(Amft:2009p144)]]

However, I do not understand how to cite the same reference from that bib file in another wiki page, ex. in the main page ate wiki/WikiStart. I'm having problems in adding the bib file on that wiki page to include a reference.

I tried several ways with no success. I already saw the plugin usage examples at the plugin page, but it really do not help.

Any help?

Thanks a lot for your time.

Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:6 Changed 11 years ago by anonymous

As the documentation at the plugin page says:

[[BibAdd(attachment:[wikipage/]file)]]   # add a file from a wiki attachment

So, if you reach the wiki page where the bib file is attached via wiki/MyPage/TestPage you can reference it from every other page in the wiki via

[[BibAdd(attachment:MyPage/TestPage/references.bib)]]

I hope you find the plugin useful.

Best Regards, Roman

comment:7 Changed 11 years ago by anonymous

Hi,

that one of the experiments I did. For instance my trac's project environment path is:

http://localhost/trac/HumanActivityUnderstanding/

where I attach my bib file was in (the name of bib file is references.bib):

http://localhost/trac/HumanActivityUnderstanding/wiki/references/bibliography

in that wiki page I add the bib file as:

[[BibAdd(attachment:references.bib)]]

without any problem. However, if I try to add the same bib file on (or in any other wiki page):

http://localhost/trac/HumanActivityUnderstanding/wiki

which is the right way to do it? Accordingly with the plugin's documentation, and from what you said, it should be:

[[BibAdd(attachment:wiki/references/bibliography/references.bib)]]

However, there is an error that says:

Error: Macro BibAdd(attachment:wiki/references/bibliography/references.bib) failed

Attachment 'wiki:wiki: references/bibliography/references.bib' does not exist.

I notice that at the root of my trac's project environment there is a directory called attachments that maintains the wiki pages structure.

Any help, please ....

So, if I want

Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:8 Changed 11 years ago by anonymous

Don't add 'wiki'

BibAdd(attachment:references/bibliography/references.bib)

Should work.

comment:9 Changed 11 years ago by anonymous

Not really,

and I already tried that before ... The error is:

Error: Macro BibAdd(attachment:references/bibliography/references.bib) failed

Attachment 'wiki:references: bibliography/references.bib' does not exist.

Any idea? It has to do with the plugin's version? With any conflict with any other plugin?

Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:10 Changed 11 years ago by anonymous

Any idea? help, suggestion?

comment:11 Changed 11 years ago by anonymous

Could you tell me on which trac version and which python version you are using the plugin?

comment:12 Changed 11 years ago by anonymous

Python 2.7.3 Plugin from trunk

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Roman Mohr.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.