document quick mode
authorOliver Matthews <oliver@codersoffortune.net>
Fri, 21 Feb 2020 10:23:39 +0000 (10:23 +0000)
committerOliver Matthews <oliver@codersoffortune.net>
Fri, 21 Feb 2020 10:23:39 +0000 (10:23 +0000)
README.md

index 2f61cb7..7616c58 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Script for archiving thingiverse things. Due to this being a glorified webscrape
 
 ## Usage:
 ````
-usage: thingy_grabber.py [-h] [-l {debug,info,warning}] [-d DIRECTORY] [-f LOG_FILE] {collection,thing,user,batch,version} ...
+usage: thingy_grabber.py [-h] [-l {debug,info,warning}] [-d DIRECTORY] [-f LOG_FILE] [-q] {collection,thing,user,batch,version} ...
 
 positional arguments:
   {collection,thing,user,batch,version}
@@ -22,6 +22,7 @@ optional arguments:
                         Target directory to download into
   -f LOG_FILE, --log-file LOG_FILE
                         Place to log debug information to
+  -q, --quick           Assume date ordering on posts
 ````
 
 ### Things
@@ -29,7 +30,7 @@ optional arguments:
 This will create a directory named after the title of the thing(s) with the given ID(s) and download the files into it.
 
 ### Collections
-`thingy_grabber.py collection user_name collection_name1 collection_name2`
+`thingy_grabber.py  collection user_name collection_name1 collection_name2`
 Where `user_name` is the name of the creator of the collection (not nes. your name!) and `collection_name1...etc` are the name(s) of the collection(s) you want.
 
 This will create a series of directorys `user-collection/thing-name` for each thing in the collection.
@@ -59,6 +60,13 @@ user cwoac
 If you are using linux, you can just add an appropriate call to the crontab. If you are using windows, it's a bit more of a faff, but at least according to [https://www.technipages.com/scheduled-task-windows](this link), you should be able to with a command something like this (this is not tested!): `schtasks /create /tn thingy_grabber /tr "c:\path\to\thingy_grabber.py -d c:\path\to\output\directory batch c:\path\to\batchfile.txt" /sc weekly /d wed /st 13:00:00`
 You may have to play with the quotation marks to make that work though.
 
+### Quick mode
+All modes now support 'quick mode' (`-q`), although this has no effect for individual item downloads. As thingyverse sorts it's returned items in descending last modified order (I believe), once we have determined that we have the most recent version of a given thing in a collection, we can safely stop processing that collection as we should have _all_ the remaining items in it already. This _substantially_ speeds up the process of keeping big collections up to date and will noticably reduce the server load it generates.
+
+*Warning:* As it stops as soon as it finds an uptodate successful model, if you have unfixed failed downloads further down the list (for want of a better term), they will _not_ be retried.
+
+*Warning:* At the moment I have not conclusively proven to myself that the result is ordered by last updated and not upload time. Once I have verified this, I will probably be making this the default option.
+
 ## Examples
 `thingy_grabber.py collection cwoac bike`
 Download the collection 'bike' by the user 'cwoac'