これは、そこにいる誰かにとって簡単なことかもしれませんし、そうでないかもしれません...
ファイル復元サービスを構築しようとしています。私はこのような辞書を持っています。
{'full_path': '/home/michael/Data',
'items': {'UpgradeToCentOS5': {'full_path': '/home/michael/Data/UpgradeToCentOS5',
'type': 'f',
'versions': ['current', '09/10/12']},
'basic_debian': {'full_path': '/home/michael/Data/basic_debian',
'type': 'f',
'versions': ['current']},
'deploy.tgz': {'full_path': '/home/michael/Data/deploy.tgz',
'type': 'f',
'versions': ['current']},
'firewall': {'full_path': '/home/michael/Data/firewall',
'type': 'f',
'versions': ['current']},
'legalholder.sh': {'full_path': '/home/michael/Data/legalholder.sh',
'type': 'f',
'versions': ['current']},
'lists': {'full_path': '/home/michael/Data/lists',
'items': {'boothosts': {'full_path': '/home/michael/Data/lists/boothosts',
'type': 'f',
'versions': ['current']},
'checklist': {'full_path': '/home/michael/Data/lists/checklist',
'type': 'f',
'versions': ['current']},
'ns_ip': {'full_path': '/home/michael/Data/lists/ns_ip',
'type': 'f',
'versions': ['current']},
'server_info': {'full_path': '/home/michael/Data/lists/server_info',
'type': 'f',
'versions': ['current']},
'temp': {'full_path': '/home/michael/Data/lists/temp',
'type': 'f',
'versions': ['current']},
'tsm_clients': {'full_path': '/home/michael/Data/lists/tsm_clients',
'type': 'f',
'versions': ['current']}},
'type': 'd',
'versions': ['current']},
'salt': {'full_path': '/home/michael/Data/salt',
'type': 'f',
'versions': ['current']},
'std-srv': {'full_path': '/home/michael/Data/std-srv',
'type': 'f',
'versions': ['current']},
'upgrade_debian_6': {'full_path': '/home/michael/Data/upgrade_debian_6',
'type': 'f',
'versions': ['current']},
'using-imaps': {'full_path': '/home/michael/Data/using-imaps',
'type': 'f',
'versions': ['current']},
'xiv_online_resize': {'full_path': '/home/michael/Data/xiv_online_resize',
'type': 'f',
'versions': ['current']}},
'type': 'd',
'versions': ['current']}
基本的には... 復元可能なデータの辞書です。すべてのファイル(ディレクトリについては不明)には、そのファイルに存在するバージョンのリストである「バージョン」があります。
これを、復元したいファイルのバージョンをユーザーが選択するために使用できる HTML データに変換する方法を理解しようとしています。(制限は、ファイルごとに 1 つのバージョンの復元です。
私はこのようなものを構築したことがなく、検索で何も引っ張っていません。
私の詳細に欠けているものはありますか?
私が探しているのは、このようなものだと/思う/...
- home
-- /michael
--- /Data
---- UpgradeToCentOS5
□ Version: current
□ Version: 09/10/12
---- basic_debian
□ Version: current
---- deploy.tgz
□ Version: current
---- firewall
□ Version: current
---- legalholder.sh
□ Version: current
---- lists
----- boothosts
□ Version: current
[...]