News:

Current Full E-Touch Version: 10.2.0
Current Demo E-Touch Version: 10.0.0
Current Beta: 10.2.1 Beta 22 (09/02/23)

Main Menu

HOW TO: Make your own charts for your country

Started by Novalak, July 04, 2011, 07:02:29 AM

Previous topic - Next topic

Novalak

Countries Supported

Austria
Australia
Finland
France
Germany
Italy
New Zealand
Norway
Spain

Software Needed:
Notepad++ (Recommended Not Essential)
http://download.tuxfamily.org/notepadplus/5.9.2/npp.5.9.2.Installer.exe

Active Perl (Must Have)
32bit - http://www.activestate.com/activeperl/downloads/thank-you?dl=http://downloads.activestate.com/ActivePerl/releases/5.12.4.1205/ActivePerl-5.12.4.1205-MSWin32-x86-294981.msi

64bit - http://www.activestate.com/activeperl/downloads/thank-you?dl=http://downloads.activestate.com/ActivePerl/releases/5.12.4.1205/ActivePerl-5.12.4.1205-MSWin32-x64-294981.msi


Instructions
Create a new txt document - chart.txt and paste the following script in there. Save and then rename to chart.pl

----Script Starts Here ----
die "Require 1 argument only! $0 <inputfile> > <outputfile>\n" unless (scalar @ARGV == 1);
my $inputfile = $ARGV[0];
my @arr = ();

open F, "<$inputfile" or die "Cannot open file: $inputfile\n";

while (my $line = <F>)
{
  chomp $line;
  my @fields = split(/\t/, $line);
  if ($line =~ /^\d/)
  {
     push @arr, "\"$fields[3]\"";
  }
  else
  {
     push @arr, ",\"$fields[0]\"";
  }
}
close F;

open G, ">$inputfile" or die "Cannot write to file: $inputfile\n";
while (my $line = shift(@arr))
{
  print G $line;
  print G ",.\n" if ($line =~ /^\,/);
}
close G;
----Script Ends Here ----


Once you have saved the chart.pl file keep it safe - you will need it every month

Now go to the URL of the country you want to use

Austria - http://austriancharts.at/weekchart.asp?cat=s
Australia - http://australian-charts.com/weekchart.asp?cat=s
Finland - http://finnishcharts.com/weekchart.asp?cat=s
France - http://lescharts.com/weekchart.asp?cat=s
Germany - http://germancharts.com/weekchart.asp?cat=s
Italy - http://italiancharts.com/weekchart.asp?cat=s
New Zealand - http://charts.org.nz/weekchart.asp?cat=s
Norway - http://norwegiancharts.com/weekchart.asp?cat=s
Spain - http://spanishcharts.com/weekchart.asp?cat=s

Change the week to the week you want in your charts
Typically people do the last week of the month. I personally like doing the first week of the month, so its not empty for 3 out of the 4 weeks. Your choice
Highlight Rows 1-10, Copy and paste into a txt file, lets call it 07.txt
(07.txt means July. 01 for Jan etc)

Save the file in the same directory as your script

Open the cmd prompt and change directory to where your script and txt file is
run the chart.pl <txt file>


For example

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\neilt>cd ../..

C:\>cd E-Touch

C:\E-Touch>chart.pl 07.txt

C:\E-Touch>


And done!
Now move your 07.txt file to <e-touch directory>/history/<Chart>/<Year>
Example
D:\E-Touch\history\ARIA Chart\2011\07.txt



Let me know if you have any questions