Extract Doxygen functions along with namespace into a .csv file - doxygen

While working with my Doxygen output doc, I've a requirement to extract all the functions into a spreadsheet. Additionally, each function had a requirement mapped to it using ALIASES defined in the configuration file. sample function as below:
#requirement{req-id}
void Myfunc()
I am able to see all the requirements documented in a separate page in my HTML output. But, I need to fetch the list of functions with respective requirement Ids into a .csv file for further processing. Could anyone please hep me out?
Thanks, Badri

Doxygen has no irect CSV output.
You would need the XML output (GENERATE_XML=YES) and process the resulting file into a format you want / directly process the file without the need of a CSV file.
When you have an ALIASES like
ALIASES += req{3}="\xrefitem req \"Requirement\" \"SW Requirements\" ID: \1 Requirement: \2 Verification Criteria: \3"
you will get a file req.xml that you can process further.

Related

Is it possible to extract metadata such as Content Created date from files - I can't get this with PowerShell

I need to extract the "Content Created" date out of thousands of files, but haven't been able to find a way to do this using PowerShell / other Command Line utility.
Does someone out there know a way to obtain this metadata? If so, please can you advise me. Thanks.
I've looked at various resources online, including this site, but haven't been successful thus far.
Here's a screenshot explaining what I'm trying to do.
I've been unable to find a native powershell cmdlet which does what you want. However, I found this article: Use PowerShell to Find Metadata from Photograph Files and the script it used: get file meta data function.
The article talks about image files, but the function is not specific for image files.
I tested it out on a folder containing a Word and an Excel file and the returned Metadata from the Word file contains the Content Created date. The Excel file does not contain/return that value. This is not unexpected as the Details tab of properties for the Excel file does not contain a Content Created value so it seems to be specific for Word files, and maybe some other file or document types.
Update:
You write that you need to extract this info from thousands of files, but if those files are anything but Word-files you probably won't be able to do that.
As far as I can tell this should work with the file types exposing the type of metadata you want. However, it seems that the ContentCreated property is unique to Word. I tried adding a text file (.txt), Acrobat PDF (.pdf), MS Access (.mdb), Excel (.xlxs) and a Word doc (.docx) file to my test folder and the only one that has/returns that metadata property is the Word file.
You should also be aware that the script seems to return metadata localized, so for me to programatically get the info i wanted I had to pipe the output of the script to Select-Object -Property Name,'InnehÄll skapat' (which is the Swedish name for Content created). So if you're running on a non-english system you may need to check what the output looks like before creating your Select-Object statement.
PowerQuery in Excel 2013 or later (data tab). Connect to data> Folder.

Write RDD in txt file

I have the following type of data:
`org.apache.spark.rdd.RDD[org.apache.spark.rdd.RDD[((String, String),Int)]] = MapPartitionsRDD[29] at map at <console>:38`
I'd like to write those data in a txt file to have something like
((like,chicken),2) ((like,dog),3) etc.
I store the data in a variable called res
But for the moment I tried with this:
res.coalesce(1).saveAsTextFile("newfile.txt")
But it doesn't seem to work...
If my assumption is correct, then you feel that the output should be a single .txt file if it was coalesced down to one worker. This is not how Spark is built. It is meant for distributed work and should not be attempted to be shoe-horned into a form where the output is not distributed. You should use a more generic command line tool for that.
All that said, you should see a folder named newfile.txt which contains data files with your expected output.

How to publish a (csv, xlsx, etc) file from SAS DIS via email

So I have some SAS DIS jobs which create "kickout" data when run - by this I mean that if things run smoothly, none of the "kickout" data is generated, but it is known that there will be exceptions and I would like to have those exceptions put into a table and automatically emailed to me so that I am notified when something is behaving in a non-ideal manner.
I can create a transformation which will send an email containing the data I'm looking for, but the data is formatted as html and thus not in a form conducive to analysis. I'd like the transformation to email a .csv file which is more easily manipulated.
There is the option to send a .spk file but I'm having issues getting that to work and in any case am not sure it really suits my needs.
Is what I want possible, with or without the standard Publish to Email transformation provided by SAS DIS? Looking at the SAS DIS user guide I'm guessing that there is no pre-built transformation which does what I want, but can the base SAS code accomdate this requirement?
Thanks much!
The "Publish to Email transformation" uses ODS HTML to generate the output so you'll get a HTML output. If you want an XLS output then there is a way. You could change the extension of the output file to xls to generate xls file from the ODS HTML. This is an old way of generating xls from ODS HTML.
Now coming to the SPK file. This is something you should look into. Since you are looking into getting an xls/csv attachement which you can open and do some manipulation etc. SPK file is like a ZIP file. You can right click and unzip spk file. Basically you can put in all your files within a archive/spk file and get that emailed as attachement using the "Publish to Email Transformation"
To get this done, go to the properties of the "Publish to Email Transformation" and Under Publishing option=>
select Send report in an archive (.spk) file as an email attachment in the Select viewer file/attachment option field
provide folder/path where the spk file would be stored under Select path of where to store archive file containing report
provide the name of the spk file under Specify filename of archive file containing report
provide name=value pair of the package under Specify one or more desired package name/value pairs for package. For example this transformation is generating a PROC PRINT of an INPUT data set and the output file is c:\sushil\test.html then enter myname=(test.html) . The myname is for labeling purpose when you unzip the spk you should get test.html
Now Under REPORT SPECIFICATION option in the "Publish to Email Transformation" transformation select "Generate PROC PRINT from input table" and then enter the path and filename of generated report which based on our previous entry should be c:\sushil\test.html
Also, to select "Generate PROC PRINT from input table" you would need to right click the "Publish to Email Transformation" and select Ports -> Add Input Port. This how you can connect a table with the transformation. Now this is the minimum settings required to generate spk package from the transformation. Let me know if it helps!!
Note: This information is as per SAS DI Studio 4.6. I don't know if the transformation is updated in the newer version of DI Studio.

Scalding: Ouptut schema from pipe operation

I am reaidng files on HDFS via scalding, aggregating on some fields, and writing to a tab delimited file via TSV. How can I write out a file that contains the schema of my output file? For example,
UnpackedAvroSource(args("input"))
.project('key, 'var1)
.groupBy('key){_.sum[Long]('var1 -> var1sum))}
.write(Tsv(args("output")))
I want to write an output text file that contains "Key, var1sum" that someone who picks up my ooutput file later knows what the columns. I'm assuming scalding doesn't embed this in the file somewhere?
Thanks.
Just found the option writeHeader = true which will write the column names to the output file, negating the need for writing out to a file.

Extracting file names from an online data server in Matlab

I am trying to write a script that will allow me to download numerous (1000s) of data files from a data server (e.g, http://hydro1.sci.gsfc.nasa.gov/thredds/catalog/GLDAS_NOAH10SUBP_3H/2011/345/). Unfortunately, the names of the files in each directory are not formatted in a similar way (the time that they were created were appended to the end of the file name). I need to be able to specify the file name to subset the data (I have a special tool for these data types) and download it. I cannot find a function in matlab that will extract the file names.
I have looked at URLREAD, but it downloads everything including html code.
Thanks for your help!
You can easily parse the link.
x=urlread(url)
links=regexp(x,'<a href=''([^>]+)''>','tokens')
Reads every link, you have to filter all unwanted links.
For example this gets all grb files:
a=regexp(x,'<a href=''([^>]+.grb)''>','tokens')