Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jbrave
Channel Surfer

Re: bash scripts to upload and delete from the roku menu

"manoflinux" wrote:
My point in doing this is to make a script for my editor so when I am done with some brightscript I can hit an option in my editor and it will run a script and package up the brightscript and send it to all my rokus's(all two of them) in one fell swoop.


I would love to have my editor (jedit) run a make install whenever I save, actually. I'm sure there is a way to do it.

-Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
gonzotek
Visitor

Re: bash scripts to upload and delete from the roku menu

"dynamitemedia" wrote:
i have said here many times i use windows, i understand your guys intentions and that great. but i am ok with the 2-5 seconds of click browse and upload. I am not in that much of a hurry.
Hey, it's your rig, do what you like. 🙂 But there's always room for improvement, and if you wanted to try (or someone else does), I was looking for specifically what version of windows(the "Send to" folder is in different places under XP, Vista and 7) and what editor for coding do you use? For instance, I use Crimson Editor (and sometimes Notepad++) under Windows 7. I know, for me, because I am not very comfortable with Brightscript, when I am trying things, I am constantly changing a small piece of code over and over until I get the results I want, and I might do as many as 30 (just slightly different) versions in an hour. Switching away from my editor to zip in explorer, then upload in the browser, takes both my time and my concentration away from the goal of improving my code.
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos
gonzotek
Visitor

Re: bash scripts to upload and delete from the roku menu

"jbrave" wrote:
"manoflinux" wrote:
My point in doing this is to make a script for my editor so when I am done with some brightscript I can hit an option in my editor and it will run a script and package up the brightscript and send it to all my rokus's(all two of them) in one fell swoop.


I would love to have my editor (jedit) run a make install whenever I save, actually. I'm sure there is a way to do it.

-Joel
Looks like you could write a macro to save, then zip and upload. The jedit user's guide has details: http://www.jedit.org/users-guide/index.html
And here's a blog post that looks helpful: http://hasseg.org/blog/post/96/jedit-ma ... compilers/
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos
manoflinux
Visitor

Re: bash scripts to upload and delete from the roku menu

all that arguing and at least one person got help, at least indirectly. wonderful.
its always good to brainstorm about a subject publicly, no telling what sort of solutions will come out of it.
0 Kudos
manoflinux
Visitor

Re: bash scripts to upload and delete from the roku menu

if you have root and are at home you can do this to show all the rokus on the network, just replace 192.168.0.* with your network info.
sudo nmap -O 192.168.0.*|grep "MAC Address:\|report for"|grep -i -B 1 roku

And yes you windows guys can do this to. http://nmap.org/book/inst-windows.html
just don't do it at work. and if you do don't blame me if you get a visit from your network admin.
If you are the network admin, don't worry about it. 😉
0 Kudos
manoflinux
Visitor

Re: bash scripts to upload and delete from the roku menu

here is a program to package a script up and download the package from the "Application Packager" menu.

packageroku ()
{
uagent='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)';
ftime=$(($(date +'%s')*1000)) ;
if [ "$1" ] && [ "$2" ] && [ "$3" ] && [ ${#1} -lt 32 ]; then
purl=$(curl --silent --show-error --user-agent "$uagent" --form "app_name=$1" --form "passwd=$2" --form "pkg_time=$ftime" --form "mysubmit=Package" "http://$3/plugin_package" |grep "href"|grep -v "plugin_inspect\|plugin_install"|awk -F 'href="' '{ print $2 }'|tr '"' '\n'|head -n1 😉 ;
wget http://$3/$purl ;
else
echo -e "app name too large or two few arguments format is\npackageroku appname dev_password IPaddress_of_ROKU ";
fi
}

example use:
just replace roku01.local the ip of your roku if you dont have a name for it.

$delroku roku01.local
Delete Succeeded.
$uproku videoplayer.zip roku01.local
Application Received: 127030 bytes stored.
size on disk is 127030 bytes
$packageroku 'sample video player' 'your_dev_password' roku01.local
--2011-04-29 13:50:24-- http://roku01.local/pkgs/somepackage.pkg
Resolving roku01.local... 192.168.0.24
Connecting to roku01.local|192.168.0.24|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 130000 (127K) [text/plain]
Saving to: `somepackage.pkg'

100%[==========================================================================================>] 130,000 --.-K/s in 0.02s

2011-04-29 13:50:24 (5.25 MB/s) - `somepackage.pkg' saved [130000/130000]
0 Kudos
destruk
Binge Watcher

Re: bash scripts to upload and delete from the roku menu

For testing purposes, I probably do an actual build of a channel once per week. It's a handful of channels, and I test through my code a lot before I even put it on a box or package it. I use NOTEPAD/windows, ha, oldschool me, has the features I need, and zip it up after I verify logic and that works for me. I use notepad for building the web server/php, notepad for the manifest, I changed all the rich text files into actual unicode files for notepad too. And the webpage works fine too. So I'm probably underqualified to even touch linux, but I have my own system and time isn't an issue as I don't mass install to thousands of boxes at a single go either....perhaps I'm just too stupid to change old habits. 🙂 I do write scripts to do routine database operations like backup and restore, and php scripts to create/clear tables in mysql, and I do use ubuntu on a limited basis for alternate projects unrelated to roku with a hotswap drive bay, but I really don't want to go all lowlevel sudo techno ninja on using bash shell scripts - that's just my own choice as my brain has to hold a whole lot of relevant info on other topics.
0 Kudos
manoflinux
Visitor

Re: bash scripts to upload and delete from the roku menu

thats fine, its a free country. use windows or Linux or BeOS or MorphOS or whatever.
I am sure there are people that will disagree with you and want some sort of automation.
But I am also sure there are people that agree with you.
Those people dont have to use mine or gonzo's ideas. I just think you would have an easier time if you did.
But you disagree and we can leave it at that.

I have said it before these scripts are just part of a whole package I am building to integrate brightscript development into kate.
Once I got that done I can start learning brightscript in better detail. Since I will then have an effortless Dev environment it will make my task much easier. .
0 Kudos
dynamitemedia
Binge Watcher

Re: bash scripts to upload and delete from the roku menu

why don't you just try to learn brightscript? i also learned(?) using notepad and the debugger.

seems like your wasting more time trying to automate it or find an easier way then actually learn it. wouldn't be more effective learning brightscript and then learn how to automate it?
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
gonzotek
Visitor

Re: bash scripts to upload and delete from the roku menu

"dynamitemedia" wrote:
why don't you just try to learn brightscript? i also learned(?) using notepad and the debugger.

seems like your wasting more time trying to automate it or find an easier way then actually learn it. wouldn't be more effective learning brightscript and then learn how to automate it?
Separate issues. I think you'll find many professional and amateur coders will agree that using a source code editor can make you more productive, regardless of the language being used. I'll crib from wikipedia's article:
Source code editors have features specifically designed to simplify and speed up input of source code, such as syntax highlighting, autocomplete and bracket matching functionality. These editors also provide a convenient way to run a compiler, interpreter, debugger, or other program relevant for software development process. So, while many text editors can be used to edit source code, if they don't enhance, automate or ease the editing of code, they are not "source code editors," but simply "text editors that can also be used to edit source code."
Learning the language is clearly extremely important as well. But what manoflinux is doing here isn't only for himself. Once he completes his goal, anyone who uses the kate editor should have an easier time beginning with brightscript.

As an example of what source editors can do: Winamp has a scripting language for skinning, called Maki. Years ago, I created syntax highlighting rules files for Maki code for the Windows editor Crimson Editor, and submitted them to the Crimson Editor developer, who put them into the official releases. Now you can open up any maki script in crimson editor and have syntax highlighting making objects, methods, strings and constants stand out from one another. This makes it much easier to read the code, especially if it's someone else's code you aren't yet familiar with. I thought about doing the same for Brightscript, but Crimson Editor is kind of a dead project (although even without any major new features in several years, it's still very good ) and I don't think I could get the syntax files included in it like I did for Maki. I suppose I could host them and give people instructions on how to install them manually.
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos