-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ebdba3
commit 6749395
Showing
5 changed files
with
28 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
select cl_from as subcat, page_id as parentcat | ||
from categorylinks | ||
join page on page_namespace = 14 and page_title = cl_to | ||
where cl_type = 'subcat'; | ||
where cl_type = 'subcat'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
#!/usr/bin/python3 | ||
|
||
import sys | ||
import os | ||
|
||
try: | ||
runjob = sys.argv[1].lower() | ||
except IndexError: | ||
print('USAGE: python run-task.py <jobname>') | ||
sys.exit(1) | ||
|
||
with open('/data/project/sdzerobot/SDZeroBot/crontab', 'r') as crontab: | ||
lines = crontab.read().splitlines() | ||
lines = [line for line in lines if not line.startswith('#') and line.strip() is not ''] | ||
for line in lines: | ||
job = line.split()[8].lower() | ||
if job[4:] == runjob: | ||
command = ' '.join(line.split()[5:]) | ||
print('> ' + command) | ||
os.popen(command) | ||
break | ||
else: | ||
print('no matching cron job') | ||
#!/usr/bin/python3 | ||
|
||
import sys | ||
import os | ||
|
||
try: | ||
runjob = sys.argv[1].lower() | ||
except IndexError: | ||
print('USAGE: python run-task.py <jobname>') | ||
sys.exit(1) | ||
|
||
with open('/data/project/sdzerobot/SDZeroBot/crontab', 'r') as crontab: | ||
lines = crontab.read().splitlines() | ||
lines = [line for line in lines if not line.startswith('#') and line.strip() is not ''] | ||
for line in lines: | ||
job = line.split()[8].lower() | ||
if job[4:] == runjob: | ||
command = ' '.join(line.split()[5:]) | ||
print('> ' + command) | ||
os.popen(command) | ||
break | ||
else: | ||
print('no matching cron job') |