Topic: CLI621 a command line tool for e621.net

Posted under e621 Tools and Applications

CLI621 command line for e621.net

Hello everyone,

this little script started as a test of the e621.net API and the need to download images based on certain tags. It was quite useful as a private script to get images swiftly and to use a normal image browser later, but I made it more suitable for other users now.

Major information

  • Platform: Linux/Unix-like (Ruby and bash are needed)
  • Requirements: Ruby run-time (1.9.1 or higher)
    • No other requirements are known as of this post.
    • No Graphical environment or X is needed!
  • Version: 0.3
  • Functions:
    • Download all images a tag search would bring up.
    • Vote on several posts at once, just giving their post IDs.
    • Favoring over post IDs
    • List and download pools now
    • create/update/destroy a pool
    • add/remove posts from a pool
    • vote/fav on a whole pool with just one command
  • Runs smoothly in a virtual machine
  • It is open source, under the GNU GPL v3, so everyone can take part in this little project if they want to!

Download

https://github.com/maxine-red/CLI621/releases

Unstable download

https://github.com/maxine-red/CLI621/tree/development

Issues or suggestions?

Just create a new issue here: https://github.com/maxine-red/CLI621/issues (suggestions go the same way~)

Or if you don't have a github account, mail them to [email protected]

Feel free to download and use this little helper. Even feel free to study my code and do your own work. Just tell people where you got your ideas from please. :3

But all in all, just have fun!

Sincerely, Maxie

Updated

maxine_red said:
(Ruby and bash are needed)

Do you actually need Bash as opposed to any other shell? I took a quick look and I only saw one file with a shebang line (/bin/post), and it specifies a Ruby environment.

Updated by anonymous

Suineder said:
Do you actually need Bash as opposed to any other shell? I took a quick look and I only saw one file with a shebang line (/bin/post), and it specifies a Ruby environment.

Not actually. You can use any other shell too. Though it is only tested with bash so far.

Updated by anonymous

maxine_red said:
Not actually. You can use any other shell too. Though it is only tested with bash so far.

Now just make an e621 login shell.

Edit: Oh, and make it display the image in terminal like ponysay does! :D

Edit again: Thanks for making this. At the very least, seeing people make use of the API motivates me to revamp it someday.

Updated by anonymous

spight said:
Now just make an e621 login shell.

Edit: Oh, and make it display the image in terminal like ponysay does! :D

Edit again: Thanks for making this. At the very least, seeing people make use of the API motivates me to revamp it someday.

A real login is in the next minor release, but the display of images is not a planned feature by now and probably not on the future.

A whole login shell just for e621 would be a little too much though, but I consider it. Something like "esh" x3

Thanks for mention me features though! I like to here what you guys want and see if I can realize it.

Updated by anonymous

Well, you don't really need in-client viewing when there are already decent framebuffer (and text-based, ha) console image viewers.

Anyway, I don't have any Linux environment right now, but I'll certainly try your downloader in a virtual machine pretty soon, probably some time today.

Updated by anonymous

Suineder said:
Well, you don't really need in-client viewing when there are already decent framebuffer (and text-based, ha) console image viewers.

Anyway, I don't have any Linux environment right now, but I'll certainly try your downloader in a virtual machine pretty soon, probably some time today.

Really thank you for your interest and I use it inside of s virtual machine too, as I don't have a Linux box at hand.

If you find any bugs, missing requirements or want to mention useful features, feel free to contact me via mail.

[email protected]

Updated by anonymous

maxine_red said:
Really thank you for your interest and I use it inside of s virtual machine too, as I don't have a Linux box at hand.

If you find any bugs, missing requirements or want to mention useful features, feel free to contact me via mail.

[email protected]

I haven't forgotten about CLI621, but I haven't had much time to work with the VM I set up either (a barebones Arch Linux system, in case you need to know). I mean, I've got your code downloaded and unpacked and it seems to work; I got a "Login failed" error but that could just be because I made a typo in passwd.json. I'll report back once I actually use CLI621's features.

Updated by anonymous

Suineder said:
I haven't forgotten about CLI621, but I haven't had much time to work with the VM I set up either (a barebones Arch Linux system, in case you need to know). I mean, I've got your code downloaded and unpacked and it seems to work; I got a "Login failed" error but that could just be because I made a typo in passwd.json. I'll report back once I actually use CLI621's features.

Actually, wait a bit with your testing or already use the release I pushed up.
Reason why: There is a login inside the app, that asks for both when nothing is mentioned in passwd.json.
Second reason is that I work on pool support and want to push out version 0.2 in the next couple of days. More to test!

Also, knowing it is arch linux helps a lot, because then there are already two distros tested.

Updated by anonymous

maxine_red said:
Actually, wait a bit with your testing or already use the release I pushed up.
Reason why: There is a login inside the app, that asks for both when nothing is mentioned in passwd.json.
Second reason is that I work on pool support and want to push out version 0.2 in the next couple of days. More to test!

Also, knowing it is arch linux helps a lot, because then there are already two distros tested.

Ah, sounds good.

Updated by anonymous

Version 0.2 is online now.

Some small bug fixes and streamlined things. The most significant part is that you can list and download pools too. Just use the "pool" command instead of "post".

Updated by anonymous

Seems I'm a little ahead of my schedule for v0.3

Prepare for the next release still this month, unless something horrible happens.

Updated by anonymous

By the way. If people want to help out or contribute their own code, they're highly welcome to do so.

Either message me over github.com or send your stuff at [email protected]

Updated by anonymous

And version 0.3 is released! Please try it out and talk about your experiences.

Updated by anonymous

Hey!

I'm looking for contributors for CLI621! If you're interested, let me know~

Updated by anonymous

Just as an announcement, I will only solve open issues and make one or two releases. After that I will stop development on this project and only deliver patches when needed.

This happens in favor of a set of other projects I have and the reason I don't see anyone here having actual interest. So I take my conclusion and put my energy into other projects.

Thanks for everyone who supported this project!

Updated by anonymous

Smittso said:
I have no idea how to use this -_-

That is no problem. Using this script is easy. Just switch into bin/ and run ./post or ./pool to get this script started.
You need a UNIX machine and the Ruby runtime.

Updated by anonymous

Just want to say that this project seems great and that I commend you on it.

But The problem is that I'm not tech savvy enough to use it, which is a shame. You lost me at "Platform: Linux/Unix-like (Ruby and bash are needed)." I'll stick to windows for now :P

Updated by anonymous

maxine_red said:
That is no problem. Using this script is easy. Just switch into bin/ and run ./post or ./pool to get this script started.
You need a UNIX machine and the Ruby runtime.

Yeah, I think you described accurately why very little interest has been shown in this. Windows is still the majority OS, and even among Linux users, few people have CLI skills (or even know what a commandline is)
Roughly the same set of people know how to do anything useful with a virtual machine.

Personally, I do run Linux exclusively, but the functions your system provides are not functions that I ever want to apply.

Mostly the only CLI / app based interaction with E621 I do is on tag projects -- I hook up ThumbsDown and Downthemall in a way that allows me to select an image in-browser for tagging with a given tag, in one click, I run through several pages selecting images, then I export the DownThemAll list and queue it up for tagging using my E621 interaction Python API and tagging-queue-monitor, which tags things as is possible, pausing appropriately when tagging quota is temporarily exhausted.

Updated by anonymous

Tokaido said:
Just want to say that this project seems great and that I commend you on it.

But The problem is that I'm not tech savvy enough to use it, which is a shame. You lost me at "Platform: Linux/Unix-like (Ruby and bash are needed)." I'll stick to windows for now :P

savageorange said:
Yeah, I think you described accurately why very little interest has been shown in this. Windows is still the majority OS, and even among Linux users, few people have CLI skills (or even know what a commandline is)
Roughly the same set of people know how to do anything useful with a virtual machine.

Personally, I do run Linux exclusively, but the functions your system provides are not functions that I ever want to apply.

Mostly the only CLI / app based interaction with E621 I do is on tag projects -- I hook up ThumbsDown and Downthemall in a way that allows me to select an image in-browser for tagging with a given tag, in one click, I run through several pages selecting images, then I export the DownThemAll list and queue it up for tagging using my E621 interaction Python API and tagging-queue-monitor, which tags things as is possible, pausing appropriately when tagging quota is temporarily exhausted.

That is true, Windows is the most OS and even less people use command line. I have to admit I thought that I get more interest than I had to expect, but I like to explain a few things.

First of all, I suck at GUIs and hard. Every attempt on creating one failed sooner or later. CLI is the one environment, where I get some success of my own in an UI.

Second thing is that I use Windows mostly myself, but honestly. Windows has a rather poor command line interface and even less people use that.

Third of all, this started as a private project turned public. Just for everyone to know.

PS: Opened a new issue to solve a bug (some code got broken).

Updated by anonymous

maxine_red said:
That is no problem. Using this script is easy. Just switch into bin/ and run ./post or ./pool to get this script started.
You need a UNIX machine and the Ruby runtime.

So basically, i need:
Linux
UNIX (Maybe it's a build of linux)
Some virtual box to run it
Ruby run-time
And this program.

Damn this is alot for heaps of porn, sounds totally worth it

Edit: I'm on windows if that makes more sense now

Updated by anonymous

maxine_red said:
First of all, I suck at GUIs and hard. Every attempt on creating one failed sooner or later. CLI is the one environment, where I get some success of my own in an UI.

I think CLI is absolutely the sensible choice for a program like this. It's just that people don't necessarily get CLI, so GUI would be the choice that gets
users

Second thing is that I use Windows mostly myself, but honestly. Windows has a rather poor command line interface and even less people use that.

It does. But it is available by default. Not sure exactly how platform independent Ruby is, but if I'd written an equivalent program in Python (wouldn't be too hard with my existing API), I'm pretty sure it could run on Windows without anything more than a few tweaks to make it more platform-agnostic.

@Smittso:
Linux is a type of UNIX. You do not need both.

Updated by anonymous

savageorange said:
I think CLI is absolutely the sensible choice for a program like this. It's just that people don't necessarily get CLI, so GUI would be the choice that gets
users

GUI is what gets you users, but when you fail at GUI hard, you don't get any users anyway. This way I'm able to produce at least anything.

It does. But it is available by default. Not sure exactly how platform independent Ruby is, but if I'd written an equivalent program in Python (wouldn't be too hard with my existing API), I'm pretty sure it could run on Windows without anything more than a few tweaks to make it more platform-agnostic.

Also, Ruby is platform independent and works as well on Windows machines as on Linux ones. You just have to change the code minimal (color codes) and it should run on Windows as smoothly. But I know I wouldn't use that, so if anyone wants to do that. Feel free to do so. I won't add Windows command line support.

@Smittso:

Here a list of what you have to do:

  • Download a virtual machine program, like Oracle VM Virtualbox (which I use)
  • Download a working copy of a Linux distribution, like Debian or Ubuntu. There are many others too, but these two are those I recommend.
  • Set both, VM and distro, up. (Don't panic. Both are straight forward. If you run into trouble. Either ask or look on google. There are tons of good tutorials.)
  • Install ruby run time. (Which is as little as running 'sudo apt-get install ruby')
  • Download this script and run it.
  • Done!

Updated by anonymous

  • 1