Dear San-Tsai,
San-Tsai Sun wrote:
Thank you very much for your help. I tried to modify the bibconvert
templates and it was not working either.
[...]
4. modify TEXTcreate.tpl (revised the definition of 8564u::REPL(EOL,))
[..]
8564u::REPL(EOL,)---<datafield tag="856" ind1="4" ind2=" "><subfield
code="u">http://lersse0
CFG_SITE_SECURE_URL =
http://lersse-dl.ece.ubc.ca/record/<:SN::SN:>/files/<:TEXT_FILE_RENAMED::TEXT_FILE_RENAMED:></subfield>
[..]
I wonder why the upload file related datafield defined in TEXTcreate.tpl [..]
is not showing in the *recmysql. *Can you please point out what I have
done wrong?
Make sure that that each "rule" of your BibConvert target configuration
template stands on a single line.
For eg:
8564u::REPL(EOL,)---<datafield tag="856" ind1="4" ind2=" "><subfield
code="u">http://lersse-dl.ece.ubc.ca/record/<:SN::SN:>/files/<:TEXT_FILE_RENAMED::TEXT_FILE_RENAMED:></subfield><subfield
code="y"><:TEXT_LINKTEXT::TEXT_LINKTEXT:></subfield></datafield>
(note that your email client might split this line...)
The template code that you sent also includes some strange directives in
8564u, with "http://lersse0CFG_SITE_SECURE_URL =", that I have removed
in the above sample code. Then your sample configuration worked on my
local machine.
Hint #1: when editing BibConvert templates, you might want to use the
BibConvert command line to quickly check the output of the conversion,
without having to go trough the whole submission procedure again and
again...
For eg:
$ cd /opt/cds-invenio/var/data/submit/storage/([..]
path/to/your/submission/dir , where recmysql file is located)
$ sudo -u www-data /opt/cds-invenio/bin/bibconvert -l1 -d .
-Cs'/opt/cds-invenio/etc/bibconvert/config/DEMOART.tpl'
-Ct'/opt/cds-invenio/etc/bibconvert/config/DEMOARTcreate.tpl'
Hint #2: the active submission directory (where file "recmysql" is
produced) contains other files produced by the submission form, named
after the form fields, i.e. there should be a file named
"TEXT_LINKTEXT".)
Hint #3: it would be much safer to not produce 8564_ fields, but to use
the FFT fields definition to manage files and related attributes.
For eg:
FFT::REPL(EOL,)---<datafield tag="FFT" ind1=" " ind2=" "><subfield
code="a"><:curdir::curdir:>/files/DEMOART_FILE/<:DEMOART_FILE::DEMOART_FILE:></subfield><subfield
code="n"><:DEMOART_RN::DEMOART_RN:></subfield><subfield
code="d"><:TEXT_LINKTEXT::TEXT_LINKTEXT:></subfield>
</datafield>
END::DEFP()---</record>
(on one line!)
<http://invenio-demo.cern.ch/help/admin/bibupload-admin-guide#3.5>
Best regards
--
Jerome Caffaro ** CERN Document Server ** <http://cds.cern.ch/>