lbrytools icon indicating copy to clipboard operation
lbrytools copied to clipboard

Simplify the way to print claims

Open belikor opened this issue 2 years ago • 1 comments

Most claims when resolved online have the same type of data in the output dictionary; instead of handling the printing by special functions, we could simplify this by using a single function with many options.

For example, print_claims.print_sch_claims already can print a list of claims with a lot of information, which is controlled by the parameters given to it. We can display block height, claim_id, type, channel name, title, and others. This function could be used in all methods that require printing claims.

print_sch_claims(claims,
                 blocks=False, claim_id=False,
                 typ=False, ch_name=False,
                 title=False, sanitize=False,
                 start=1, end=0,
                 reverse=False,
                 file=None, fdate=None, sep=";")

belikor avatar Apr 12 '22 05:04 belikor