mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 22:45:52 +00:00
New command line LedgerTool. (RIPD-243)
* Retrieve and process summary or full ledgers. * Search using arbitrary criteria (any Python function). * Search using arbitrary formats (any Python function). * Caches ledgers as .gz files to avoid repeated server requests. * Handles ledger numbers, ranges, and special names like validated or closed.
This commit is contained in:
16
bin/LedgerTool.py
Executable file
16
bin/LedgerTool.py
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from ripple.ledger import Server
|
||||
from ripple.ledger.Args import ARGS
|
||||
from ripple.util.CommandList import CommandList
|
||||
|
||||
from ripple.ledger.commands import Info, Print
|
||||
|
||||
_COMMANDS = CommandList(Info, Print)
|
||||
|
||||
if __name__ == '__main__':
|
||||
server = Server.Server()
|
||||
args = list(ARGS.command)
|
||||
_COMMANDS.run_safe(args.pop(0), server, *args)
|
||||
Reference in New Issue
Block a user