benten meta
目的
- メタデータを参照します。
Warning
事前にログイン認証を行う必要があります。
概要
- 登録ベース名(register_baseame)を指定し、メタデータ情報を取得します。
Note
登録ベース名とは登録名(register_name)のベース部の名前です。例えば、登録名が /BL14B2/cr14b2/2014S0000/Ag/K/111/Ag-foil/Ag-K_Ag-foil_Si111_50ms_160412 の場合、登録ベース名は Ag-K_Ag-foil_Si111_50ms_160412 となります。
利用例
- Help
$ benten.py meta -h usage: benten meta [-h] [--current_directory [CURRENT_DIRECTORY]] [--mode [{db,file}]] [--pattern [{user,all}]] [--flag_file_list] [--flag_veto_init] register_basename positional arguments: register_basename register_basename optional arguments: -h, --help show this help message and exit --current_directory [CURRENT_DIRECTORY], -c [CURRENT_DIRECTORY] current directory --mode [{db,file}], -m [{db,file}] mode --pattern [{user,all}], -p [{user,all}] pattern --flag_file_list, -f flag to include file_list in metadata --flag_veto_init, -v flag to veto init_index
- DBからメタデータを参照
$ cd /disk/data1/test $ ls base.json base.system.json $ benten.py meta ### benten meta ### [LocalStorage::authorize] access_token = 78fb9b529fcc4fbdb6ae2884664f2ba8 { "mode":"db", "metadata":{ "@data_info@identifier@proposal_number":"2014S0000", "@data_info@data_depositor@name":"Taro Kokido", "@data_info@data_depositor@affiliation@organization":"JASRI", "@data_info@identifier@register_name":"/SPring-8/BL14B2/test/base", "@data_info@facility":"SPring-8", "@data_info@class_name":"BL14B2", "@data_info@disk_name":"test", "@data_info@title_ja":"標準試料", "@data_info@title":"Standard Sample", "@data_info@contact_name@name":"Hironori Ofuchi", "@data_info@contact_name@affiliation@organization":"(公財)高輝度光科学研究センター", "@data_info@contact_name@role":"person", "@data_info@contact_name@identifier@name":"0007719", "@system@version@data_register":"0.6.0", "@dataset@directory_list":[ { "name":"/SPring-8/BL14B2/test", "file_list":[ { "hash":"cab298ad8131809c9bf14fd1617f3b59", "size":189, "time":"2020-04-29 10:36:03", "uuid_name":"3df77eff-18c3-4244-be07-2f0d5dbb419b", "name":"/SPring-8/BL14B2/test/base.json" }, { "hash":"604efbc153f5a088dbbcd4994e9c4fef", "size":577, "time":"2020-04-29 10:36:06", "uuid_name":"51f80f1f-1de0-4e17-8a15-8d03ca53f77e", "name":"/SPring-8/BL14B2/test/base.system.json" } ] } ], "@system@version@agent":"1.1.0", "@system@version@metadata":"spring8-bl14b2-2020.04.27", "@data_info@date@create_time":"2020-04-29 11:17:58", "@data_info@date@update_time":"2020-04-29 11:17:58", "@system@uuid_register_directory":"/storage/volume-01/SPring-8/BL14B2/2020-04/a90cde60-cef2-4859-bf24-8f98ae868f10", "@system@parent_directory":"/SPring-8/BL14B2/test", "@data_info@identifier@pid":"spring8.73a9a80d-2282-43cb-828a-31597dcd8f34", "@data_info@access_rights":"close", "@data_info@data_origin":"experiment" } }
- ローカルストレージのファイルからメタデータを参照 (登録前の事前チェックに有用)
$ benten.py meta base -m file ### benten meta ### [LocalStorage::authorize] access_token = 78fb9b529fcc4fbdb6ae2884664f2ba8 { "mode":"file", "metadata":{ "@data_info@identifier@proposal_number":"2014S0000", "@data_info@data_depositor@name":"Taro Kokido", "@data_info@data_depositor@affiliation@organization":"JASRI", "@data_info@identifier@register_name":"/SPring-8/BL14B2/test/base", "@data_info@facility":"SPring-8", "@data_info@class_name":"BL14B2", "@data_info@disk_name":"test", "@data_info@title_ja":"標準試料", "@data_info@title":"Standard Sample", "@data_info@contact_name@name":"Hironori Ofuchi", "@data_info@contact_name@affiliation@organization":"(公財)高輝度光科学研究センター", "@data_info@contact_name@role":"person", "@data_info@contact_name@identifier@name":"0007719", "@system@version@data_register":"0.6.0", "@dataset@directory_list":[ { "name":"/SPring-8/BL14B2/test", "file_list":[ { "name":"/SPring-8/BL14B2/test/base.json" }, { "name":"/SPring-8/BL14B2/test/base.system.json" } ] } ] }, "create_meta_system":true }