Topic: [GNU/Linux] Faux-Pa's Nerd Scripts

Posted under e621 Tools and Applications

I created this thread because I have a couple of scripts I want to share in the next few weeks, and I don't want to clutter up the forums.
New script coming right up.

Updated

Okay, admittedly, this isn't the most exciting script in the world, but for those of us who manage lots of pictures here from e621, this script could be very helpful.

ePics21-fixer is a script that I've been testing for the last few days that allows us BASH users to instantly recover any pictures that might've been corrupted or somehow modified. As long as the picture retains it's original filename from static.e621.net, the script will download and overwrite the corrupted picture.

ePics21-Fixer v1.0.0

Stable: https://github.com/Youboontoo/epics21-fixer
Testing: https://github.com/Youboontoo/epics21-fixer/tree/testing

The script is available for download at github.com/Youboontoo/epics21-fixer/releases/tag/v1.1.0

Updated by anonymous

Mystical... Magical... Okay, maybe just plain boring. But if you love Ubuntu and pic-hoarding as much as I do, then this tool will be you're new best friend.

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Faux-Boxer is the final solution to all geek-furs' heartaches with keeping track of their pictures in directory-based systems. Gone are the days of organizing pictures into folders. Gone are the days of not being able to search for a certain picture you thought you lost. And furthermore, gone are the days of the 6-tag search limit. Search with confidence, as you no longer have to waddle through pages of un-related pictures to find the picture you're looking for.

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Faux-Boxer 1.0.1

(Updated)

Stable: https://github.com/Youboontoo/faux-boxer
Testing: No forecasted public beta release

The script is available for download at github.com/Youboontoo/faux-boxer/releases/tag/v1.0.1

Updated by anonymous

I realize that your blurb is mostly facetious, but I have to ask: Why this, which requires a separate virtual server, as opposed to a self-contained solution like TMSU or Tagsistant ?

Updated by anonymous

savageorange said:
I realize that your blurb is mostly facetious, but I have to ask: Why this, which requires a separate virtual server, as opposed to a self-contained solution like TMSU or Tagsistant ?

I realize that my solution is more for the tech-minded, and it is undeniable that my solution is reliant on external equipment (in either physical or virtual forms), but if you are willing to look past that, it is a cool homebrew tool. I was just think the same exact thing last night, but remember that it is one of many picture-tagging solutions available.

If I can find a way to integrate it into windows, and make it into a self-contained solution, I will definitely make a new release for it on GitHub.

Thanks for the feedback.

Edit: Plus, TMSU and Tagsistant don't have a built-in tool that downloads the pictures's tags from e621. While the pictures will have retain the original name they got from here, it works 95% of the time.

Updated by anonymous

Faux-Pa said:
I realize that my solution is more for the tech-minded, and it is undeniable that my solution is reliant on external equipment (in either physical or virtual forms), but if you are willing to look past that,
it's a cool homebrew tool

To clarify: trying to run any VM on this 1gb laptop would be swapping hell, whereas I have TMSU running happily with a 900k-file database.

'self-contained' may also have been unclear; I mean that there are solutions that occupy resources constantly (database server), and there are solutions that only occupy resources when they are being used (TMSU)

Edit: Plus, TMSU and Tagsistant don't have a built-in tool that downloads the pictures's tags from e621. While the pictures will have retain the original name they got from here, it works 95% of the time.

True; I didn't really consider that since I have my own tool for that.

If you want specific feedback, the query selection could be improved -- dunno how to do "proper" tab autocomplete, but if you could use percol (or peco, pmenu, etc..), it would make inputting a valid query easier (interactive browsing+selection of tags)

There are also GUI-ish options like lighthouse , which IMO can be really nice, but I'm not sure how easy it is to build for Ubuntu.

Updated by anonymous

savageorange said:
To clarify: trying to run any VM on this 1gb laptop would be swapping hell, whereas I have TMSU running happily with a 900k-file database.

'self-contained' may also have been unclear; I mean that there are solutions that occupy resources constantly (database server), and there are solutions that only occupy resources when they are being used (TMSU)

Yeah, running this system off a 200GB, 1GB of RAM computer from the early 2000s definitely isn't my idea of "living the life", but that should highlight how processor-unheavy (for a lack of better terms) this tool is. If it can run off a super-old Windows XP-era processor with 1GB of PC133 RAM, then it can run on any modern computer. But your skepticism of running a VM on a low-powered machine just for my tool is valid. I'm in the process of making it work with Windows Subsystem for Linux (or better known as Bash for Windows), but the virtual drives in WSL are giving me a headache.

True; I didn't really consider that since I have my own tool for that.

If you want specific feedback, the query selection could be improved -- dunno how to do "proper" tab autocomplete, but if you could use percol (or peco, pmenu, etc..), it would make inputting a valid query easier (interactive browsing+selection of tags)

There are also GUI-ish options like lighthouse , which IMO can be really nice, but I'm not sure how easy it is to build for Ubuntu.

