sane-bt-*: add top-level docs

This commit is contained in:
2023-06-22 22:37:02 +00:00
parent 74ec65c8a9
commit fecd2fa7d3
3 changed files with 3 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ from sane_bt import MediaMeta, TransmissionApi
def main(): def main():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser(description="instruct servo to download some torrent")
TransmissionApi.add_arguments(parser) TransmissionApi.add_arguments(parser)
MediaMeta.add_arguments(parser) MediaMeta.add_arguments(parser)
parser.add_argument("torrent", help="magnet: URI or file path to torrent") parser.add_argument("torrent", help="magnet: URI or file path to torrent")

View File

@@ -2,15 +2,13 @@
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.sane-lib.bt ])" -p transmission #!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.sane-lib.bt ])" -p transmission
# vim: set filetype=python : # vim: set filetype=python :
# removes a torrent and trashes its data
import argparse import argparse
from sane_bt import TransmissionApi from sane_bt import TransmissionApi
def main(): def main():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser(description="remove a torrent and trash its data")
TransmissionApi.add_arguments(parser) TransmissionApi.add_arguments(parser)
parser.add_argument("torrent", help="numerical ID of the torrent in the transmission list (see sane-bt-show)") parser.add_argument("torrent", help="numerical ID of the torrent in the transmission list (see sane-bt-show)")

View File

@@ -7,7 +7,7 @@ import argparse
from sane_bt import MediaMeta, TransmissionApi from sane_bt import MediaMeta, TransmissionApi
def main(): def main():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser(description="show information about one or more torrents on servo")
TransmissionApi.add_arguments(parser) TransmissionApi.add_arguments(parser)
parser.add_argument("torrents", nargs="*", help="torrent id to show (acquire by first calling with no args)") parser.add_argument("torrents", nargs="*", help="torrent id to show (acquire by first calling with no args)")