~ubuntu-branches/debian/experimental/arduino/experimental

« back to all changes in this revision

Viewing changes to build/create_reference.pl

  • Committer: Package Import Robot
  • Author(s): Scott Howard
  • Date: 2012-03-11 18:19:42 UTC
  • mfrom: (1.1.5) (5.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20120311181942-be2clnbz1gcehixb
Tags: 1:1.0.1~rc1+dfsg-1
New upstream release, experimental.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
use strict;
10
10
use warnings;
11
11
 
 
12
print "username: "; my $user = <STDIN>; chomp($user);
 
13
print "password: "; my $pass = <STDIN>; chomp($pass);
 
14
 
12
15
my $verbose = 1;
13
 
my $CURL_OPTIONS = '--silent --show-error';
 
16
my $CURL_OPTIONS = "--silent --show-error -u $user:$pass"; 
14
17
 
15
 
my $ARDUINO = 'http://arduino.cc/en'; # base url for arduino site
 
18
my $ARDUINO = 'http://edit.arduino.cc/en_ref'; # base url for reference site
 
19
my $PUBLIC = 'http://arduino.cc/en'; # base url for public site
16
20
 
17
21
my %downloaded = ();  # keep track of the pages we download
18
22
 
21
25
my $faq = create_page('FAQ.html', "$ARDUINO/Main/FAQ");
22
26
my $env = create_page('environment.html', "$ARDUINO/Main/Environment");
23
27
my $css = create_page('arduinoUno.css', "$ARDUINO/pub/skins/arduinoUno/arduinoUno.css");
 
28
my $css2 = create_page('arduinoWide.css', "$ARDUINO/pub/skins/arduinoWide/arduinoWide.css");
 
29
my $css2 = create_page('arduinoWideRender.css', "$ARDUINO/pub/skins/arduinoWideRender/arduinoWideRender.css");
24
30
my $eeprom = create_page('EEPROM.html', "$ARDUINO/Reference/EEPROM");
25
31
my $stepper = create_page('Stepper.html', "$ARDUINO/Reference/Stepper");
26
32
my $softser = create_page('SoftwareSerial.html', "$ARDUINO/Reference/SoftwareSerial");
109
115
  # direct pages to the local style file
110
116
  $text =~ s!$ARDUINO/pub/skins/arduinoUno/arduinoUno.css!arduinoUno.css!xg;
111
117
 
 
118
  # direct pages to the local style file
 
119
  $text =~ s!$ARDUINO/pub/skins/arduinoWide/arduinoWide.css!arduinoWide.css!xg;
 
120
 
 
121
  # direct pages to the local style file
 
122
  $text =~ s!$ARDUINO/pub/skins/arduinoWideRender/arduinoWideRender.css!arduinoWideRender.css!xg;
 
123
 
112
124
  # change links to Main/FAQ to go to FAQ.html 
113
125
  $text =~ s!$ARDUINO/Main/FAQ!FAQ.html!xg;
114
126
 
115
127
  # change links to the reference HomePage to go to index.html 
116
128
  $text =~ s!HomePage.html!index.html!xg;
117
129
 
 
130
  # change links to the reference edit site to go to the public site 
 
131
  $text =~ s!$ARDUINO!$PUBLIC!xg;
 
132
 
118
133
  # change links to the root directory to go to the Arduino home page
119
134
  $text =~ s!href="/"!href="http://www.arduino.cc"/!xg;
120
135