add thing downloading
[clinton/thingy_grabber.git] / README.md
1 # thingy_grabber
2 Script for archiving thingiverse things. Due to this being a glorified webscraper, it's going to be very fragile.
3
4 ## Usage:
5 ````
6 thingy_grabber.py [-h] [-v] {collection,thing} ...
7
8 positional arguments:
9 {collection,thing} Type of thing to download
10 collection Download an entire collection
11 thing Download a single thing.
12
13 optional arguments:
14 -h, --help show this help message and exit
15 -v, --verbose Be more verbose
16 ````
17 ### Things
18 `thingy_grabber.py thing thingid`
19 This will create a directory named after the title of the thing with the given ID and download the files into it.
20
21
22 ### Collections
23 `thingy_grabber collection user_name collection_name`
24 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.
25
26 This will create a series of directorys `user-collection/thing-name` for each thing in the collection.
27
28 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.
29
30 ## Requirements
31 python3, beautifulsoup4, requests, lxml
32
33 ## Current features:
34 - can download an entire collection, creating seperate subdirs for each thing in the collection
35 - 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
36 CAVEAT: This script will *not delete files*. So if there has been an update and some files have been moved or renamed, they will be mixed in with the old stuff.
37
38
39 ## Todo features (maybe):
40 - download things by designer
41 - less perfunctory error checking / handling
42 - attempt to use -failed dirs for resuming
43 - pull down images as well
44 - handle old/deleted files on update