SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-27-2010, 11:11 PM
bluenote bluenote is offline
Sage Aficionado
 
Join Date: Nov 2004
Location: Vancouver, canada
Posts: 336
Regex, pulling internet pages, dev environment

Hi guys

Sorry for the newbie questions. I've had a look through the manual and done just a little searching in this forum but didn't find what I was looking for. I'm considering dipping my toe in to write a couple of imports, but right now, with 0 minutes studio time, I'm trying to evaluate the scope of what I would like to do.

1) I can't imagine anybody is developing on their living room sage install, of which mine is currently just running in service mode without any sagetv.exe GUI aside from my extender in the bedroom. What are people doing for a dev environment? I'm half inclined to use VMware to keep everything nice and self contained. Am I going to have licensing issues? Can I use studio through placeshifter?

My primary focus is going to be on leveraging data outside of sage for which I will need to be able to :

2) pull the contents of a URL (html) in some form that can be either imported, or accessed

3) use regex to interpret the data I want into a usable form

I couldn't find any likely terms in the studio manual, so I'm guessing that I have to go outside of studio to do stuff like this. Is this right?

I have two projects in mind. The first is some kind of epguides.com interface, to see network schedules not dependent and further looking than the EPG.

Any comments would be really appreciated. If this functionality isn't available in a simple enough format for me to get started, it may end up being a little too much for me, as I'm not really a programmer although I have written a lot of code here and there in various environments.

thanks

Cory
Reply With Quote
  #2  
Old 01-28-2010, 01:55 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
1. You can launch Studio from Placeshifter, but the Studio window opens on the server and runs in your server process, so your server environment is not really insulated from mishaps that way. SageTV Client is a better choice for Studio development since it runs entirely locally, hitting the server only for media database and streaming functions.

2 & 3. Pretty much everything you need is available in Java runtime classes, which you can call directly from Studio code, or you can write your own Java classes to implement additional utility methods. Java runtime docs are at http://java.sun.com/javase/6/docs/api/.
__________________
-- Greg
Reply With Quote
  #3  
Old 01-28-2010, 02:04 AM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
With my comments, keep in mind I mostly write web server code in Java using the Eclipse IDE, I don't do much with Studio other than look at how the STV's use the Sage API's. Also, I used to use Windows but switched to Linux and had to change my habits since Linux does not have a real Sage client.

Quote:
Originally Posted by cnovak View Post
1) I can't imagine anybody is developing on their living room sage install, of which mine is currently just running in service mode without any sagetv.exe GUI aside from my extender in the bedroom. What are people doing for a dev environment? I'm half inclined to use VMware to keep everything nice and self contained. Am I going to have licensing issues? Can I use studio through placeshifter?
You can use Placeshifter with Studio but the application will be displayed on the server. With the Linux server it's possible to display Studio on my laptop by using a remote X session but I wouldn't recommend it for writing studio code.

Back when I used Windows, I ran the Sage client on my laptop and could launch Studio from there. That's the approach I would recommend. You're less likely to disturb the server and it's easier to set up.

Quote:
Originally Posted by cnovak View Post
My primary focus is going to be on leveraging data outside of sage for which I will need to be able to :

2) pull the contents of a URL (html) in some form that can be either imported, or accessed

3) use regex to interpret the data I want into a usable form

I couldn't find any likely terms in the studio manual, so I'm guessing that I have to go outside of studio to do stuff like this. Is this right?
Those types of things will need to be done mostly by calling into Java. See the Studio manual for instructions on how to call Java from Studio. If you're looking for how to do regexes in Java and for regex syntax, start with the Pattern class' Javadoc.

If you're going to interact with Java APIs a lot, once you get more comfortable with the environment IMHO it would probably be better to write most of the code in Java (packaging it in a JAR) then "glue" it together from Studio. This is the approach being taken in the Phoenix project you may have read about on the forums. It's moving a lot of common code from Studio into Java in order to make STV's easier to write and maintain.

Quote:
Originally Posted by cnovak View Post
I have two projects in mind. The first is some kind of epguides.com interface, to see network schedules not dependent and further looking than the EPG.

Any comments would be really appreciated. If this functionality isn't available in a simple enough format for me to get started, it may end up being a little too much for me, as I'm not really a programmer although I have written a lot of code here and there in various environments.

thanks

Cory
These are pretty high-level answers only covering what I'm familiar with and probably assume a level of background you don't have yet. But keep searching the forums, reading the Studio doc, looking at example code from plugin authors, and asking questions here - you'll get the info you need.

Hopefully that gives you a start.
Jason
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #4  
Old 01-28-2010, 10:24 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
I will second getting a client that is the best place to do development IMHO.
Reply With Quote
  #5  
Old 01-28-2010, 03:03 PM
bluenote bluenote is offline
Sage Aficionado
 
Join Date: Nov 2004
Location: Vancouver, canada
Posts: 336
Thanks guys, I really appreciate the education and advice, although I'm disappointed that its confirmed this will be more complicated than I hoped.

I've never used java before so I'm a little intimidated at this point about learning two environments. It sounds like if I just want to jump right in I should write a self contained JAR that returns the info I am looking for -- breaking the job up into two parts and letting me concentrate on learning the java end first.

I've installed eclipse before actually, but for use with PHP. I'd like something that holds my hand a little though, at least with the help and reference built in to the IDE? I have visual studio 2005 kicking around somewhere but the CD is missing atm, and I dont think they have an actual java implementation, just J# or something.

Anyone have any suggestions for a nice simple IDE that perhaps includes a reference? My second choice woudl be an IDE that doesn't need to be customized to point to external compilers or interpreters, so at least I can just install and use an online reference to write code, then press Run. Am I dreaming?

Cory
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Initial dev environment suggestions dan596 SageTV Studio 7 03-23-2011 12:57 PM
RegEx for Favorites? matterw SageTV Software 2 01-23-2010 11:47 PM
Teletext Pages athos SageTV Software 1 11-07-2008 01:19 PM
Regex in Favorites??? zoundz SageTV Software 0 10-20-2008 10:56 AM


All times are GMT -6. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.