Pywikipedia 내용 수정 봇 batch 수행

미디어위키 내용 수정 봇 batch 수행

1 명령어[편집]

echo "python replace.py '예전말' '새말' -start:! -always" | batch
echo "python replace.py '예전말' '새말' -start:! -always -log" | batch
echo "python replace.py '예전말' '새말' -start:! -always -log:로그파일명" | batch

2 실행예시[편집]

[root@zetawiki pywikipedia]# echo 'python replace.py "[[분류:실용서]]" "[[분류:실용서]]" -start:! -always -log:log1.txt' | batch
job 8 at 2015-01-30 13:30
→ batch 작업 등록됨
[root@zetawiki pywikipedia]# ps -ef | grep replace.py | grep -v grep
root     13922 13921  2 13:30 ?        00:00:01 python replace.py [[분류:실용서]] [[분류:실용서]] -start:! -always -log:log1.txt
→ 수행중
[root@zetawiki pywikipedia]# cd logs
[root@zetawiki logs]# tail -f log1.txt
2015-01-30 13:32:50         replace.py,  457 in                run: INFO     No changes were necessary in [[9가지 수업 절차]]
2015-01-30 13:32:50         replace.py,  457 in                run: INFO     No changes were necessary in [[=]]
2015-01-30 13:32:50         replace.py,  457 in                run: INFO     No changes were necessary in [[==]]
2015-01-30 13:32:50         replace.py,  457 in                run: INFO     No changes were necessary in [[A440]]
2015-01-30 13:32:50         replace.py,  457 in                run: INFO     No changes were necessary in [[A4 박스 무게]]
2015-01-30 13:32:50         replace.py,  457 in                run: INFO     No changes were necessary in [[A4 종이 무게]]
2015-01-30 13:32:50         replace.py,  457 in                run: INFO     No changes were necessary in [[ABO식 혈액형]]
... (생략)
→ 로그파일을 통해 현재 수행중인 내역을 확인할 수 있음

3 같이 보기[편집]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}