NSLS-II / wishlist

an issue tracker for the big picture
1 stars 0 forks source link

Update olog book with keeping old stuff #121

Closed yugangzhang closed 7 years ago

yugangzhang commented 7 years ago

In pyOlog package/OlogClient.py

Can we modify the function/method updateLog to just add new stuff (text/attachment) without overwrite the old ones?

ghost commented 7 years ago

Adding new stuff would be a new entry. Instead, you can retrieve a log object, modify it to create a log entry.

ghost commented 7 years ago

More specifically:

SimpleOlogClient.find() returns a list of dicts. You can add what you desire to any of these returned dicts and log them using SimpleOlogClient.log(**my_dict).

yugangzhang commented 7 years ago

@arkilic Thanks! This was what I did. I search the entry first and update by updateLog. But, I found this function overwrite all the old contents, including text and attachments. We would like to just add some new text or new attachments to the existing ones.

ghost commented 7 years ago

Let's get together on Monday. Please put something on my calendar at your availability. It is a bit tricky but totally possible to do what you are asking.

yugangzhang commented 7 years ago

@arkilic Great! I will find your available calendar.