資源簡介
BS前端開發(fā),為一名專職的WEB前端開發(fā)工程師(F2E),在開發(fā)過程中要用到的工具軟件可能會很多,下面,dhtml精英俱樂部就為大家講述一下WEB前端開發(fā)工程師(F2E)必備的工具軟件
代碼片段和文件信息
#!/usr/bin/env?python
import?sys?os?re
try:
????import?chardet
except?ImportError:
????print?“You?need?universal?encoding?detector?for?this?script“
????print?“?http://chardet.feedparser.org?or?apt-get?install?python-chardet“
????sys.exit()
regexp_language?=?re.compile(“\*?+(.+)?+translation“?re.IGNORECASE)
js_template?=?“““/*?This?file?is?automaticly?generated?by?create_language_js.py?*/
//?some?data?used?in?the?examples
Ext.namespace(‘Ext.exampledata‘);
//?TODO:?complete?and?sort?the?list
Ext.exampledata.languages?=?[
%s
];
“““
lang_dubs?=?{}
def?lang_name(file):
????language?=?os.path.basename(file)
????m?=?regexp_language.search(open(file).read(512))
????if?m:
language?=?m.groups()[0]
if?not?lang_dubs.has_key(language):
????lang_dubs[language]?=?file
else:
????raise?Exception(‘Duplicate?language?‘+language+‘?for?file?‘+file)
????return?language
def?print_locale(lang_code):
????print?lang_code
????sys.stdout.flush()
????return?True
def?main():
????base_dir?=?“../../src/locale“
????base_file?=?lambda?f:?os.path.join(base_dir?f)
????try:
locales?=?os.listdir(base_dir)
????except?IOError:
print?“Cannot?find?source?locale?directory:?%s?...?exiting“?%?base_dir
sys.exit()
????
????valid_file?=?lambda?e:?e.endswith(“.js“)?and?e.startswith(“ext-lang-“)
????char_set?=?lambda?f:?chardet.detect(open(f).read())[‘encoding‘]
????lang_code?=?lambda?f:?f[9:f.rfind(“.js“)]
????info_set?=?lambda?f:?(lang_name(base_file(f))?(lang_code(f)?char_set(base_file(f))))
????locales?=?dict(info_set(file)?for?file?in?locales?if?valid_file(file)?and?print_locale(lang_code(file)))
????print?“...?done“
????locale_strarray?=?‘\n‘.join([“\t[%r?%r?%r]“?%?(code?name?charset)?\
?????for?name?(code?charset)?in?sorted(locales.items())])
????#?create?languages.js
????open(“l(fā)anguages.js“?“w“).write(js_template?%?locale_strarray)
????print?“saved?%d?languages?to?languages.js“?%?len(locales)
????????
if?__name__==“__main__“:
????main()
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-10-20?18:25??ext-4.0.7-gpl\
?????目錄???????????0??2011-10-20?18:24??ext-4.0.7-gpl\pkgs\
?????文件??????315667??2011-10-20?18:24??ext-4.0.7-gpl\pkgs\foundation.js
?????文件???????90878??2011-10-20?18:24??ext-4.0.7-gpl\pkgs\extras.js
?????文件???????30489??2011-10-20?18:24??ext-4.0.7-gpl\pkgs\manifest.js
?????文件??????366819??2011-10-20?18:24??ext-4.0.7-gpl\pkgs\dom.js
?????文件?????3819817??2011-10-20?18:24??ext-4.0.7-gpl\pkgs\classes.js
?????文件????????5262??2011-10-20?18:24??ext-4.0.7-gpl\index.html
?????目錄???????????0??2011-10-19?18:27??ext-4.0.7-gpl\docs\
?????文件?????????297??2011-10-19?18:27??ext-4.0.7-gpl\docs\README.md
?????文件?????????868??2011-10-19?18:26??ext-4.0.7-gpl\docs\build-js.html
?????文件???????44371??2011-10-19?18:27??ext-4.0.7-gpl\docs\index.html
?????目錄???????????0??2011-10-19?18:27??ext-4.0.7-gpl\docs\videos\
?????文件???????14210??2011-10-19?18:27??ext-4.0.7-gpl\docs\videos\videos.json
?????文件??????729752??2011-10-19?18:26??ext-4.0.7-gpl\docs\app.js
?????文件????????2053??2011-10-19?18:27??ext-4.0.7-gpl\docs\touchif
?????文件???????44371??2011-10-19?18:27??ext-4.0.7-gpl\docs\template.html
?????文件????????1150??2011-10-19?18:27??ext-4.0.7-gpl\docs\favicon.ico
?????文件?????????856??2011-10-19?18:27??ext-4.0.7-gpl\docs\print-template.html
?????目錄???????????0??2011-10-19?18:26??ext-4.0.7-gpl\docs\examples\
?????文件???????26566??2011-10-19?18:26??ext-4.0.7-gpl\docs\examples\examples.json
?????目錄???????????0??2011-10-19?18:27??ext-4.0.7-gpl\docs\output\
?????文件??????424586??2011-10-19?18:27??ext-4.0.7-gpl\docs\output\Ext.Element.js
?????文件???????43333??2011-10-19?18:27??ext-4.0.7-gpl\docs\output\Ext.layout.container.Fit.js
?????文件??????100744??2011-10-19?18:27??ext-4.0.7-gpl\docs\output\Ext.fx.Anim.js
?????文件????????5924??2011-10-19?18:27??ext-4.0.7-gpl\docs\output\Ext.JSON.js
?????文件??????559581??2011-10-19?18:27??ext-4.0.7-gpl\docs\output\Ext.window.Window.js
?????文件??????412006??2011-10-19?18:27??ext-4.0.7-gpl\docs\output\Ext.chart.Chart.js
?????文件????????8941??2011-10-19?18:27??ext-4.0.7-gpl\docs\output\Ext.Number.js
?????文件??????387049??2011-10-19?18:27??ext-4.0.7-gpl\docs\output\Ext.chart.TipSurface.js
?????文件???????46068??2011-10-19?18:27??ext-4.0.7-gpl\docs\output\Ext.ZIndexManager.js
............此處省略5093個文件信息
評論
共有 條評論