I was aiming for a system that could run from vanilla Ubuntu 14.04 without dependencies for other programs that aren't pre-installed. While Percol and Lighthouse do seem like cool GUI options that I might include in the beta version of Faux-Box, they are a bit tricky to install. Plus, they use Python. I've made a conscious effort to learn Python, but the math and operators are tripping me up.

Updated by anonymous

Development for Windows Linux Subsystem compatibility has halted for the foreseeable future. Faux-Boxer is now purely a GNU/Linux project, but is free for adaption on other platforms.

Updated by anonymous

i see you're one of those cheeky developers who insist on appending "GNU/" to arbitrary five-letter words.

Updated by anonymous

fewrahuxo said:
i see you're one of those cheeky developers who insist on appending "GNU/" to arbitrary five-letter words.

"appending" -- I'm roughly 100% sure that that isn't what you meant.

Updated by anonymous

fewrahuxo said:
i see you're one of those cheeky developers who insist on appending "GNU/" to arbitrary five-letter words.

I have recently taken to calling it GNU+Linux.

Updated by anonymous

I'm not entirely sure if I should even attempt to create a Windows version of my mass downloader tool, but I've been sitting on a BASH version of it for about a year now. Since next to nobody uses Ubuntu, and considering that my Faux-Boxer project got little to no attention, that's why I'm so hesitant to release it.

However, if you would like to take a look at it, maybe offer some advice or requests, then please feel free to DMail me. I'm always open-ears to great ideas.

Updated by anonymous

I have created a bare-bones version of my downloader script for Windows!

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Faux-Boxer Mass Downloader for Windows is my first step in the door into Windows scripting. Admittedly, it's not the prettiest thing in the world, and has two dependencies of popular GNU/Linux commands (curl and jq), it still does the job and does it well.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Faux-Boxer Mass Downloader for Windows, v1.0.0

(Updated)
Stable: https://github.com/Youboontoo/faux-boxer-downloader-win
Testing: No forecasted public beta release

The script is available for download at github.com/Youboontoo/faux-boxer-downloader-win/releases/tag/v1.0.0

Updated by anonymous

I have awooooken from my programming slumber, and have created another Linux tool.

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Faux-Boxer Pool Downloader is the third tool in my Linux series of tools that allows BASH users (you're out of luck, SH users) to specify a pool ID, then download it. If this tool becomes popular enough with our Linux userbase, I may bash my face against the keyboard until a Windows Batch version appears.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Faux-Boxer Pool Downloader, v1.0.0

Stable: https://github.com/Youboontoo/faux-boxer-pool-downloader
Testing: No forecasted public beta release

The script is available for download at https://github.com/Youboontoo/faux-boxer-pool-downloader/archive/v1.0.0.zip

Updated by anonymous

20-Shades-Of-Faux-Pa said:
I have created a bare-bones version of my downloader script for Windows!

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Faux-Boxer Mass Downloader for Windows is my first step in the door into Windows scripting. Admittedly, it's not the prettiest thing in the world, and has two dependencies of popular GNU/Linux commands (curl and jq), it still does the job and does it well.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Faux-Boxer Mass Downloader for Windows, v1.0.0

(Updated)
Stable: https://github.com/Youboontoo/faux-boxer-downloader-win
Testing: No forecasted public beta release

The script is available for download at github.com/Youboontoo/faux-boxer-downloader-win/releases/tag/v1.0.0

Batch scripts are obsolete for many years. If you intend to write scripts for Windows, you should use PowerShell. On top of having sensible syntax instead of Batch mess, it has built-in support for web requests and JSON, so no need to bundle executables. It's also cross-platform, so you can develop your scripts in Linux.

Updated by anonymous

I'm not sure I understand your ePics21-fixer script. You don't seem to do a md5 of the file before grabbing a new one from e621 (which if the file is deleted will wipe out your copy). So you're first supposed to move all your bad files into a single folder and then run the script?

Updated by anonymous

mrox said:
I'm not sure I understand your ePics21-fixer script. You don't seem to do an md5 of the file before grabbing a new one from e621 (which if the file is deleted will wipe out your copy). So you're first supposed to move all your bad files into a single folder and then run the script?

I had some files that had gotten corrupted while moving them between servers, but they still retained the MD5 checksum in the name of the file like all e621 images. Bearing this in mind, I created ePics21-Fixer to grab the name of the file, chop off all the irrelevant information from it, then shove it through the e621 APIs to find the file_url. From there, it downloads and overwrites the corrupted images with the one from here.

You are correct, you would shove all the bad images in a single folder with the script, then run it.

Updated by anonymous

KinkyGlutamate said:
Batch scripts are obsolete for many years. If you intend to write scripts for Windows, you should use PowerShell. On top of having sensible syntax instead of Batch mess, it has built-in support for web requests and JSON, so no need to bundle executables. It's also cross-platform, so you can develop your scripts in Linux.

I had not known that, as you can see that I'm normally a GNU/Linux dude. Either way, thanks for the heads up! I guess I have a bit of reading up to do!

Updated by anonymous

  • 1