BBQ Roaster Dev

Submitted scripts and programs
Forum rules
Your own work only.
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 » Wed Nov 06, 2013 2:49 pm

nice joe. question ... will they be saved to the ~/download directory? Or will that be configurable?

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 » Wed Nov 06, 2013 2:57 pm

I have to define a directory or else it's going to go in whatever the program was launched from...and since we're already parsing a config, might as well make the download location configurable as well. Is that what you'd prefer?
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

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 » Wed Nov 06, 2013 3:07 pm

yes, i would prefer that. that way if have or want to create media or video directory, can pop all in there and keep the clutter out of the blackhole known as ~/downloads.

I just pulled your latest and greatest. it was d/l'd right in $HOME

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 » Wed Nov 06, 2013 3:16 pm

On the test version, which I launch from a subdirectory via cli, it was downloaded into the directory that I ran it from. I'll work on this as the next practical step, thanks for the feedback.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

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 » Wed Nov 06, 2013 3:18 pm

yepper.

I run from dmenu, so I guess if not specified, ie, running from /usr/bin, defaults to $HOME

Cool thanks for taking my feedback. Looking forward to next iteration

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 » Wed Nov 06, 2013 4:46 pm

Okay Drew, I added a single line at the end of the .roaster.conf file, which I pushed to the repo with the latest update. It's a simple 'y_dir' that is parsed along with d_dir. You can either copy the example from the git directory into your home directory as normal, or just hack in the last line to specify the 'media' directory (assuming you don't wish to overwrite the entire file.)

I now have that directory passed into the subprocess for youtube-dl, and have it keep the files as "Title.ext" wherever you specify. I may need to sanitize file names, so let me know if it downloads videos with some kind of un-type-able characters. For now, though, it is still only working on YouTube itself. I have more reading about the aforementioned websites on their wiki to see how to get it to use more of them.
|>>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 » Wed Nov 06, 2013 4:53 pm

Thanks Jay-Jay for the new implementation, I have yet to try it on my VPN'ed partition.
..gnutella..

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 » Thu Nov 07, 2013 4:38 am

Joe, just pulled in the latest. Error

Code: Select all

Traceback (most recent call last):
  File "/usr/bin/roaster", line 41, in <module>
    YT_DIR = Config.get("default_dir", "y_dir")
  File "/usr/lib/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'y_dir' in section: 'default_dir'

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 » Thu Nov 07, 2013 4:54 am

That's what I was talking about in the above post. Now that you have a new directory for youtube-downloads, you need to specify where it is. I gave an example ".roaster.conf" in the repo, which you can just copy over if you don't mind putting your custom stuff back in it.

Code: Select all

