## Usage:
````
-usage: thingy_grabber.py [-h] [-v] [-d DIRECTORY] {collection,thing,user} ...
+usage: thingy_grabber.py [-h] [-v] [-d DIRECTORY] {collection,thing,user,version} ...
positional arguments:
- {collection,thing,user}
+ {collection,thing,user,version}
Type of thing to download
collection Download an entire collection
thing Download a single thing.
user Download all things by a user
+ version Show the current version
optional arguments:
-h, --help show this help message and exit
`thingy_grabber.py thing thingid`
This will create a directory named after the title of the thing with the given ID and download the files into it.
-
### Collections
`thingy_grabber.py collection user_name collection_name`
Where `user_name` is the name of the creator of the collection (not nes. your name!) and `collection_name` is the name of the collection you want.
PER_PAGE_REGEX = re.compile(r'"per_page":(\d*),')
NO_WHITESPACE_REGEX = re.compile(r'[-\s]+')
+VERSION = "0.4.0"
+
VERBOSE = False
def strip_ws(value):
thing_parser.add_argument("thing", help="Thing ID to download")
user_parser = subparsers.add_parser("user", help="Download all things by a user")
user_parser.add_argument("user", help="The user to get the designs of")
+ version_parser = subparsers.add_parser("version", help="Show the current version")
args = parser.parse_args()
if not args.subcommand:
designs = Designs(args.user, args.directory)
print(designs.get())
designs.download()
-
-
+ if args.subcommand == "version":
+ print("thingy_grabber.py version {}".format(VERSION))
if __name__ == "__main__":
main()