On May 8, 2017, at 4:54 PM, Devin A. Bougie <[email protected]> wrote:
> ... On Feb 15, 2017, at 11:50 AM, Jérôme Zbinden <[email protected]> wrote:
>>> [...] how would I actually change the DEMOART_FILE to Main?
>> 
>> The bibdocfile CLI `--set-doctype’ option should let you change the 
>> "DEMOART_FILE" doctype
>> to "Main" a posteriori:
>> https://documents.classe.cornell.edu/help/admin/howto-fulltext
> 
> It does look like "bibdocfile --with-doctype=DEMOART_FILE --set-doctype=Main" 
> would do what we want, but when there are multiple files it's not correctly 
> setting the DEMOART_FILE as the Main file.  For example, "bibdocfile -r 2136 
> --with-doctype=DEMOART_FILE --set-doctype=Main" changed the Additional file 
> to Main instead of the DEMOART_FILE file.  The result can be seen at:
> https://documents.classe.cornell.edu/record/2136/files/
> 
> It would seem I'm misunderstanding how to specify which document to apply the 
> action on.  Any additional tips would be greatly appreciated.

Or perhaps there's a bug with "--with-doctype?"  If I use "--with-docname" 
instead of "--with-doctype," I am able to correctly identify which file to 
change.  For example, the following worked properly:
bibdocfile -r 2136 --with-docname='DEMO-*' --set-doctype='Main'

Anyway, I believe I now understand doctype's a bit better and have everything 
the way we'd like.  Thank you again for all of your time and help!

Sincerely,
Devin

> 
> 
>> ... In case your file is uploaded via the "Move_Files_To_Storage" WebSubmit 
>> function instead 
>> of a BibConvert template, you would not have the possibility to configure 
>> the doctype 
>> without renaming the file input element (*):
>> https://documents.classe.cornell.edu/help/admin/websubmit-admin-guide#5.2
>> (* that might no longer be the case, as I can see a `paths_and_doctypes' 
>> parameter has 
>> been added to the "Move_Files_To_Storage" WebSubmit function:
>> https://github.com/inveniosoftware/invenio/blob/maint-1.2/modules/websubmit/lib/functions/Move_Files_to_Storage.py#L93
>>  )
> 
> We are in fact using Move_Files_To_Storage (probably inherited from our 
> initial deployment), and it does look like paths_and_doctypes does what we 
> need.  For example, if I set paths_and_doctypes to:
> {"DEMOART_FILE":"Main"}
> 
> Then the file uploaded with the SBI submission interface is correctly 
> identified as a Main file.
> 
> Thanks again!
> Devin

Reply via email to