29.1.3. File ကိရိယာများ (File tools)
29.1.3.1. File ကို download ပြုလုပ်ခြင်း (Download file)
URL တစ်ခုကို အသုံးပြုပြီး file တစ်ခုကို download ပြုလုပ်ပေးပါသည်။ (ဥပမာ- http:
သို့မဟုတ် file:
ကိုအသုံးပြုခြင်း)
သတ်မှတ်ချက်များ (Parameters)
အခြေခံ သတ်မှတ်ချက်များ (Basic parameters)
အညွှန်း |
အမည် |
အမျိုးအစား |
ရှင်းလင်းဖော်ပြချက် |
---|---|---|---|
URL |
|
[string] |
Download ပြုလုပ်မည့် file ၏ URL |
File destination (File တည်နေရာ) Optional (မဖြစ်မနေလုပ်ဆောင်ရန် မလိုအပ်ပါ) |
|
[string] Default: |
File တည်နေရာ သီးခြားသတ်မှတ်ချက်။ အောက်ပါတို့ထဲမှ တစ်ခုခုဖြစ်ပါသည်-
|
အဆင့်မြင့် သတ်မှတ်ချက်များ (Advanced parameters)
အညွှန်း |
အမည် |
အမျိုးအစား |
ရှင်းလင်းဖော်ပြချက် |
---|---|---|---|
Method (နည်းလမ်း) |
|
[enumeration] Default: 0 |
တောင်းဆိုမှုအတွက် အသုံးပြုမည့် HTTP နည်းလမ်း။ ရွေးချယ်စရာများမှာ- * 0 — GET * 1 — POST |
Data Optional |
|
[string] |
တောင်းဆိုမှုသည် POST တစ်ခုဖြစ်လျှင် ပေါင်းထည့်မည့် data |
ရလာဒ်များ (Outputs)
အညွှန်း |
အမည် |
အမျိုးအစား |
ရှင်းလင်းဖော်ပြချက် |
---|---|---|---|
File destination |
|
[string] |
Download ပြုလုပ်ပြီးသော file ၏တည်နေရာ |
Python code
Algorithm ID: qgis:filedownloader
import processing
processing.run("algorithm_id", {parameter_dictionary})
Processing Toolbox ထဲရှိ algorithm ပေါ်တွင် mouse ကိုတင်ထားလျှင် algorithm id ကိုပြသပေးပါသည်။ parameter dictionary သည် parameter နာမည်များနှင့် တန်ဖိုးများကို ပေးပါသည်။ Python console မှ algorithm များကို မည်သို့လုပ်ဆောင်ရမည် ဆိုသည့် အသေးစိတ်ကို သိရှိလိုလျှင် Console တွင် processing algorithm များကို အသုံးပြုခြင်း တွင်ကြည့်ပါ။