«Մասնակից:Teak/ձեռնարկ»–ի խմբագրումների տարբերություն

Content deleted Content added
չ տառասխալի ուղղում
չNo edit summary
Տող 15.
for n in `seq 1 N` #specify the range for the variable n
do
z=`printf %03i $n` #used to make the file names into 3,4, 5...-digit numbers, e.g. 12->0012
cjb2 -clean ej$z.tif $z.djvu #convert b/w tiff images to DjVu
djvm -i girq.djvu $z.djvu #inserting pages into beforehand created DjVu file
done
Տող 28.
Որոշ ժամանակ անց ձեր girq.djvu ֆայլը կպարունակի բնօրինակ գրքի բոլոր տեսածրված էջերը։
 
==Տառաճանաչում և տեքստի վերբեռնում==
Տառաճանաչելիս էջերը անհրաժեշտ է հիշել որպես առանձին ֆայլեր txt ֆորմատով (ej001.txt, ej002.txt և այլն)։ Քանի որ վիքիում նոր պարբերության սկսում է նախորդ պարբերության ավարտից մեկ դատարկ տող հետո, ապա անհրաժեշտ է տառաճանաչված տեքստում բոլոր տողավերձերը փոխարինել կրկնակի տողավերջով։ Տեքստը pywikipedia բոտի pagefromfile սպրիպտով վերբեռնելու համար պետք է յուրաքանչյուր էջում ավելացնել վիքիում այդ էջի անվանումը, ինչպես նաև տեքստի ավարտի որոշ վերջանիշ։ Այս ամենը կարելի է անել հետևյալ սկրիպտի օգնությամբ
Տառաճանաչելիս էջերը անհրաժեշտ է հիշել որպես առանձին ֆայլեր txt ֆորմատով (ej001.txt, ej002.txt և այլն)։
 
N=324 #the number of pages
for n in `seq 1 N`
do
z=`printf %03i $n` #used to make the file names into 3-digit numbers, e.g. 012
rpl -e '\n' '\n\n' ej$z.txt #replacing the page return by 2 page returns for identation in wiki
echo -e "\n\n'''Էջ:գործի_վիքիանվանում.djvu/$n'''\n\nyyyy" >> ej$z.txt #adding a line at the end of text files, to make the bot upload the text to that article
python /bot_folder/pagefromfile.py -force -file:/text_folder/ej$z.txt -start: -end:yyyy -notitle #uploading the text into the wiki of the bot (as specified in the user-config.py)
done