![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-15 12:23 |
47,812 topics / 349,917 posts / today 0 new / 48,268 members |
| DOS批处理 & 脚本技术(批处理室) » [Original] Batch Processing to Read Weather Forecast |
| Printable Version 5,986 / 23 |
| Floor1 无奈何 | Posted 2007-01-02 13:22 |
| 荣誉版主 Posts 356 Credits 1,338 | |
|
Wrote a very simple batch script to read weather forecasts from 265.com, probably the most rudimentary "thief" program. It requires support for wget or curl, please download them yourself, the forum has posted links multiple times.
Usage: tianqi The first time an empty parameter is called, it prompts to enter the city name, supports full pinyin or abbreviated pinyin. The next time an empty parameter is called, it queries the weather of the last submitted city.
Attachments tianqi.zip (6.24 KiB) |
|
| Floor2 dosmania | Posted 2007-01-02 14:36 |
| 初级用户 Posts 54 Credits 172 | |
|
Hehe, I found this at this time, I didn't waste my time, it's worth staying up late a bit, he, the batch processing room has many masters, I'm lucky, I strongly support it, I like this type of batch processing, 468 lines of code, he, very thanks to the moderator!
[ Last edited by dosmania on 2007-1-2 at 01:38 AM ] |
|
| Floor3 verber34 | Posted 2007-01-02 21:14 |
| 初级用户 Posts 19 Credits 52 | |
|
Excuse me: Moderator, what software do you use to write batch scripts?
|
|
| Floor4 ccwan | Posted 2007-01-02 21:19 |
| 金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊 | |
|
That's really great! Hehe, support Brother Wuna i He.
|
|
| Floor5 kingshui | Posted 2007-01-02 22:29 |
| 初级用户 Posts 20 Credits 153 | |
Originally posted by verber34 at 2007-1-2 09:14 PM: Hehe... I know this... It should be notepad++? It may not be... But that's what I use... |
|
| Floor6 ccwan | Posted 2007-01-02 23:08 |
| 金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊 | |
|
Such a great thing, but Brother Naihe took it out to share with everyone, which is really enjoyable. Also, I hope new classmates will read more old posts, where there are many essentials! Especially search more before asking questions, maybe the result you want is already there ^_^
[ Last edited by ccwan on 2007-2-9 at 02:10 AM ] |
|
| Floor7 IceCrack | Posted 2007-01-02 23:29 |
| 中级用户 Posts 168 Credits 332 From 天涯 | |
|
Only one place can be queried at a time. We should also delete the setcity in the tem.
|
|
| Floor8 无奈何 | Posted 2007-01-03 00:22 |
| 荣誉版主 Posts 356 Credits 1,338 | |
|
RE verber34
It doesn't matter much which editor you use, as long as it supports syntax highlighting. I usually use EmEditor and VIM. The former looks more beautiful and can conveniently display characters like spaces, tabs, and returns; I prefer the latter for handling a large amount of data and more complex text operations. RE IceCrack I thought about supporting querying multiple cities at once, but it's not very practical. The most commonly used is querying a single city, and you can just call it with an empty parameter. If you want to query multiple cities at once, you can write a simple batch script to call it, but just remove the clear screen part in between. |
|
| Floor9 utem999 | Posted 2007-01-03 00:51 |
| 初级用户 Posts 54 Credits 135 | |
|
Very interesting batch processing
|
|
| Floor10 lotus516 | Posted 2007-01-03 08:02 |
| 高级用户 Posts 246 Credits 551 | |
| Floor11 eech | Posted 2007-01-20 23:35 |
| 高级用户 Posts 346 Credits 906 | |
|
For example: The first time I checked the weather in Shanghai. When running again, it automatically shows the weather in Shanghai. How to re-query the weather in another region?
|
|
| Floor12 ccwan | Posted 2007-01-21 06:09 |
| 金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊 | |
Originally posted by eech at 2007-1-20 23:35: The owner said To re-query the weather in another area, you can use tianqi city name in the command line |
|
| Floor13 jtyuer | Posted 2007-01-21 08:54 |
| 初级用户 Posts 29 Credits 73 | |
|
Alas well, we haven't had snow here for a long time! Let me see if a few snowflakes will fall recently?!
Thank you LZ, one word: good! Two words: admire! Three words: you are amazing!……Five words………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………… Hehe: Can't remember |
|
| Floor14 vkill | Posted 2007-01-22 08:20 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
Heheh, I found that Brother Wunaihe and I have the same hobby, liking to mess around with network-related stuff, wget + sed
|
|
| Floor15 kennyfan | Posted 2007-01-22 08:28 |
| 中级用户 Posts 112 Credits 259 | |
|
Hehe. Fun.. Fun... Admirable oh!~
|
|
| 1 2 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |