SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio

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
  #21  
Old 10-05-2008, 07:17 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by GKusnick View Post
Getting back to the main topic, it seems like it wouldn't be hard to write a script to pull down the online docs page by page to a local directory.
If anybody still cares, I've whipped up a quick Java app to do this. Run it as follows:

Code:
java -jar ApiDownloader.jar targetdir
where targetdir is the local directory path where you want the downloaded files stored. Remember to enclose the path in quotes if it contains spaces.

Source is included in the zip if you want to tinker.
Attached Files
File Type: zip ApiDownloader.zip (5.4 KB, 103 views)
__________________
-- Greg
Reply With Quote
  #22  
Old 10-05-2008, 07:26 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
Thanks for sharing it Greg. What tool do you use to automatically generate wrapper APIs from the javadoc?

I'm looking forward to trying stuckless' RPC APIs, too.
__________________
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
  #23  
Old 10-05-2008, 07:40 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
My wrapper generator is a purpose-built VB.Net app that uses an embedded browser control to download the pages and traverses the HTML DOM tree to build a description of each API class and its methods. I'm not trying to keep the source secret or anything like that; I just didn't think to include it in the Tools package because it's sort of a second-order tool that I figured nobody but me would ever need to run, hence no special need for open-source transparency. (That and the fact that I'm not sure how many people here are fluent enough in VB to make sense of it.)

This new API downloader is not based on that source (obviously). I started from scratch in Java because the problem isn't that complicated and I thought it would be more accessible this way.
__________________
-- Greg
Reply With Quote
  #24  
Old 10-05-2008, 09:25 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,587
Quote:
I'm looking forward to trying stuckless' RPC APIs, too.
You can test it out if you like. I've created another discussion thread for it.

I wasn't planning on releasing it as a stand-alone library, but as a part of another project... but given the that there are a couple of people expressing interest, I thought I'd release it and get some feedback.
Reply With Quote
  #25  
Old 10-06-2008, 09:45 AM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
You have both done some great work! The RPC APIs could really open up some possibilities for new plugins.

The reason I asked about the API generation is that I have been hand-coding API wrappers for the JSP tag library in the mobile web server. The tag library is incomplete because it's a tedious process, only adding wrappers as I need them. It would be nice to automate that. Nielm's webserver API's are the same way. (Both of them also provide additional utilities, though. The utilities could be split into a separate package to maintain a clean separation.)

The RPC APIs are another example of the need for automating the wrapper generation. I also would like to have a JSON wrapper, and I see in Sean's wiki that he plans to create that.
__________________
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
  #26  
Old 10-06-2008, 05:32 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,587
Quote:
The reason I asked about the API generation is that I have been hand-coding API wrappers for the JSP tag library in the mobile web server. The tag library is incomplete because it's a tedious process, only adding wrappers as I need them. It would be nice to automate that. Nielm's webserver API's are the same way. (Both of them also provide additional utilities, though. The utilities could be split into a separate package to maintain a clean separation.)
I realize this is once again off the original topic..... You mentioned about generating tag libraries.... The generator api in the RPC source can be extended to do just about anything. The code in the org.jdna.sage.api.generator package uses a 2 phase approach. The first is parsing/collecting, the second is generating. In my case, I wrote a SageAPI generator that gets passed the parsed data (metadata for classes and methods) and it churns out the generated API. When/If I do the json/xml generator, i'll just create another generator class for those, so you could create your own tag generator quite easily as well, as long as you can generate what you need from the metadata provided.
Reply With Quote
  #27  
Old 10-07-2008, 09:58 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally Posted by GKusnick View Post
Getting back to the main topic, it seems like it wouldn't be hard to write a script to pull down the online docs page by page to a local directory. This is in essence what the wrapper generators do.
I used wget (specifically, Cygwin's version)
Code:
wget --mirror http://download.sage.tv/api
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #28  
Old 10-07-2008, 10:36 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,587
Code:
I used wget (specifically, Cygwin's version)
gotta love command line tools
Reply With Quote
  #29  
Old 10-08-2008, 07:01 AM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
Quote:
Originally Posted by stuckless View Post
...so you could create your own tag generator quite easily as well, as long as you can generate what you need from the metadata provided.
Thanks, I'll look into it.
__________________
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
  #30  
Old 10-08-2008, 07:51 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,587
Quote:
Thanks, I'll look into it.
If you want help with it... send me a PM with your goals for autogenerating tags, and I'll try to help any way I can.
Reply With Quote
  #31  
Old 10-17-2008, 07:45 PM
phocker phocker is offline
New Member
 
Join Date: Sep 2007
Location: Eden Prairie, MN USA
Posts: 4
Hmmmmm

I had no idea that this small little question would start such a huge discussion...awesomeness!!!

paul
__________________
Paul Hocker - SageTV 6.2.7.149
Reply With Quote
Reply


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

Advanced Search
Display Modes

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
Where can I download the latest channel Icon for Dish Network thenewguy1979 SageTV Software 3 09-29-2008 08:47 AM
SageTV V6.3 is now available for Win/Linux! Narflex Announcements 1 03-07-2008 12:33 PM
Sage API RMI Server drjava SageTV Customizations 11 11-23-2005 11:35 AM
Unable to download 4.0 client Ralnee SageTV Software 2 11-06-2005 10:58 PM


All times are GMT -6. The time now is 05:28 PM.


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