<

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

Posted on
10,104 Points
4 Views
1 Endorsement
Last Modified:
Approved
Experience Level: Intermediate
5:53
Joe Winograd
50+ years in computer industry •Everything from development to sales •CIO •Windows •Document Imaging •EE MVE 2015,2016,2018 •EE FELLOW 2017
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!
1
2 Comments
 

Administrative Comment

by:Andrew Leniart
Excellent video Joe and thank you or incorporating the enhancements I asked for in your program!

Endorsed!

Regards,

Andrew Leniart
Experts Exchange Senior Editorial Editor
Private Message Me
0
LVL 65

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

Featured Post

Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

This is for people with spreadsheet skill, but not necessarily yet book-keeping skills, which with this “starter template” will give you the lists headings and a few fairly simple calculations you need to get going. 
This article is about an excellent bookmarks manager I've been using that I thought deserved some promotion to make more folks aware of its existence. Free to use and very useful indeed. Enjoy...

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month