Skip to content

Commit 02f362b

Browse files
committed
Grabbing reference from our editorial server (and updating script to do so).
1 parent 3ee847c commit 02f362b

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

build/create_reference.pl

+17-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
use strict;
1010
use warnings;
1111

12+
print "username: "; my $user = <STDIN>; chomp($user);
13+
print "password: "; my $pass = <STDIN>; chomp($pass);
14+
1215
my $verbose = 1;
13-
my $CURL_OPTIONS = '--silent --show-error';
16+
my $CURL_OPTIONS = "--silent --show-error -u $user:$pass";
1417

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
1620

1721
my %downloaded = (); # keep track of the pages we download
1822

@@ -21,6 +25,8 @@
2125
my $faq = create_page('FAQ.html', "$ARDUINO/Main/FAQ");
2226
my $env = create_page('environment.html', "$ARDUINO/Main/Environment");
2327
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");
2430
my $eeprom = create_page('EEPROM.html', "$ARDUINO/Reference/EEPROM");
2531
my $stepper = create_page('Stepper.html', "$ARDUINO/Reference/Stepper");
2632
my $softser = create_page('SoftwareSerial.html', "$ARDUINO/Reference/SoftwareSerial");
@@ -109,12 +115,21 @@ sub localize_page {
109115
# direct pages to the local style file
110116
$text =~ s!$ARDUINO/pub/skins/arduinoUno/arduinoUno.css!arduinoUno.css!xg;
111117

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+
112124
# change links to Main/FAQ to go to FAQ.html
113125
$text =~ s!$ARDUINO/Main/FAQ!FAQ.html!xg;
114126

115127
# change links to the reference HomePage to go to index.html
116128
$text =~ s!HomePage.html!index.html!xg;
117129

130+
# change links to the reference edit site to go to the public site
131+
$text =~ s!$ARDUINO!$PUBLIC!xg;
132+
118133
# change links to the root directory to go to the Arduino home page
119134
$text =~ s!href="/"!href="http://www.arduino.cc"/!xg;
120135

build/shared/reference.zip

-227 KB
Binary file not shown.

0 commit comments

Comments
 (0)