add thing downloading
[clinton/thingy_grabber.git] / README.md
CommitLineData
4f6e317c 1# thingy_grabber
975060c9
OM
2Script for archiving thingiverse things. Due to this being a glorified webscraper, it's going to be very fragile.
3
4## Usage:
4a98996b
OM
5````
6thingy_grabber.py [-h] [-v] {collection,thing} ...
a7152c35 7
4a98996b
OM
8positional arguments:
9 {collection,thing} Type of thing to download
10 collection Download an entire collection
11 thing Download a single thing.
12
13optional 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`
19This 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`
975060c9
OM
24Where `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
a7152c35 26This will create a series of directorys `user-collection/thing-name` for each thing in the collection.
a7152c35
OM
27
28If 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
975060c9 30## Requirements
c4388960 31python3, beautifulsoup4, requests, lxml
975060c9
OM
32
33## Current features:
34- can download an entire collection, creating seperate subdirs for each thing in the collection
e36c2a07
OM
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
36CAVEAT: 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.
975060c9 37
e36c2a07
OM
38
39## Todo features (maybe):
975060c9
OM
40- download things by designer
41- less perfunctory error checking / handling
a7152c35 42- attempt to use -failed dirs for resuming
e36c2a07
OM
43- pull down images as well
44- handle old/deleted files on update