A program to watch a designated RSS news flux and write each news in a .txt file in a chosen directory
Intro :
1 - executable made in C++ (preferable with MS Visual C++ 2003)
2 - must read an RSS flux and write each entry (news) in a .txt file . In the .txt file we will have the title and the content.
If the title+content has more than 4000 characters, only the first 4000 will be written
3 - must convert from Unicode to .txt ANSI (see language conversion) this problem must be solved/clarified before starting the project
4 - the program must have an .ini file located near the .exe so if both of them are going
to be moved , the program can work without problems
Things to be establish before starting the project :
1 - Conversion from Unicode to .txt ANSI
2 - News must be editable in the list . I prefer to have an easy way to do it (click on the cell and edit). If you want to have another aproach please contact me
3 - If you need some third-party library, we will agree to use it before starting the project
4 - For MD5 and for grid with a ckeck-box for each row contact me if you need support
## Deliverables
Intro :
1 - executable made in C++ (preferable with MS Visual C++ 2003)
2 - must read an RSS flux and write each entry (news) in a .txt file . In the .txt file we will have the title and the content.
If the title+content has more than 4000 characters, only the first 4000 will be written
3 - must convert from Unicode to .txt ANSI (see language conversion) this problem must be solved/clarified before starting the project
4 - the program must have an .ini file located near the .exe so if both of them are going
to be moved , the program can work without problems
Things to be establish before starting the project :
1 - Conversion from Unicode to .txt ANSI
2 - News must be editable in the list . I prefer to have an easy way to do it (click on the cell and edit). If you want to have another aproach please contact me
3 - If you need some third-party library, we will agree to use it before starting the project
4 - For MD5 and for grid with a ckeck-box for each row contact me if you need support
Some details :
Unicode to txt 8bit :
In order to assist the conversion from RSS UNICODE to regional specific .txt you can assume that Windows
settings are done properly (see the attached jpg.)
The .txt files and list rows must be deleted if are no longer present in the RSS so :
- If an item will be out of RSS will be erased as .txt from the directory and from the list
- Beside this, if the program starts and write some files on the directory , when will be closed the
files are still present in the directory. So, when program starts again, it must eliminate
the files that are not any more in RSS feed.
In order to accomplish that , a proper naming scheme must be adopted because
in the same directory more than one program can write .txt files .
The proposed naming algorithm may be appropriate for this by using an ID in the file name (see below)
A row from the list must have
- check-box
- file name (something like FLUX_NAME---year-day-hour-minute-sec---ID )
- news content
FLUX_NAME will be limited to 32 characters
year-day-hour-minute-sec must be read from RSS
ID is actually a MD5 for a string that contains all :
- program location (path+name of .exe)
- FLUX_NAME (already limited at 32 char)
- year-day-hour-minute-sec
- news content
There must be some settings like :
the user can choose : - to have the items already checked (so can be directly saved to directory as .txt files)
- to display the items unchecked and will be saved as .txt only when user will check it
Set locales :
In order to determine if your system is properly set on locales (for example for German), please proceed as following :
- open Notepad
- write the content that you like including some specific German characters
- save as .txt with ANSI encoding
- close Notepad
- open Notepad again and open the .txt file that you made
To set your locales go to Start->Settings->Control Panel->Regional ... and see the attached pictures.
Algorithm :
1 - Read the FLUX_NAME
2 - Read the RSS flux
3 - Write each new entry in the list.
4 - If an RSS item has already an item that has a corresponding .txt or .non file,
take the news content from file
5 - Old files must be deleted
(search after files with names beginning with FLUX_NAME ??? and extensions .txt and non)
Beside this :
6 - When an item is unchecked (if was checked) , rename the corresponding file from disk with .non instead .txt
7 - When an item is checked (if was unchecked), rename the corresponding file from disk with .txt instead .non ; if
it doesn't exist , create it with the content from corresponding item from the list
END of this presentation