Welcome to the Firenze User Guide. This User Guide will introduce you to the basics of Firenze, and will help you to better enjoy your experience with it. Firenze is a cross-platform Podcast command line receiver.
With Firenze you can easily Subscribe to your favorite Podcast feeds and reveive them.
There is no gui in the works, and because of the intended simplicity of this program, one is not planned in the future either.
Also, Firenze is not intended to replace any other Podcaster receiver (like juice, jpodder or itunes). Firenze has the single goal of downloading enclosures from subscripted feeds fast and efficiently.
List of features
- Simplicity and ease of use
- Command-line scriptable
- Multi Platform program (Java based)
- Highly configurable for advanced users with full support of JSR-223 java scripting language like groovy.
- Extracting additional informations from url with xquery support
- User-defined destination file and folder name (support for all rss tags included itunes tags)
- User-defined download condition
- Multiple simultaneous downloads
- Conditional download
- Split mp3 file after download
- Launch command after download
- Proxy Server support
- Scheduled downloads
System requirements
For the current version of Firenze, you will need a JDK version 5.0 or higher.
Installing Firenze
- download a binary distribution of Firenze and unpack it into some directory on your local file system. We call FIRENZE_HOME the directory you unpacked the distribution
- set the JAVA_HOME environment variable. This should be set to the directory where your JDK is installed
- you should now have Firenze installed properly
Running Firenze
Running Firenze from the command-line is simple : just launch the batch FIRENZE_HOME/firenze.bat . The first time you launch firenze, the programm ask you for creating the firenze configuration file : Just type y. A file called firenze-config.xml has been created in the FIRENZE_HOME directory.
Configuring Firenze
A configuration file called firenze-config.xml is necessary to use Firenze.- edit the FIRENZE_HOME/firenze-config.xml file
- modify the values of the attributes in the file by your own values
Download settings
- dir : the root folder into which Podcasts will be downloaded
- maxdownloads : maximal simultaneous downloads per session (recommended options range between 1 and 5). These setting can be very useful in improving download performance.
Feeds declaration
- id : unique identifier for the feed.
- url : url address of the Podcast feed.
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml"/>
</feeds>
</firenze-config>
You can declare several feeds if you want. Be careful ! The id attribute of the feed must be unique.
Example of a firenze-config.xml with several feeds
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml"/>
<feed id="masque" url="http://radiofrance-podcast.net/podcast/rss_14007.xml"/>
<feed id="cdslejournal" url="http://podcast.rtl.fr/cestdanslejournal.xml"/>
</feeds>
</firenze-config>
HowTos (Advanced use of Firenze)
- How to set the destination sub-folder
- How to define my own file name (with itunes tags)
- How to set a download condition
- How to split a downloaded enclosures
- How to define a new Firenze property
- How to define a configuration for all feeds
- How to use a scripting language in Firenze
- How to extract informations from url with xquery
- How to have multiple configurations
- How to launch a command after download
- How to override existing file
- How to disable a feed
- How to set a download timeout
- How to set a proxy
- How to schedule Firenze
Setting the destination sub-folder
By default, all enclosures are downloaded in the same directory. You can set a subfolder by adding a destinationfolder element like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<destinationfolder>OnReeeefait$feed.titleLeMatch</destinationfolder>
</feed>
</feeds>
</firenze-config>
This element contains a pattern expression .
If a name in the expression starts with $ it is a Firenze property.
A property is replaced at runtime by the corresponding value. A pattern may be composed of multiple properties and static string.
Here is the list of the properties managed by Firenze. Note that all informations (including itunes tags) are supported :
Name | Description | Type |
$baseName | base name of the destination file | String |
$enclosure | current enclosure | com.sun.syndication.feed.synd.SyndEnclosure |
$enclosure.length | enclosure length (in bytes) | long |
$enclosure.type | enclosure type | String |
$enclosure.url | enclosure URL | String |
$enclosureIndex | zero-based index of the current enclosure in the entry | String |
$entry | current entry | com.sun.syndication.feed.synd.SyndEntry |
$entry.author | entry author | String |
$entry.description | entry description | String |
$entry.link | entry link | String |
$entry.publishedDate | entry published date | java.util.Date |
$entry.title | entry title | String |
$entry.updatedDate | entry updated date | java.util.Date |
$entry.uri | entry uri | String |
$entryIndex | zero-based index of the current entry in the feed | String |
$entry_itunes.author | corresponding to itunes:author tag including in the item element | String |
$entry_itunes.keywords | corresponding to itunes:keywords tag including in the item element | String |
$entry_itunes.duration | corresponding to itunes:duration tag including in the item element | String |
$entry_itunes.subtitle | corresponding to itunes:subtitle tag including in the item element | String |
$entry_itunes.summary | corresponding to itunes:summary tag including in the item element | String |
$ext | extension of the destination file | String |
$feed | current feed | com.sun.syndication.feed.synd.SyndFeed |
$feed.author | feed author | String |
$feed.copyright | feed copyright | String |
$feed.description | feed description | String |
$feed.encoding | feed charset encoding | String |
$feed.feedType | feed type | String |
$feed.language | feed language | String |
$feed.link | feed link | String |
$feed.publishedDate | feed published date | java.util.Date |
$feed.title | feed title | String |
$feed.uri | feed uri | String |
$feedId | feed identifier | String |
$feed_itunes.author | corresponding to itunes:author tag including in the channel element | String |
$feed_itunes.subtitle | corresponding to itunes:summary tag including in the channel element | String |
$feed_itunes.summary | corresponding to itunes:summary tag including in the channel element | String |
$file | destination java.io.File object | java.io.File |
$filePath | destination file path | String |
$history | history associated with the current feed | org.firenze.HistoryData |
$history.lastDownloadDate | last download date for the current feed | java.util.Date |
$history.lastPubDate | last published date for the current feed | java.util.Date |
$history.downloadedUrls | list of downloaded urls for the current feed | java.util.List |
Firenze supports JSR-223 java scripting language expression for these patterns. groovy is the most famous java scripting language. Just add the extension or the name of the language you want to use in the attribute type to mean that you use this syntax (see the complete list of java scripting language here). The same example with the groovy syntax :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<destinationfolder type="groovy">"OnReeeefait"+$feed.title+"LeMatch"</destinationfolder>
</feed>
</feeds>
</firenze-config>
More generally, Firenze accepts all scripting languages supported by BSF (Bean Scripting Framework). Just add the BSF engine class name in the attribute type.
Setting the destination file
By default, the destination file name is the same as on server. You can set another file name by adding a destinationfile element like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<destinationfile>OnRefait$entry_itunes.subtitle$ext</destinationfile>
</feed>
</feeds>
</firenze-config>
Firenze supports JSR-223 java scripting language expression for these patterns. groovy is the most famous java scripting language. Just add the extension (or the name) of the scripting language you want to use in the attribute type. The same example with the groovy syntax :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<destinationfile type="groovy">"OnRefait"+$entry_itunes.subtitle+$ext</destinationfile>
</feed>
</feeds>
</firenze-config>
More generally, Firenze accepts all scripting languages supported by BSF (Bean Scripting Framework). Just add the BSF engine class name in the attribute type.
Setting a download condition
By default all feed enclosures are downloaded. You can add a download condition to limit the number of enclosures to download (and not to download the same enclosure twice). For all feeds, Firenze stores the following informations about the already downloaded enclosures in its history database (located in USER_HOME/firenze/history.properties (where USER_HOME is your home directory)) :
- $history.lastPubDate : the more recent published date of the downloaded enclosures
- $history.lastDownloadDate : the more recent download (ie the last) date for this feed
- $history.downloadedUrls : list of the urls of the downloaded enclosures
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)
</downloadcondition>
<destinationfile type="groovy">"OnRefait"+$entry_itunes.subtitle+$ext</destinationfile>
</feed>
</feeds>
</firenze-config>
If you want to download all enclosures you don't have already, add a downloadcondition element like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<downloadcondition type="groovy">$history.downloadedUrls.indexOf($enclosure.url) == -1
</downloadcondition>
<destinationfile type="groovy">"OnRefait"+$entry_itunes.subtitle+$ext</destinationfile>
</feed>
</feeds>
</firenze-config>
If you want to download only the first (top) enclosure in the feed, add a downloadcondition element like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<downloadcondition type="groovy">$entryIndex == 0</downloadcondition>
<destinationfile type="groovy">"OnRefait"+$entry_itunes.subtitle+$ext</destinationfile>
</feed>
</feeds>
</firenze-config>
Splitting a downloaded enclosures
If the downloaded enclosures is a mp3 file, you can split it into several parts by adding a splitaction element like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)</downloadcondition>
<destinationfile type="groovy">"OnRefait"+$entry_itunes.subtitle+$ext</destinationfile>
<splitaction deleteOnExit="true" range="00.00 15.00 25.00 35.00 EOF" />
</feed>
</feeds>
</firenze-config>
The range attribute contains all the split points (MM.SS format or EOF to specify the end of file). You can set the attribute deleteOnExit to "true" if you want to delete the original file after splitting.
Instead of range, you can specify the number splitting parts like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)</downloadcondition>
<destinationfile type="groovy">"OnRefait"+$entry_itunes.subtitle+$ext</destinationfile>
<splitaction deleteOnExit="true" nbParts="10" />
</feed>
</feeds>
</firenze-config>
You can also specify the preferred size of each part (format MM.SS) like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)</downloadcondition>
<destinationfile type="groovy">"OnRefait"+$entry_itunes.subtitle+$ext</destinationfile>
<splitaction deleteOnExit="true" partSize="10.00" />
</feed>
</feeds>
</firenze-config>
If you want to retrieve only the last ten minutes of the feed, add the attribute fromEnd like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)</downloadcondition>
<destinationfile type="groovy">"OnRefait"+$entry_itunes.subtitle+$ext</destinationfile>
<splitaction deleteOnExit="true" fromEnd="true" range="00.00 10.00" />
</feed>
</feeds>
</firenze-config>
Defining a new Firenze property
You can define another Firenze property from constant and already existing property. To format a date, add the pattern attribute (accept a SimpleDateFormat expression).
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<setproperty name="newProps">MyNewProperty$entry.title</setproperty>
<setproperty name="fmtPubDate" pattern="dd-MM-yyyy">$entry.publishedDate</setproperty>
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)</downloadcondition>
<destinationfile type="groovy">$newProps+$fmtPubDate+".mp3"</destinationfile>
</feed>
</feeds>
</firenze-config>
You can then use it anywhere else like another Firenze property. Firenze supports JSR-223 java scripting language expression for these patterns. groovy is the most famous java scripting language. Just add the extension (or the name) of the scripting language you want to use in the attribute type. The same example with the groovy syntax :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<setproperty name="newProps" type="groovy">"MyNewProperty"+$entry.title</setproperty>
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)</downloadcondition>
<destinationfile type="groovy">$newProps+$fmtPubDate+".mp3"</destinationfile>
</feed>
</feeds>
</firenze-config>
More generally, Firenze accepts all scripting languages supported by BSF (Bean Scripting Framework). Just add the BSF engine class name in the attribute type.
Defining a configuration for all feeds
These elements can be define for all feeds :
- setproperty
- downloadcondition
- destinationfolder
- destinationfile
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
<global-feed>
<setproperty name="fmtPubDate" pattern="dd-MM-yyyy">$entry.publishedDate</setproperty>
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)
</downloadcondition>
<destinationfile type="groovy">$entry.title+$fmtPubDate+".mp3"</destinationfile>
</global-feed>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml"/>
<feed id="2000ans" url="http://radiofrance-podcast.net/podcast/rss_14864.xml"/>
</feeds>
</firenze-config>
By default, all feeds use these settings. But each feed can then overridden some of these elements :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
<global-feed>
<setproperty name="fmtPubDate" pattern="dd-MM-yyyy">$entry.publishedDate</setproperty>
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)
</downloadcondition>
<destinationfile type="groovy">$entry.title+$fmtPubDate+".mp3"</destinationfile>
</global-feed>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml"/>
<feed id="2000ans" url="http://radiofrance-podcast.net/podcast/rss_14864.xml">
<destinationfile type="groovy">"2000ans"+$fmtPubDate+".mp3"</destinationfile>
</feed>
</feeds>
</firenze-config>
More about Scripting language
groovy is the most famous java scripting language. Its syntax is very near from java. You can use it to define new property, set a download condition or destination file name and folder. You can invoke method (such as substring() or replace()) on a firenze property like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
<global-feed>
<setproperty name="fmtPubDate" pattern="dd-MM-yyyy">$entry.publishedDate</setproperty>
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)
&& $entry.publishedDate.day == 4
</downloadcondition>
<destinationfile type="groovy">$entry.title+$fmtPubDate+".mp3"</destinationfile>
</global-feed>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml"/>
<feed id="2000ans" url="http://radiofrance-podcast.net/podcast/rss_14864.xml">
<destinationfile type="groovy">"2000ans"+$entry.title.substring(3)+$enclosure.url.replace("tata","")+".mp3"
</destinationfile>
</feed>
</feeds>
</firenze-config>
Note that the xml entities must be escaped in your scripts (type & for logical and). Firenze distribution provides groovy library. But it is possible to use another JSR-233 scripting languages. To use another scripting language :
- Copy the library(ies) of the language you want tu use (for example bsh.jar for beanshell) in the FIRENZE_HOME/lib directory
- Add the extension (or the name) of the language in the attribute type (for example bsh for beanshell).
Language | Name | Extension |
BeanShell | beanshell | bsh |
Groovy | groovy | groovy |
JudoScript | JudoScript | judo |
FreeMarker | FreeMarker | fm |
JEP | jep | jep |
Jawk | jawk | jawk |
Velocity | Velocity | vm |
XPath | xpath | xpath |
Jexl | jexl | jexl |
Jaskell | jaskell | jsl |
Scheme | scheme | scc |
JUEL | juel | juel |
Jacl | jacl | tcl |
Jelly | jelly | jelly |
Pnuts | pnuts | pnut |
Jython | jython | jy |
Extracting infos with xquery
Informations (for example title or subject of an enclosure) found in the feed is sometimes not enough. It would be great to retrieve this info from another url. Firenze provides a mechanism to do that. It uses the powerful xquery language.
Define a htmlproperty element and set the following attributes :
- name : this is the name of the property which stores the extracted info.
- url : this is the url of the page to parse.
- default : the default value for the property if the info to extract is not found, this value can contain pattern and others properties
Example of xquery : this expression extracts the contents of the td element following the td element which contains the value of variable $entry.title :
declare namespace xhtml="http://www.w3.org/1999/xhtml"; for $d in //xhtml:td where contains($d/text()[1], "$entry.title") return data($d/following-sibling::xhtml:td)
Note : xquery must always begin with xhtml namespace declaration to parse html page. If xquery returns more than one results, firenze takes only the first result. You can learn more about xquery language here and here.
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
<global-feed>
<setproperty name="fmtPubDate" pattern="dd-MM-yyyy">$entry.publishedDate</setproperty>
<setproperty name="slashPubDate" pattern="dd/MM/yyyy">$entry.publishedDate</setproperty>
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)
and $entry.publishedDate.day == 4
</downloadcondition>
<destinationfile type="groovy">$entry.title+$fmtPubDate+".mp3"</destinationfile>
</global-feed>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml"/>
<feed id="2000ans" url="http://radiofrance-podcast.net/podcast/rss_14864.xml">
<htmlproperty name="httpInfo" url="http://www.radiofrance.fr/franceinter/em/2000ansdhistoire/archives.php" default="$entry.title">
<xquery>
declare namespace xhtml="http://www.w3.org/1999/xhtml";
for $d in //xhtml:strong
where contains($d/text()[1], "$slashPubDate")
return data($d/following-sibling::xhtml:a)
</xquery>
</htmlproperty>
<destinationfile type="groovy">"2000ans"+$httpInfo</destinationfile>
</feed>
</feeds>
</firenze-config>
Having multiple configurations
Several users can share the same computer and each can use firenze with its personal configuration. Just move your firenze-config.xml in USER_HOME/firenze (where USER_HOME is your home directory, create sub-folder firenze if it does not exist). First Firenze looks for a firenze-config.xml file in your home directory. If not found, firenze looks for the default firenze-config.xml (located in FIRENZE_HOME directory).
Launching a command after download
You can launch a command (or several commands if you want) after downloading. for example if you want to reencode mp3 file, Just add a postdownloadaction element like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml">
<downloadcondition type="groovy">$entry.publishedDate.after($history.lastPubDate)</downloadcondition>
<destinationfile type="groovy">"OnRefait"+$entry_itunes.subtitle+$ext</destinationfile>
<postdownloadaction type="Exec">"C:\lame\lame.exe" --vbr-new --scale 5 -V 0 "$filePath"
-d "$file.parent/$baseName.temp$ext"</postdownloadaction>
</feed>
</feeds>
</firenze-config>
Overriding existing file
By default, Firenze overrides an existing file with the current downloading file. If you do not want to override an existing file, just add the attribute overriddenFile in the download element and set it to "false" :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5" overriddenFile="false"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml"/>
</feeds>
</firenze-config>
Disabling a feed
You can temporarily disable a feed. Firenze will not check this feed but your configuration will not be lost. Set the enabled feed attribute to "false". If you want then to re-enable this feed, set this attribute to "true" :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml" enabled="false"/>
</feeds>
</firenze-config>
Setting a download timeout
You can add a download timeout (in seconds) like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5" timeout="300" />
<proxy host="host.myproxy" port="2525"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml"/>
</feeds>
</firenze-config>
Setting a proxy
Add the proxy host and port like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<firenze-config xmlns="http://berlios.de/ns/firenze/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://berlios.de/ns/firenze/ firenze-config.xsd ">
<settings>
<download dir="C:/downloads" maxdownloads="5"/>
<proxy host="host.myproxy" port="2525"/>
</settings>
<feeds>
<feed id="onrefait" url="http://podcast.rtl.fr/onrefaitlematch.xml"/>
</feeds>
</firenze-config>
Scheduling Firenze
Firenze is a command line utility, just add it in your preferred schedule service (at, crontab, etc ...) !