Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wikidata-dump-processor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
wikidata-dump-processor
Commits
e4f86684
Commit
e4f86684
authored
8 years ago
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
added notify via sms
parent
484e1641
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
wdq0.pl
+16
-1
16 additions, 1 deletion
wdq0.pl
with
16 additions
and
1 deletion
wdq0.pl
+
16
−
1
View file @
e4f86684
...
...
@@ -65,6 +65,8 @@ while (my $arg= shift (@ARGV))
else
{
push
(
@PARS
,
$arg
);
}
}
notify
('
starting wdq0 loop
');
while
(
1
)
{
my
$dumps
=
check
();
...
...
@@ -81,6 +83,13 @@ while (1)
exit
(
0
);
sub
notify
{
my
$msg
=
shift
;
system
(
qw(notify-sms.pl gg-uni)
,
$msg
);
}
sub
fetch_and_convert
{
my
$date
=
shift
;
...
...
@@ -97,6 +106,7 @@ sub fetch_and_convert
else
{
print
"
fetching stuff for
$date
\n
";
notify
('
wdq0: this is a test send from w4.urxn.at
');
my
(
$fetched
,
$dump_file
)
=
fetch_dump
(
$date
);
if
(
$fetched
)
...
...
@@ -123,17 +133,22 @@ sub fetch_and_convert
return
undef
;
}
notify
('
wdq0: finished download, starting wdq1
');
my
@cmd1
=
(
qw(./wdq1.pl --date)
,
$date
);
print
"
cmd1: [
",
join
('
',
@cmd1
),
"
]
\n
";
system
(
@cmd1
);
notify
('
wdq0: finished wdq1, starting wdq2
');
my
@cmd2
=
(
qw(./wdq2.pl --scan --date)
,
$date
);
print
"
cmd2: [
",
join
('
',
@cmd2
),
"
]
\n
";
system
(
@cmd2
);
notify
('
wdq0: finished wdq2, starting wdq3
');
my
@cmd3
=
(
qw(./wdq3.pl --date)
,
$date
);
print
"
cmd3: [
",
join
('
',
@cmd3
),
"
]
\n
";
system
(
@cmd3
);
notify
('
wdq0: finished wikidata conversion
');
}
}
...
...
@@ -181,7 +196,7 @@ sub check
if
(
m#<a href="((\d{4})(\d{2})(\d{2})\.json\.gz)">(\d{8}\.json\.gz)</a>\s+(\S+)\s+(\S+)\s+(\d+)#
)
{
my
(
$f1
,
$year
,
$mon
,
$day
,
$f2
,
$xdate
,
$time
,
$size
)
=
(
$
1
,
$
2
,
$
3
,
$
4
,
$
5
,
$
6
,
$
7
,
$
8
);
print
"
year=[
$year
] mon=[
$mon
] day=[
$day
] f1=[
$f1
] f2=[
$f2
] xdate=[
$xdate
] time=[
$time
] size=[
$size
]
\n
";
#
print "year=[$year] mon=[$mon] day=[$day] f1=[$f1] f2=[$f2] xdate=[$xdate] time=[$time] size=[$size]\n";
my
$rec
=
{
dump_file
=>
$f1
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment