BBQ Roaster Dev

Submitted scripts and programs
Forum rules
Your own work only.
User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

BBQ Roaster Dev

Unread post by DebianJoe » Sat Jul 27, 2013 7:50 am

I thought I'd start a thread where you guys can keep up with the current state of Roaster. There's not really a dev corner here, and since the nature of this place is making cool shit for fun...I thought that I would start a thread where you guys can request features that I can ignore or tell you that's Fisher Price Baby's First Programming...do it yourself.

The Toolset:
Bacon hacked up a demo for the pywebkitgtk and rebranded it. It turns out, there is actually a pretty lightweight browser hiding in there.

The Mission so Far:

We need the ability to download images of girls in Lingerie.
Image

So, why not be able to pull ANYTHING with wget:
Image
(note: this is actually a horrible idea, but I'm rolling with it because if people are stupid enough to open a new http connection and recursively pull an entire webpage, then they should be able to. RMS approved freedom!) The mechanics are technically functional, just need a bit of tweaking with Roaster and potential options. I might also create an option to grab it with the urllib that is already being imported, but not really implemented in the orignial code.
Image

Questions:
So, do we want to have a single directory where everything is pulled in, like (~/wgetted) or do you want it to go straight into the user's home directory? What other problems do I need to tackle with this monstrosity of nested imports from cryptic libs that nobody has ever actually used in all of history?
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: BBQ Roaster Dev

Unread post by machinebacon » Sat Jul 27, 2013 8:27 am

Thanks for the thread.

I would prefer an own directory and - if not too hackish - creating directories inside. For example, downloading the distrowatch front page, the path would look like ~/Downloads/distrowatch.com/index.html etc etc (this is actually nothing else than "Browse Offline" in other browsers, isn't it)
Questions:
- (how) can we have a single file download option when right-clicked on a link opposed to loading the whole site, as alternative?
- I'd love to see a preference window to set the search and home page
- a history/bookmark function would be nice, too -- I guess this would work best by creating .db files like e.g. links2 does. It would be brilliant if these links2 .db files could be used with roaster. Reason: links2 is a default browser in recent (and future releases)
- if wget (for whatever reasons) does not do what you/we want, we can go with axel/aria or curl, or hack into surfraw :)
- let's phantasize: if there is wget, there's also wput. How cool would it be to have a frontend for wput. I have already tried something with a bash/dialog wrapper but got stuck. For the future I want to have alternatives for all common apps: using CLI tools and just add a frontend to them (dialog/yad/glade), for example an editor (there's already one called Spatula, which is more of a WYSIWYG thing), a frontend for wget/wput, a frontend for mutt/fetchmail/sendmail, and of course this browser :) As shit is moving towards gtk3 and qt5, the dependencies and bloat (yes, bite me for this word) are increasing steadily.

Maybe you also want to look at Cookbook, which is a static webkit viewer: http://linuxbbq.org/zerobin/?2e5e9a5efa ... W0FXpmdMM=

Actually we have a scripts section, I move it there and leave the shadow here :)
..gnutella..

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: BBQ Roaster Dev

Unread post by DebianJoe » Sat Jul 27, 2013 8:43 am

Actually, if your target has a directory structure, it would be automatically allocated inside whatever the target is. That should be easy.

If the target is hovered and is a link, then the target url can be passed as a string into wget, ie: {wget -P ~/foodir wtfeverurl.com} and would be pulled as whatever file-type it happens to be. If the target was .html, then you're exactly right about it being like the "view offline" option in other browsers.

I'll have to look at the links2.db and how the links are laid out there. I've already tied the bookmark menu item to some craptastic debugging code that lets you know that you've clicked on it and I'll play with how I can pass urls/uri to the files. I agree, if we can make it cross-platform, then that would be fantastic.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: BBQ Roaster Dev

Unread post by machinebacon » Sat Jul 27, 2013 8:45 am

Thank you Joe. Sounds very good already!
I've added some crap to my post above, by the way.

Edit: cool - seems (x)links2 uses a standard html and text file. Where did I get the .db idea from? Possibly mocp :)
..gnutella..

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: BBQ Roaster Dev

Unread post by pidsley » Sat Jul 27, 2013 8:47 am

Please don't dump crap in my home directory. Either a dedicated download directory (and I don't care what you call it) or directories inside, as bacon suggests. I'm fine with either one.

Please do add the ability to set the search and home page. I also wouldn't mind a "close roaster" option on the menu, for window managers that don't have a "close window" button (like sithwm, cwm and ratpoison) -- yes I know I can kill the window, but that just seems so rude.

Thanks for working on this.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: BBQ Roaster Dev

Unread post by machinebacon » Sat Jul 27, 2013 8:58 am

"Seems rude", you're so cute :)
Agree, there should be an exit entry or even a (X) close button. Quite easy to add it to the bar.
We usually have a ~/Downloads folder, so spam it there.
..gnutella..

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: BBQ Roaster Dev

Unread post by DebianJoe » Sat Jul 27, 2013 9:09 am

Got ya, ~/Downloads/ it shall be...unless the hostname is "littleboy" in which case I'll -r 10 layers deep into the home directory. :P

I've already got calls in to sys and os, so an "exit" option of some kind shouldn't be too difficult. I use cwm, and I have no idea what a toolbar even looks like on top of it yet. I keep "bbq Proof" on another partition just for these kinds of situations.

As soon as we get the big annoyances knocked out, then I'll start looking at integrating more cli-backends to options.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: BBQ Roaster Dev

Unread post by machinebacon » Sat Jul 27, 2013 9:13 am

Code: Select all

            add Exit button
            self.ExitBtn = gtk.ToolButton(gtk.STOCK_QUIT)
            self.ExitBtn.connect("clicked", destroy_cb)
            self.ExitBtn.set_tooltip_text("Exit")
            self.insert(gtk.SeparatorToolItem() ,-1 );
            self.insert(self.ExitBtn, -1)
            self.ExitBtn.show()
Something like this? Just guessing right now.
..gnutella..

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: BBQ Roaster Dev

Unread post by DebianJoe » Sat Jul 27, 2013 11:00 am

Okay, to test that I've got this right....Pidsley wants girl picture downloads to NOT go into his ~/ directory. So, we go to /wg/ to find a wonderful photo of a lovely young lady.
Image

and we right click on the thumbnail that we want to pull the full-size photo which is linked to...and "wget it"

Image

Note: feh opening from ~/Downloads/. That's where all "_wget_it" targets will go.

I still need to see what other arguments I can use as an argument vector, but at least the main goal has been satisfied.
Edit: Left basic targeting code available for review, so that Pids will know I was joking about the hostname thing. I don't want him getting mad and spamming the screenshot forums with 20MB builds out of anger. I'll tackle the close stuff tomorrow.

2nd Edit: Do you want custom settings and bookmarks for it in a .conf file? Everyone likes hacking config files, that's why people use Crunchbang instead of Mint: It makes you feel like you're a real programmer to change a config. Plus, that's a lot easier to set up than adding a bunch of gtk widgets everywhere.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: BBQ Roaster Dev

Unread post by pidsley » Sat Jul 27, 2013 2:56 pm

DebianJoe wrote:I've already got calls in to sys and os, so an "exit" option of some kind shouldn't be too difficult. I use cwm, and I have no idea what a toolbar even looks like on top of it yet. I keep "bbq Proof" on another partition just for these kinds of situations.
Just to be clear, I'd like an "exit" or "close" option on the right-click menu (the menu with "bookmark current" at the top of it) or an "exit" or "close" button on the roaster bar (maybe to the right of the "down" button). Something visible in a WM with undecorated windows.

I suppose I will need to learn more python now, if only to protect myself from DJ's malware.

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: BBQ Roaster Dev

Unread post by DebianJoe » Sat Jul 27, 2013 3:52 pm

I may make jokes about doing damage with it, but my code is not a joking matter. I won't do things that will cause any extra headache. You should still learn some python, though. It's too useful for hacking out little projects to ignore.

I'll get a menu option for exiting on the right click menu and then look into how we can do bookmarks. My pywebkitgtk is really rough, but from what I've read, nobody's is all that much better. It hasn't been developed at all in the last 4 years, so you have to take webkitgtk+ and figure out how those would translate to the python bindings. It took longer to add the option to the menu than to do everything on the backend.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: BBQ Roaster Dev

Unread post by pidsley » Sat Jul 27, 2013 4:04 pm

DebianJoe wrote:I may make jokes about doing damage with it, but my code is not a joking matter. I won't do things that will cause any extra headache. You should still learn some python, though. It's too useful for hacking out little projects to ignore.
I know you won't intentionally cause problems. You did make a comment about your code behaving badly if it recognized my test machine's hostname, and I assumed this was a joke and attempted to continue in that vein. I apologize, and will not make jokes about your code in the future.

If creating and using a config file is not difficult, I like that option. If you do this, can you put the download location in the config file so I can change it more easily than hacking the code? I don't use a ~/Downloads directory, and I'd rather not create one. If this is not easy, I can probably change the code myself.

I know just enough python to write some simple scripts and to be annoyed by the indentation fussiness. I stopped trying to learn more because there wasn't anything I wanted to do in python that I could not do in bash. If I ever find a project that requires python, I'll get back to it.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: BBQ Roaster Dev

Unread post by machinebacon » Sat Jul 27, 2013 6:29 pm

I'm okay with everything said here :D
..gnutella..

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: BBQ Roaster Dev

Unread post by DebianJoe » Sat Jul 27, 2013 8:35 pm

@Pidsley: No need to apologize, I was attempting much more subtle humor. At this point, either you're British and the humor being used is so dry that I don't get it anymore, or you're serious, in which case I can assure you...I cannot be offended. :D

I actually like the idea of using a config file for allowing a higher degree of "hackability." I do clearly remember an Arch update that rendered my Python config-parser useless, and since we're dealing with the volatility of rolling releases, I may set up a much more strict config file that uses line positioning to allow the user to set a series of environment variables. This also keeps dependencies from outside of the Python core to a minimum. If there is an extra line added to it via a random line return, though, it will break in a horrific manner. That in and of itself could be a lot of fun. I'll make the assumption that if someone is hacking on our base config for a BBQ program, that they either know what they're doing or should be punished for mistakes.

Python itself fits into a strange area in the grand scheme of programming languages. It's got a lot of things that I like (forced indentation excluded...but it fits the "There should be one, and preferably only one, obvious way to do something,"...so I can deal with it.) You can use an interactive shell like Lisp. You can manipulate outside programs, like Bash. You can make very large programs with non-included toolsets, much like C. It's not as good as any of these languages at doing any one thing, but it does them all at a very acceptable level. The one thing that I do prefer it for is that when I'm writing in Lisp, I'm thinking about lisp. When writing in C, I'm thinking about C. When writing in Python, I'm thinking about what I want to accomplish.

tl;dr. Config file for everything is cool, let's roll with that.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Re: BBQ Roaster Dev

Unread post by ivanovnegro » Sat Jul 27, 2013 9:40 pm

DebianJoe wrote:
tl;dr. Config file for everything is cool, let's roll with that.
Oh yes. Great work DJ.

User avatar
swftech
Sobe
Posts: 160
Joined: Wed Oct 17, 2012 12:40 pm
Location: S Florida

Re: BBQ Roaster Dev

Unread post by swftech » Sat Jul 27, 2013 10:08 pm

I'm just chiming in to say I'm glad we have a regular griller now that is heavy in to python. I think it's great DJ that your fuckin with roaster! Was just reading through some of the shit your trying to accomplish with it, like the right click to download images and have them go to a dedicated directory "downloads/misc/misc images/00/b/pron" and that alone is a cool feature to have. :D

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: BBQ Roaster Dev

Unread post by rhowaldt » Sat Jul 27, 2013 11:19 pm

@DJ: i love you.

as for Python, one thing that is sweet about it that wasn't mentioned is python+curses. i love that shit. this is an oldie, but lemme link it again for an example of what a nice thing i built with that: http://linuxnoob.freeforums.org/chords- ... -t100.html

anyway, really cool ideas from all of you here. Pidsley, the idea for the close-option is very sensible, i love that we're taking into account the more obscure WMs with this thing. i have no ideas of my own to add, that is if you can change the default download-location through the config-file, as i, too, do not enjoy ~/Downloads.

really enjoying reading this thread and the fact that the Roaster browser is now being developed.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: BBQ Roaster Dev

Unread post by dkeg » Sun Jul 28, 2013 12:17 am

I concur, great stuff. Very great project indeed, and you surely have plenty of testers here. Config file would fit nicely, maybe similar to dwb in the sense able to edit right from within the browser.

Work hard; Complain less

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: BBQ Roaster Dev

Unread post by DebianJoe » Sun Jul 28, 2013 6:00 am

Okay, for cwm/sithwm/ratpoison compatibility (because if there's anything we want to support, it's goodWMs that don't get in your way) I have the "Exit Roaster" tag added to any right-click menu that is used in WebView. It's not only a nice, clean exit...but if roaster is run from terminal, it will politely tell you "Exit the Roasting." I'm going to leave a lot of my debugging code in for a while, as it won't ever be noticed unless people are trying to figure out why something is going wrong. This way we can at least troubleshoot problems easier in the future.

Image

I'm starting to look at how I want to do a config file right now. Also, do you guys want me to push this up on github so that you can just pull new clones and try them out as we go?
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: BBQ Roaster Dev

Unread post by machinebacon » Sun Jul 28, 2013 8:04 am

Yes, that would be neat. Can you do me a favour and pastebin the new version*, so I can add it to the new Trollinger spin? No matter if the config file doesn't work yet, Roaster is ATM only a temporary browser and OK like this :)

Thanks Joe.

*) I'm in the PRC and sometimes git is blocked here (not intentionally, I believe)
..gnutella..

Post Reply