<

ArticlesVideosEE: Download statistics on Experts Exchange Articles and Videos - Demo of Enhancements

Posted on
19,240 Points
41 Views
2 Endorsements
Last Modified:
Community Pick: Many members of our community have endorsed this article.
Experience Level: Intermediate
5:55
Joe Winograd
50+ years in computers
EE FELLOW 2017 — first ever recipient of Fellow award
MVE 2015,2016,2018
CERTIFIED GOLD EXPERT
DISTINGUISHED EXPERT
My 100th publication here at Experts Exchange is an article that presents a program called ArticlesVideosEE, which is able to download the Title, number of Views, number of Endorsements, number of Points, number of Comments, and Date Published for each article and video whose link is in a list. You may read the article here:

How to download number of Views, Endorsements, Points for Experts Exchange Articles and Videos

I also published a five-minute EE video Micro Tutorial with a demonstration of the program:

How to download number of Views, Endorsements, Points for Experts Exchange Articles and Videos--Demo

As you can see from the Title of the article and video, I enhanced the program after publishing the initial version to include columns for the number of Comments and the Date Published. There have also been three other enhancements:

• Ability to specify all the run-time parameters in a configuration file (config.ini) so that (i) the source code does not have to be modified to specify new options/settings and (ii) the Browse dialogs shown in the first video may be avoided.

• Support for a Command Line Interface (CLI) such that a different configuration file (not just config.ini) may be specified on the command line, thereby allowing great flexibility to run ArticlesVideosEE in a command/DOS prompt, a batch file (.bat), the Task Scheduler, programs/scripts, etc. — anywhere that a command line call can be made.

• Addition of a debugging parameter (DebugRun) that will be helpful if the website's page layout ever changes.

This second video Micro Tutorial picks up where the first one left off, providing a demonstration of the program's enhancements since the initial version.

Video Steps

1. Download and install AutoHotkey


If you do not already have AutoHotkey installed, read this EE article:

AutoHotkey - Getting Started

Follow the instructions in that article to download and install AutoHotkey.

2. Download the ArticlesVideosEE program


If you have not yet downloaded the ArticlesVideosEE program, read my EE article:

How to download number of Views, Endorsements, Points for Experts Exchange Articles and Videos

Download the ArticlesVideosEE program attached at the bottom of that article.

3. View the first video Micro Tutorial


If you have not yet viewed the first video, please do so, as it is a prerequisite for this one:

How to download number of Views, Endorsements, Points for Experts Exchange Articles and Videos--Demo

4. Create a plain text file configuration file


Using Notepad (or whatever text editor you prefer, create a plain text file called config.ini with these lines in it:

[Settings]
OutputFolder=X:\Articles Videos Experts Exchange\
ArticlesVideosList=X:\Articles Videos Experts Exchange\ArticlesVideosList.txt
OpenResultsWith=c:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE

Open in new window

5. Configure properly for your system


In the config.ini file created in Step 4, change the folder/file locations as needed for your system (if you do not have Excel, put another program in the OpenResultsWith setting, such as c:\Windows\System32\notepad.exe).

Note that ArticlesVideosList.txt is the same file that you created while reading the article or during the steps in the first video.

Place the config.ini file in the same folder as the program file (ArticlesVideosEE.ahk).

6. Run the program and confirm the enhancements


As you did during the first video, run the program.

Confirm that you did not get the Browse For Folder and Browse For File dialogs (because the enhanced ArticlesVideosEE will find those parameters in the config.ini file).

Confirm that the Results file automatically opened in Excel (or whatever program you put on the OpenResultsWith line).

Confirm that the Results file contains the new Comments and Date Published columns.

7. Create another configuration file and use it to test the Command Line Interface (CLI)


Create another configuration file, as in Steps 4 and 5, but call it something other than config.ini, such as MyArticles.ini.

Using a command/DOS prompt or batch file, run the program with the full path of the new configuration file as the parameter.

For example, run this in a command/DOS prompt (if the configuration file has spaces in its name, enclose it in quotes):

ArticlesVideosEE.ahk "X:\Articles Videos Experts Exchange\MyArticles.ini"

8. Confirm the Results from the CLI run


Confirm that the name of the Results file contains the name of the configuration file. For example:

ArticlesVideosEE_2019-06-11_14.21.39_MyArticles.txt

Confirm that the Results file has the expected contents.

9. Test a debugging run


Put this line in your config.ini file:

DebugRun=1

Run the program.

Confirm that a file called ~TempPage.txt exists in the same folder as the program (that temporary file is deleted in a normal/non-debugging run).

That's it! If you find this video to be helpful, please click the thumbs-up icon below. Thank you for watching!
2
1 Comment
LVL 76

Author Comment

by:Joe Winograd
You're welcome, Andrew, and thanks back at you for your enhancement suggestions...definitely made the program better! Thanks, too, for the Endorsement and Approved accolade...both very much appreciated! Regards, Joe
0
Windows Explorer lets you open archive (tar and tgz) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating archive files takes a little more - and that you'll find here.
Often times what you may consider better indicators of various items, others do not.  It is always a good idea to have a way to turn off conditional formatting in whatever program is displaying it.  The most obvious I will use here - MS Excel.