X-Git-Url: https://git.hcoop.net/clinton/thingy_grabber.git/blobdiff_plain/a7152c35bfb21e27530cc5d491d26e7a0147ceeb..3c82f75b1093606a2c9afe498f4595adc267c710:/README.md diff --git a/README.md b/README.md index 5687736..58d525a 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,39 @@ Script for archiving thingiverse things. Due to this being a glorified webscraper, it's going to be very fragile. ## Usage: -`thingy_grabber.py user_name collection_name` +```` +usage: thingy_grabber.py [-h] [-v] {collection,thing,user} ... +positional arguments: + {collection,thing,user} + Type of thing to download + collection Download an entire collection + thing Download a single thing. + user Download all things by a user + +optional arguments: + -h, --help show this help message and exit + -v, --verbose Be more verbose +```` + +### Things +`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. This will create a series of directorys `user-collection/thing-name` for each thing in the collection. -If a thing's directory already exists, it will be skipped. + +If for some reason a download fails, it will get moved sideways to `thing-name-failed` - this way if you rerun it, it will only reattmpt any failed things. + +### User designs +`thingy_grabber.py user_name` +Where `user_name` is the name of a creator. + +This will create a series of directories `user designs/thing-name` for each thing that user has designed. If for some reason a download fails, it will get moved sideways to `thing-name-failed` - this way if you rerun it, it will only reattmpt any failed things. @@ -16,10 +43,11 @@ python3, beautifulsoup4, requests, lxml ## Current features: - can download an entire collection, creating seperate subdirs for each thing in the collection +- If you run it again with the same settings, it will check for updated files and only update what has changed. This should make it suitible for syncing a collection on a cronjob +- If there is an updated file, the old directory will be moved to `name_timestamp` where `timestamp` is the last upload time of the old files. The code will then copy unchanged files across and download any new ones. + -## Todo features: -- download a single thing -- download things by designer +## Todo features (maybe): - less perfunctory error checking / handling - attempt to use -failed dirs for resuming -- detect updated models and redownload them +- pull down images as well