Wednesday, 25th April 2012
Follow WikiJava on twitter now. @Wikijava

batBot:ParseRssAction

From WikiJava

Jump to: navigation, search

After each request it should be performed a configurable action on the returned HTML

Contents

Manager

User:DonGiulio is the manager for this requirement. Send DonGiulio an email

Feature Groups

create the parseRss Action

  • Image:Ok.png

find relevant results

make the ParseRSS find relevant results

  • Image:Ok.png

extract Data to a Job object

create Job Class

containing description, job title and contact email for the Job from the RSS

  • Image:Ok.png

populate the Job object

extract data from the rss (title, description and parse the description for the email)

  • Image:Ok.png

generate the Email to send

using Javamail one to the destination and one to myself.

request confirmation for the data

prompt the prepared email and ask the user for confirmation.

Thunderbird does that. Image:Ok.png

send the email

prepare a .bat file calling Thunderbird and prepopulating the email via command line.

  • Image:Ok.png


remember the already applied for jobs

in order not to apply twice to the same job

configure the saving of the processed items

add to the configuration.xml the name of the file where to save the processed items

  • Image:Ok.png

ParseRSS reads the configuration

and creates a file where it saves the info about the processed items, using the toString method

  • Image:Ok.png

check if an item was already processed

check the current item if it was already processed. if so ignore it. if it was not, add it to the file.

  • Image:Ok.png

design a more flexible configuration for the parseRSS Action

design a way to express in XML the parser for the RSS

we want:

  1. to generalize the quantity of information taken from each item.
  2. to send this data in order as parameters of the 'command to execute'
  3. to define the data to take as XPATH, and (if strictly necessary) as regular expressions

the goal is to be able to extract any quantity of information from the RSS by just properly configuring the configuration.xml file.

create tasks for the flexible configuration

populate the following feature

implement the flexible configuration

See also