Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the Title of a File #230

Open
supercasey opened this issue Feb 22, 2017 · 6 comments
Open

Change the Title of a File #230

supercasey opened this issue Feb 22, 2017 · 6 comments

Comments

@supercasey
Copy link

I'm uploading files to different pages within SB. I'd like to be able to include a "Title" (not the file name) for the files I upload so that when users land on the page they have an idea what each file represents. See the "hello" in the attached screenshot. Is there a way to do this in the SB package?

image

@jkreft-usgs
Copy link

looks like adding a title is on page 395 of the paper describing use of sbtools item_create:

image

The whole paper is available here.

@supercasey
Copy link
Author

That is for adding an item as opposed to a file. I think the process for creating an item is different than for adding a file.

@jordansread
Copy link
Contributor

you can kind of hack this in if you need to, but I would be careful and wouldn't advise doing it. Perhaps we need to expose the file title in the "append_files" function. I don't think that was a field originally.

The files field in the item is a list in R (is SB json otherwise) and you can modify it and then update the item.

item$files[[1]]$title <- "version_3_sbtools_update"
item_update(my.item, info = list(files = item$files)

and that works.
image

@supercasey
Copy link
Author

Great, thanks for the help.

@jordansread
Copy link
Contributor

@supercasey is that helpful? Also, can you give us an idea of how much of a priority this is for you and others?

@supercasey
Copy link
Author

Yes, that was very helpful, I was able to loop through 116 separate pages and title 4-8 files each. I would think other users that need to upload large numbers of files would like the functionality, but it may be as simple as placing your proposed fix as an example in the item_update function, there isn't much documentation in the package or in the journal article as to how to use the info argument to update metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants