# Path: exe/engine/field.py
# class TextAreaField(FieldWithResources):
#     """
#     A Generic iDevice is built up of these fields.  Each field can be
#     rendered as an XHTML element
# 
#     Note that TextAreaFields can now hold any number of image resources,
#     which will typically be inserted by way of tinyMCE.
#     """
#     persistenceVersion = 1
# 
#     # these will be recreated in FieldWithResources' TwistedRePersist:
#     nonpersistant      = ['content', 'content_wo_resourcePaths']
# 
#     def __init__(self, name, instruc="", content=""):
#         """
#         Initialize 
#         """
#         FieldWithResources.__init__(self, name, instruc, content)
# 
#     def upgradeToVersion1(self):
#         """
#         Upgrades to somewhere before version 0.25 (post-v0.24) 
#         to reflect that TextAreaField now inherits from FieldWithResources,
#         and will need its corresponding fields populated from content.
#         """ 
#         self.content_w_resourcePaths = self.content 
#         self.content_wo_resourcePaths = self.content
#         # NOTE: we don't need to actually process any of those contents for 
#         # image paths, either, since this is an upgrade from pre-images!


import re
from exe.engine               import feedparser
from exe.engine.idevice       import Idevice
from exe.engine.field         import TextAreaField
from exe.engine.translate     import lateTranslate
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# ===========================================================================

"""
An RSS Idevice is one built from a RSS feed.
"""




# ===========================================================================
class RssIdevice(Idevice):
    """
    An RSS Idevice is one built from a RSS feed.
    """
    def __init__(self):
        Idevice.__init__(self,
                         x_(u"RSS"), 
                         x_(u"Auckland University of Technology"), 
                         x_(u"""The RSS iDevice is used 
to provide new content to an individual users machine. Using this
iDevice you can provide links from a feed you select for learners to view."""), 
                         u"",
                         u"")
        self.emphasis         = Idevice.NoEmphasis

# Path: exe/engine/field.py
# class TextAreaField(FieldWithResources):
#     """
#     A Generic iDevice is built up of these fields.  Each field can be
#     rendered as an XHTML element
# 
#     Note that TextAreaFields can now hold any number of image resources,
#     which will typically be inserted by way of tinyMCE.
#     """
#     persistenceVersion = 1
# 
#     # these will be recreated in FieldWithResources' TwistedRePersist:
#     nonpersistant      = ['content', 'content_wo_resourcePaths']
# 
#     def __init__(self, name, instruc="", content=""):
#         """
#         Initialize 
#         """
#         FieldWithResources.__init__(self, name, instruc, content)
# 
#     def upgradeToVersion1(self):
#         """
#         Upgrades to somewhere before version 0.25 (post-v0.24) 
#         to reflect that TextAreaField now inherits from FieldWithResources,
#         and will need its corresponding fields populated from content.
#         """ 
#         self.content_w_resourcePaths = self.content 
#         self.content_wo_resourcePaths = self.content
#         # NOTE: we don't need to actually process any of those contents for 
#         # image paths, either, since this is an upgrade from pre-images!


# Path: exe/engine/rssidevice.py
import re
from exe.engine               import feedparser
from exe.engine.idevice       import Idevice
from exe.engine.field         import TextAreaField
from exe.engine.translate     import lateTranslate

# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# ===========================================================================

"""
An RSS Idevice is one built from a RSS feed.
"""




# ===========================================================================
class RssIdevice(Idevice):
    """
    An RSS Idevice is one built from a RSS feed.
    """
    def __init__(self):
        Idevice.__init__(self,
                         x_(u"RSS"), 
                         x_(u"Auckland University of Technology"), 
                         x_(u"""The RSS iDevice is used 
to provide new content to an individual users machine. Using this
iDevice you can provide links from a feed you select for learners to view."""), 
                         u"",
                         u"")
        self.emphasis         = Idevice.NoEmphasis

        self.rss              = TextAreaField(x_(u"RSS"))