.-(~/roaster)------------------------------------------------(joe@darthsideous)-
`--> python roaster.py 
Traceback (most recent call last):
  File "roaster.py", line 41, in <module>
    YT_DIR = Config.get("default_dir", "y_dir")
  File "/usr/lib/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'y_dir' in section: 'default_dir'
zsh: exit 1     python roaster.py
.-(~/roaster)------------------------------------------------(joe@darthsideous)-
`--> cp .roaster.conf ~/.roaster.conf 
.-(~/roaster)------------------------------------------------(joe@darthsideous)-
`--> python roaster.py 
BOOM, takes off running. You can just copy the last line from the example .roaster.conf into your current ~/.roaster.conf and tweak as needed.

The last line in your ~/.roaster.conf should be something like:

Code: Select all

y_dir : ~/Downloads/youtube/
which would put the files grabbed by the youtube-dl option into the specified location.

Edit: I could perform some makefile wizardry to check to see if the user already has the configuration file in either of the locations, and if so then append a default line to the end of them...but that seems very invasive to me. Would it help if I made the default config example non-hidden, just as a reminder that it's there? Really this issue comes from being at the transitional point in development, where you're using the newer program and reading the older config file which doesn't contain items that it needs to work. (LOL, contact the package maintainer. Ha ha ha!)

@MB: Proxy support may be questionable for now. It looks like we could pass the 'http://proxy_machine_name:port/.' variable to youtube-dl, and it would work, but I don't use a proxy and thus don't have a good way to test this out.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

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 » Thu Nov 07, 2013 6:23 am

hmmm, that is exactly what I did. And changed it to this. Either way though, same error

Code: Select all

 # Set the default directory for "wget_it" as 'd_dir'
 # Set the default directory for "youtube-dl" as 'y_dir'
 [default_dir]
 d_dir : ~/downloads/
 #y_dir : ~/Downloads/youtube/
 y_dir : ~/media

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 » Thu Nov 07, 2013 6:28 am

Well, that makes this a lot more fun to figure out! Just for a quick test, try:

Code: Select all

sudo cp ~/.roaster.conf /etc/roaster.conf
as it may be failing to parse your local config after the global. (I'm guessing, because I am not having this problem...and I switched systems and pulled it in to be sure.)

Edit: I would like some screencaps of the fails, some term "cat" commands for the config, and such if this continues. If everything is set up right, I need to be able to see what the difference is, if you'd be so kind.
Image
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

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 » Thu Nov 07, 2013 6:37 am

That was it. Thanks. Interesting b/c until this latest version had not experienced this ....

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 » Thu Nov 07, 2013 6:40 am

It SHOULDN'T do that. I'm going to see what I can do to prevent it. (If you check the code, it reads the local after the global, so the local should overwrite the global....but, I have an idea. Going to jack my own system up to see about making a fix. Thanks for the bug-sqashing help Drew.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

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 » Thu Nov 07, 2013 6:58 am

i got it. Found the culprit. It is first looking in /etc, then looks to ~/.roaster.conf. Whereas before I had and I believe the 'instructions' were to create ~/roaster/ and place .roaster.conf there, which is what I had. This must have been changed for this last version

Code: Select all

Config.read('/etc/roaster.conf')
Config.read(os.path.expanduser('~/.roaster.conf'))

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 » Thu Nov 07, 2013 10:44 am

It's sourced the user's ~/.roaster.conf since the first time that I added configuration (actually my 2nd push to the initial commit was this change), which is why I'm a bit bewildered as to how it was working before if it failed to work now. I could still perform a try/on_err/else for both directories to avoid the issue in the future, which would allow either file to work if they both don't error out.
Totally fun fact, you can check the diffs to see when each change was made on github to a repo.

Everything else working so far? Also, getting all of these damn sites to work on menu populate is going to be a pretty substantial. Anyone have favorites that I should cover first from This list? I may not compare every possibility so as to keep things snappy.
|>>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 » Thu Nov 07, 2013 11:21 am

Personally, i would only go for youtube. Or is there any other flash-video site worth to mention? I have no idea.
..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 » Thu Nov 07, 2013 11:43 am

Well, from the list, it looks like there's a bunch of porno sites that you can pull streams from. I'm just waiting for someone to be the first to say "......I'm gonna need to be able to save streaming porno." :)

The YouTube part is good to go, though. I'm going to finish out the process forks for wget-it (because it's actually a better option), and I'm happy with how it's working for now.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

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

Re: BBQ Roaster Dev

Unread post by rhowaldt » Thu Nov 07, 2013 12:10 pm

only other video-site i ever watch is Vimeo, and have no idea whether that is Flash-video too... but that would be one site that is worth it.
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
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: BBQ Roaster Dev

Unread post by DebianJoe » Thu Nov 07, 2013 12:17 pm

Vimeo is a possibility to be integrated.
http://rg3.github.io/youtube-dl/supportedsites.html
^^ All of these could be made to work, but each one being checked will slow down how fast the popup menu over links work.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

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

Re: BBQ Roaster Dev

Unread post by rhowaldt » Thu Nov 07, 2013 1:13 pm

yeah, i understand. i think, based on embedded content i come across on the webz, youtube and vimeo are the most linked to sites. but maybe this is simply depending on the kind of sites i visit...
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.

Post Reply