# Yet Another Digit Software Archive



## nims11 (Jun 23, 2011)

I made my version of Digit Software archive which i call YADSA(Yet Another Digit Software Archive).(download link at the end of the post)
The software archive range from may 2010 to june 2011 (digit has not provided the spreadsheets for the dvds of previous issues, which i used to generate the archive. DIGIT has provided a list of softwares by name though).
Its a command line tool (i don't know any GUI framework currently, but will definitely give it a GUI when i know one(most probably Qt)). i thought of a temporary solution by making a GUI using HTAs which will take inputs and simply redirect the output of the main program to a .html file inside the <PRE WRAP=1> tag and opens it. But i don't like this method so i dropped it.

INSTALLATION:


Spoiler



WINDOWS:
0. extract
1. open cmd and change the directory to the YADSA directory
2. execute YADSA.exe with search arguments.

LINUX:
i forgot to bring the source code with me (internet not working at home). 
When i upload it sometime later, just compile it with g++.



USAGE: (can also be viewed by entering the command - *YADSA --help*)


Spoiler



YADSA [optional parameters] keyword1,keyword2,....,keywordN
(1<=N<=10)

Optional Parameters:

--dbFile=[location of the archive file]
Sets the file that will be searched for softwares.
eg. --dbFile=.\archive.yadsa
Default=archive.yadsa

--license=[search term]
Sets the term that will be searched in license attribute of the softwares in the archive.
eg. --license=free
By default, it is set blank and license attribute is not searched.

--year=[year]
Shows the softwares in the search result of a particular year --year=0 means no year checking.
eg. --year=2011
Default=0

--month=[month]
Similar to the previous parameter.
eg. --month=4
Default=0

--target=[0/1/2]
Sets the target attributes of the softwares that will be searched.
0=name and description
1=name only
2=description only
eg. --target=0
Default=0

--mode=[0/1]
Sets the method of searching when multiple search terms are present.
0=(union)a software is included in the search result if even one search term is found in it.
1=(intersection)a software is included in the search result only if all the search terms are found in the software
eg. --mode=0
Default=0



How i made it:


Spoiler



It was quite simple. In short, here is what i did:
0. saved the .xls file of software details given by digit as .csv(with suitable delimiter settings) using open office.
1. made a program to parse that .csv file and stored the software details in an object and wrote each of those object to a binary file.
2. the program created these files for each DVD. i made another program which merged all these files into a single file.
3. made a program(YADSA) which searches these files.

NOTE: i did all the development in LINUX using g++ and then simply compiled it for windows using minGW compiler.



How to update it:


Spoiler



When DIGIT uploads the spreadsheet of the dvd content and i get my hands on it, i will upload a small file(about 200KB). Copy it inside the YADSA directory and run the command:
*dbUpdate --outFile=archive.yadsa update-filename*



What sucks:


Spoiler



* no GUI.
* Since it is command line based, long search results can be annoying, especially in windows as DOS is quite slow in showing outputs(try *YADSA ""* in LINUX and DOS to see the difference). So you might want to pipe the output to the more command. eg. YADSA abc | more
* An object in the archive will be shown in the search result even it it contains a word having a part of the search term. eg. if you search for "all", softwares with "small" in its name and description will also be shown in the result. while this can be useful, but it is annoying in some cases.



Example:


Spoiler



*img64.imageshack.us/img64/8086/72013857.jpg

Uploaded with ImageShack.us

*img836.imageshack.us/img836/3770/62042095.jpg

Uploaded with ImageShack.us

*img849.imageshack.us/img849/3760/88015842.jpg

Uploaded with ImageShack.us


any problems, feedback, suggestions, *bugs*, etc, reply here.

download link - MEGAUPLOAD - The leading online storage and file delivery service


----------



## krishnandu.sarkar (Jun 23, 2011)

Awesome initiative.


----------



## sygeek (Jun 23, 2011)

Looks interesting, I'll try it on Linux after I install Gentoo.


----------



## Scientia Wiz (Jun 23, 2011)

Really cool idea !

Well done !


----------



## mitraark (Jun 25, 2011)

Wow  , really , the idea itself is deserving of high praise ... amd then you went on to write the code for it all , on a simple GCC Compiler. Very Well Done ! I can learn a thing or two from you


----------



## QwertyManiac (Jun 29, 2011)

sygeek said:


> Looks interesting, I'll try it on Linux after I install Gentoo.



I wish this comment was sarcasm. Would be so much more apt!


----------



## sygeek (Jun 29, 2011)

QwertyManiac said:


> I wish this comment was sarcasm. Would be so much more apt!


you bet.


----------

