Name Mode Size
LICENSE 100644 1 kb 100644 5 kb
mimetypes.txt 100644 3 kb 100755 6 kb
uget_preprocessor.cmd 100644 8 kb 100755 6 kb
win_preprocessor.png 100644 20 kb
# uget_autosorter Making uGet sort downloads into categories automagically for both Linux and Windows... and work in instances where only KGet is an option. Jump to the [Linux instructions]( or the [Windows Instructions]( # What This Solves I tried out [uGet]( and quickly realized it was **far** more lightweight than what I'd been using, had categories like I wanted, and could integrate easily with Firefox/Iceweasel using [FlashGot]( The problem was that certain apps I use - in particular [Liferea]( - do not support uGet. But they *do* support [KGet]( While KGet was good, it just felt ... bloated. And uGet feels light, snappy, and quick. The one feature that KGet does natively that uGet does not is *automatically* sort downloads into categories. You can *specify* what categories to use, but it won't automatically detect them. Dammit, this is linux. I'm supposed to be able to do whatever I want. So I did. And it turns out the solution to both was the same script file. Back in 2012, a user named [fehhh]( [wrote a script]( that you could call first. It was later edited by [Michael Tunnell]( It relies on [wget]( to determine what kind of file you're downloading. I originally added a few tweaks, then rewrote it and also created a Windows version. Now uGet has some category matching (yay!) but Firefox Quantum has broken everything (boo!), so I resurrected this to work with an extension that seems to make things work pretty well. It works in *conjunction* with the uGet autosorting, and seems to provide a slightly greater robustness and error-checking. I've also added a "nobt" variant that will launch Transmission instead of uGet for torrents. You can easily make this simply go to /dev/null if you like. # Linux Instructions 1. Set up uGet with the following categories **in this order** (though the names don't matter) * Home * Archives * Docs * Movies * Music * Images * Torrents The "Home" category should point to your "main" download directory. 2. Download the []( script. 3. Give the script executable permissions: ```chmod a+x``` 4. Make sure you don't actually have KGet installed at this point. 5. ```sudo ln -s /usr/bin/kget``` 6. Setup [Download with Wget]( - *including the helper application* - to use *KGet* (or the script itself) as the downloader. 7. If there's an option for commandline options, the following are available: * -u URL: The url to download * -f FILENAME: The suggested filename * -r REFERRER: Referrer link For example, for [Download with Wget](, set the Executable to the path for this script, and the arguments to: -u "[URL]" -f "[FILENAME]" -r "[REFERRER]" If no options are specified, the first parameter is assumed to be the URL to download. 8. Profit! # Windows Instructions ## EDIT: Errrrr, sorry, I'm focused on trying to make this work for me on Linux. I've left the Windows code here, but I'm not hugely motivated to fight with it again. Wait! You use Windows? Guess what! You're in luck too! uGet is a portable package for Windows, so you can use it as well. The only difference is that there's two basic tools that you'll need to snag, both free and open source. (Please note that if you deviate from these instructions, you'll have to change the script; some file paths are hardcoded in the beginning.) 1. Get uGet and unzip the portable archive into ```C:\uGet``` 2. Set up uGet with the following categories **in this order** (though the names don't matter) * Home * Archives * Docs * Movies * Music * Images * Torrents 3. Get and install the **setup** packages of [Win32 WGet]( and [Win32 Grep]( 4. Download the [uget_preprocessor.cmd]( script. 5. Copy ```uget_preprocessor.cmd``` to ```C:\uGet``` 6. Set FlashGot (or whatever other application) to use C:\uGet\uget_preprocessor.cmd as the download processor ![Setting Up FlashGot](win_preprocessor.png?raw=true "Setting up FlashGot") 7. If there's an option for commandline options, use ```[URL] --filename=[FNAME]``` 8. Profit!