Scripting’s Every Otaku’s Dream! 编写脚本是每个宅的梦想

I’m evil, because I’ve wasted one more days on the god damn Ac Search Tool, only complicating it with OO, but with little code-reuse.


But I can’t help to keep developing it.


Then I read the update of an ACG blog, author of which must be otaku undoubtedly. He said he was eventually idle at the end of the year, maybe idle enough to code. So I reached the conclusion of the title. But let’s talk more about it.


Have you ever been in a task, that you have to keep doing the same thing everyday or each hour?


If so, have you ever considered that you would be bored and tried to make it automatically?


Here I mean to reduce one self’s workload, not others’ because it involves offices of the arts; besides, it’s better that you finish your work earlier than your workmate with the same work, but it’s going too far. To make a task automatically is not as difficult as you’ve ever thought. If you have to run a program or a command regularly, who not use Task Scheduler of your windows? Of coz there are various tasks that much more complex than running a command, but we have Quick Marco; Further, for instance, when you have to login to a website from which you grasp some data (of coz regularly), just turn to scripts.


When you are dealing with such regular tasks, but without any batched or automatic solutions, I think you have been wasting human resource of yourself and your company lol. You may argue that you’ve found your work tasks unstructured, your decision non-programmed, but you should have reconsidered you work first. According to management, superiors are always empower their subordinates to work out well-structured problems and programmed decisions so that they can focus on the unstructured and non-programmed ones. Assume that you have no subordinates to empower, because of which you are otaku XD, you must have had dozens of well-structured problems and programmed decisions, rest with whether you’ve induced them.


So don’t wait to be bored, spare a little time to study a scripting language now. Points:


  1. Glad that there are various scripts, such as vbs, js, ruby and python. You can find info from Google, choose one that agree with your habits of mind. Scripts related to Rapid Development may be better.
  2. It’s important to weigh and consider balance time between scripting and keep repeating, but you should not do that until you can write scripts craftily, so study first.
  3. Do not help others, or they will keep boring you! ╮(╯_╰)╭


  1. 让人高兴的是脚本语言有很多种,例如vbs、js、ruby和python。你可以Google它们,然后找一种适合自己思维习惯的。那些和快速开发有关的语言会好一点。
  2. 虽然权衡写脚本和继续重复劳动的时间是很重要的事情,不过最好等你熟练使用脚本语言了再权衡吧,所以学了再说。
  3. 不要用来帮助别人,不然他们会烦死你!╮(╯_╰)╭

That’s it. I strongly recommended python, undoubtedly not because I only know it (grasping my hair)……


Developing Search Tool for Acfun

When the self-owned search function was cancel by the monkey, I planned to develop this tool. After thinking and strolling in my room for 2 hours, I thought I had known what to do and started to make it.


Python, which I fought for this semi-finished Acfun Search Tool with, was new for me 3 days ago. I had a chance to choose a script to develop the tool, for I’ve know nothing about technique newer than JAVA. Finally I chose Python, because:


  1. It worked immediately after it was installed without any other configurations.
  2. It ran as a double-click rather than “python<enter>”, like VBScript. It is much shorter, isn’t it?
  3. For the reality. Google App Engine has supported it, and I meant to put the tool there to benefit from the powerful Google. Later I realized that GAE has maximum of 1M for data-transfer, so I changed my hosting place.
  1. 装好以后就可以用了,不用任何附加设置。
  2. 程序文件双击就可以执行,像VBS一样,不需要用命令行执行。对我来说这很重要,因为够简单,哈哈。
  3. 实际上是因为Google App Engine支持它。原本我打算在GAE上放这个程序,以便利用实力强大的Google,但我很快发现GAE只支持1M以内的数据读写,于是我改放到其它免费空间中。

At the very start, I planned to fecth all the data from first, keep it up to date, and built a RSS feed for it so others can secondary exploite it, but I decide to finish the search function first. I spent 2 days grabing datas from Acfun, modifying my crawler to suit to the irregular but met frequently data for several times, and change the data-structure from CSV file to SQLite database(CSV has been used for GAE). When Acfun became busy at prime time, I had to pause the crawler.


Finally the crawler accompalished its mission and was reformed to keep the data new. I’ve been aware of Python web frameworks such as django, but I decided to use CGI script, because it’s much easier for me who knows nothing about frameworks or MVCs or MVTs. When I directly use the hosting to test my scripts, my work increasing geometrically. Now it works, although hardly with user-interface.

数据抓完后,我便将爬虫改成数据更新器。虽然留意了很多Python的web架构,但我完全不懂那些东西,所以还是决定用最简单的Python CGI Scripts。因为要在远程服务器上调试,所以工作量非常大,无论如何现在是弄好了,但几乎没有任何用户界面……能用就行。

I’ve published to TIEBA of Acfun so as to ease maybe some load of Acfun Server. I hope people will benefit from it, and I have to go back to revise now. Visit @