├── vendor ├── whoosh │ ├── filedb │ │ ├── __init__.py │ │ ├── gae.pyc │ │ ├── __init__.pyc │ │ ├── compound.pyc │ │ ├── filestore.pyc │ │ ├── filetables.pyc │ │ ├── structfile.pyc │ │ └── gae.py │ ├── support │ │ ├── __init__.py │ │ ├── bench.pyc │ │ ├── __init__.pyc │ │ ├── base85.pyc │ │ ├── charset.pyc │ │ ├── unicode.pyc │ │ ├── levenshtein.pyc │ │ ├── relativedelta.pyc │ │ ├── levenshtein.py │ │ └── base85.py │ ├── automata │ │ ├── __init__.py │ │ ├── fst.pyc │ │ ├── glob.pyc │ │ ├── nfa.pyc │ │ └── __init__.pyc │ ├── compat.pyc │ ├── fields.pyc │ ├── idsets.pyc │ ├── index.pyc │ ├── legacy.pyc │ ├── system.pyc │ ├── __init__.pyc │ ├── classify.pyc │ ├── columns.pyc │ ├── formats.pyc │ ├── reading.pyc │ ├── scoring.pyc │ ├── sorting.pyc │ ├── spelling.pyc │ ├── writing.pyc │ ├── codec │ │ ├── base.pyc │ │ ├── memory.pyc │ │ ├── whoosh2.pyc │ │ ├── whoosh3.pyc │ │ ├── __init__.pyc │ │ ├── plaintext.pyc │ │ └── __init__.py │ ├── collectors.pyc │ ├── highlight.pyc │ ├── lang │ │ ├── isri.pyc │ │ ├── lovins.pyc │ │ ├── porter.pyc │ │ ├── __init__.pyc │ │ ├── morph_en.pyc │ │ ├── phonetic.pyc │ │ ├── porter2.pyc │ │ ├── wordnet.pyc │ │ ├── dmetaphone.pyc │ │ ├── paicehusk.pyc │ │ ├── stopwords.pyc │ │ ├── snowball │ │ │ ├── bases.pyc │ │ │ ├── danish.pyc │ │ │ ├── dutch.pyc │ │ │ ├── english.pyc │ │ │ ├── finnish.pyc │ │ │ ├── french.pyc │ │ │ ├── german.pyc │ │ │ ├── italian.pyc │ │ │ ├── russian.pyc │ │ │ ├── spanish.pyc │ │ │ ├── swedish.pyc │ │ │ ├── __init__.pyc │ │ │ ├── hungarian.pyc │ │ │ ├── norwegian.pyc │ │ │ ├── portugese.pyc │ │ │ ├── romanian.pyc │ │ │ ├── __init__.py │ │ │ ├── swedish.py │ │ │ ├── norwegian.py │ │ │ ├── danish.py │ │ │ ├── bases.py │ │ │ └── german.py │ │ ├── phonetic.py │ │ ├── __init__.py │ │ └── porter.py │ ├── multiproc.pyc │ ├── query │ │ ├── qcore.pyc │ │ ├── spans.pyc │ │ ├── terms.pyc │ │ ├── nested.pyc │ │ ├── ranges.pyc │ │ ├── __init__.pyc │ │ ├── compound.pyc │ │ ├── positional.pyc │ │ ├── qcolumns.pyc │ │ ├── wrappers.pyc │ │ ├── __init__.py │ │ └── qcolumns.py │ ├── searching.pyc │ ├── util │ │ ├── cache.pyc │ │ ├── text.pyc │ │ ├── times.pyc │ │ ├── __init__.pyc │ │ ├── filelock.pyc │ │ ├── loading.pyc │ │ ├── numeric.pyc │ │ ├── numlists.pyc │ │ ├── testing.pyc │ │ ├── varints.pyc │ │ ├── versions.pyc │ │ ├── loading.py │ │ ├── varints.py │ │ ├── __init__.py │ │ ├── text.py │ │ ├── testing.py │ │ ├── versions.py │ │ └── filelock.py │ ├── externalsort.pyc │ ├── analysis │ │ ├── acore.pyc │ │ ├── filters.pyc │ │ ├── morph.pyc │ │ ├── ngrams.pyc │ │ ├── __init__.pyc │ │ ├── analyzers.pyc │ │ ├── intraword.pyc │ │ ├── tokenizers.pyc │ │ └── __init__.py │ ├── matching │ │ ├── binary.pyc │ │ ├── combo.pyc │ │ ├── mcore.pyc │ │ ├── __init__.pyc │ │ ├── wrappers.pyc │ │ └── __init__.py │ ├── qparser │ │ ├── __init__.pyc │ │ ├── common.pyc │ │ ├── default.pyc │ │ ├── plugins.pyc │ │ ├── syntax.pyc │ │ ├── taggers.pyc │ │ ├── dateparse.pyc │ │ ├── __init__.py │ │ ├── common.py │ │ └── taggers.py │ ├── __init__.py │ ├── system.py │ └── legacy.py └── Whoosh-2.6.0.egg-info │ ├── zip-safe │ ├── top_level.txt │ ├── dependency_links.txt │ └── PKG-INFO ├── static ├── robots.txt ├── favicon.ico ├── img │ └── Web_Logo.png ├── js │ └── hotlinking.js └── css │ ├── base.css │ ├── search.css │ └── daily.css ├── requirements.txt ├── base ├── __init__.py ├── handler.py ├── db_store │ ├── database.py │ └── __init__.py ├── daily_store.py └── kvdb_store │ └── __init__.py ├── daily ├── __init__.py └── handler.py ├── search ├── __init__.py ├── kvdb_search │ ├── analyse.py │ ├── __init__.py │ └── storage.py ├── fts_search.py ├── handler.py └── ali_search │ └── __init__.py ├── utils ├── __init__.py ├── sys_util.py ├── extract_util.py ├── date_util.py ├── cache_util.py └── pagination_util.py ├── operation ├── __init__.py ├── crawl │ ├── __init__.py │ ├── zhihu.py │ └── fetch.py └── handler.py ├── templates ├── 404.html ├── error.html ├── base.html ├── daily.html └── search.html ├── daily.sql ├── config.yaml ├── index.wsgi ├── README.rst └── config.py /vendor/whoosh/filedb/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/whoosh/support/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/Whoosh-2.6.0.egg-info/zip-safe: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /vendor/whoosh/automata/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /vendor/Whoosh-2.6.0.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | whoosh 2 | -------------------------------------------------------------------------------- /vendor/Whoosh-2.6.0.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /static/robots.txt: -------------------------------------------------------------------------------- 1 | User-Agent: * 2 | Allow: / 3 | Disallow: /static/ 4 | 5 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | tornado==3.0.0 2 | mysql-python 3 | lxml==2.3.4 4 | pylibmc 5 | whoosh -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /static/img/Web_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/static/img/Web_Logo.png -------------------------------------------------------------------------------- /vendor/whoosh/compat.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/compat.pyc -------------------------------------------------------------------------------- /vendor/whoosh/fields.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/fields.pyc -------------------------------------------------------------------------------- /vendor/whoosh/idsets.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/idsets.pyc -------------------------------------------------------------------------------- /vendor/whoosh/index.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/index.pyc -------------------------------------------------------------------------------- /vendor/whoosh/legacy.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/legacy.pyc -------------------------------------------------------------------------------- /vendor/whoosh/system.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/system.pyc -------------------------------------------------------------------------------- /vendor/whoosh/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/classify.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/classify.pyc -------------------------------------------------------------------------------- /vendor/whoosh/columns.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/columns.pyc -------------------------------------------------------------------------------- /vendor/whoosh/formats.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/formats.pyc -------------------------------------------------------------------------------- /vendor/whoosh/reading.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/reading.pyc -------------------------------------------------------------------------------- /vendor/whoosh/scoring.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/scoring.pyc -------------------------------------------------------------------------------- /vendor/whoosh/sorting.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/sorting.pyc -------------------------------------------------------------------------------- /vendor/whoosh/spelling.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/spelling.pyc -------------------------------------------------------------------------------- /vendor/whoosh/writing.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/writing.pyc -------------------------------------------------------------------------------- /vendor/whoosh/codec/base.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/codec/base.pyc -------------------------------------------------------------------------------- /vendor/whoosh/collectors.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/collectors.pyc -------------------------------------------------------------------------------- /vendor/whoosh/filedb/gae.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/filedb/gae.pyc -------------------------------------------------------------------------------- /vendor/whoosh/highlight.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/highlight.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/isri.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/isri.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/lovins.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/lovins.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/porter.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/porter.pyc -------------------------------------------------------------------------------- /vendor/whoosh/multiproc.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/multiproc.pyc -------------------------------------------------------------------------------- /vendor/whoosh/query/qcore.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/query/qcore.pyc -------------------------------------------------------------------------------- /vendor/whoosh/query/spans.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/query/spans.pyc -------------------------------------------------------------------------------- /vendor/whoosh/query/terms.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/query/terms.pyc -------------------------------------------------------------------------------- /vendor/whoosh/searching.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/searching.pyc -------------------------------------------------------------------------------- /vendor/whoosh/util/cache.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/util/cache.pyc -------------------------------------------------------------------------------- /vendor/whoosh/util/text.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/util/text.pyc -------------------------------------------------------------------------------- /vendor/whoosh/util/times.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/util/times.pyc -------------------------------------------------------------------------------- /vendor/whoosh/automata/fst.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/automata/fst.pyc -------------------------------------------------------------------------------- /vendor/whoosh/automata/glob.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/automata/glob.pyc -------------------------------------------------------------------------------- /vendor/whoosh/automata/nfa.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/automata/nfa.pyc -------------------------------------------------------------------------------- /vendor/whoosh/codec/memory.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/codec/memory.pyc -------------------------------------------------------------------------------- /vendor/whoosh/codec/whoosh2.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/codec/whoosh2.pyc -------------------------------------------------------------------------------- /vendor/whoosh/codec/whoosh3.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/codec/whoosh3.pyc -------------------------------------------------------------------------------- /vendor/whoosh/externalsort.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/externalsort.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/morph_en.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/morph_en.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/phonetic.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/phonetic.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/porter2.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/porter2.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/wordnet.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/wordnet.pyc -------------------------------------------------------------------------------- /vendor/whoosh/query/nested.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/query/nested.pyc -------------------------------------------------------------------------------- /vendor/whoosh/query/ranges.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/query/ranges.pyc -------------------------------------------------------------------------------- /vendor/whoosh/support/bench.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/support/bench.pyc -------------------------------------------------------------------------------- /vendor/whoosh/util/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/util/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/util/filelock.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/util/filelock.pyc -------------------------------------------------------------------------------- /vendor/whoosh/util/loading.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/util/loading.pyc -------------------------------------------------------------------------------- /vendor/whoosh/util/numeric.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/util/numeric.pyc -------------------------------------------------------------------------------- /vendor/whoosh/util/numlists.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/util/numlists.pyc -------------------------------------------------------------------------------- /vendor/whoosh/util/testing.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/util/testing.pyc -------------------------------------------------------------------------------- /vendor/whoosh/util/varints.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/util/varints.pyc -------------------------------------------------------------------------------- /vendor/whoosh/util/versions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/util/versions.pyc -------------------------------------------------------------------------------- /vendor/whoosh/analysis/acore.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/analysis/acore.pyc -------------------------------------------------------------------------------- /vendor/whoosh/analysis/filters.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/analysis/filters.pyc -------------------------------------------------------------------------------- /vendor/whoosh/analysis/morph.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/analysis/morph.pyc -------------------------------------------------------------------------------- /vendor/whoosh/analysis/ngrams.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/analysis/ngrams.pyc -------------------------------------------------------------------------------- /vendor/whoosh/codec/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/codec/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/codec/plaintext.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/codec/plaintext.pyc -------------------------------------------------------------------------------- /vendor/whoosh/filedb/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/filedb/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/filedb/compound.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/filedb/compound.pyc -------------------------------------------------------------------------------- /vendor/whoosh/filedb/filestore.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/filedb/filestore.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/dmetaphone.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/dmetaphone.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/paicehusk.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/paicehusk.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/stopwords.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/stopwords.pyc -------------------------------------------------------------------------------- /vendor/whoosh/matching/binary.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/matching/binary.pyc -------------------------------------------------------------------------------- /vendor/whoosh/matching/combo.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/matching/combo.pyc -------------------------------------------------------------------------------- /vendor/whoosh/matching/mcore.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/matching/mcore.pyc -------------------------------------------------------------------------------- /vendor/whoosh/qparser/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/qparser/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/qparser/common.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/qparser/common.pyc -------------------------------------------------------------------------------- /vendor/whoosh/qparser/default.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/qparser/default.pyc -------------------------------------------------------------------------------- /vendor/whoosh/qparser/plugins.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/qparser/plugins.pyc -------------------------------------------------------------------------------- /vendor/whoosh/qparser/syntax.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/qparser/syntax.pyc -------------------------------------------------------------------------------- /vendor/whoosh/qparser/taggers.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/qparser/taggers.pyc -------------------------------------------------------------------------------- /vendor/whoosh/query/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/query/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/query/compound.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/query/compound.pyc -------------------------------------------------------------------------------- /vendor/whoosh/query/positional.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/query/positional.pyc -------------------------------------------------------------------------------- /vendor/whoosh/query/qcolumns.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/query/qcolumns.pyc -------------------------------------------------------------------------------- /vendor/whoosh/query/wrappers.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/query/wrappers.pyc -------------------------------------------------------------------------------- /vendor/whoosh/support/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/support/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/support/base85.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/support/base85.pyc -------------------------------------------------------------------------------- /vendor/whoosh/support/charset.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/support/charset.pyc -------------------------------------------------------------------------------- /vendor/whoosh/support/unicode.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/support/unicode.pyc -------------------------------------------------------------------------------- /vendor/whoosh/analysis/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/analysis/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/analysis/analyzers.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/analysis/analyzers.pyc -------------------------------------------------------------------------------- /vendor/whoosh/analysis/intraword.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/analysis/intraword.pyc -------------------------------------------------------------------------------- /vendor/whoosh/automata/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/automata/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/filedb/filetables.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/filedb/filetables.pyc -------------------------------------------------------------------------------- /vendor/whoosh/filedb/structfile.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/filedb/structfile.pyc -------------------------------------------------------------------------------- /vendor/whoosh/matching/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/matching/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/matching/wrappers.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/matching/wrappers.pyc -------------------------------------------------------------------------------- /vendor/whoosh/qparser/dateparse.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/qparser/dateparse.pyc -------------------------------------------------------------------------------- /base/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | __author__ = ['"wuyadong" '] -------------------------------------------------------------------------------- /vendor/whoosh/analysis/tokenizers.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/analysis/tokenizers.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/bases.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/bases.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/danish.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/danish.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/dutch.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/dutch.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/english.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/english.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/finnish.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/finnish.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/french.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/french.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/german.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/german.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/italian.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/italian.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/russian.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/russian.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/spanish.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/spanish.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/swedish.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/swedish.pyc -------------------------------------------------------------------------------- /vendor/whoosh/support/levenshtein.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/support/levenshtein.pyc -------------------------------------------------------------------------------- /vendor/whoosh/support/relativedelta.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/support/relativedelta.pyc -------------------------------------------------------------------------------- /daily/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | __author__ = ['"wuyadong" '] -------------------------------------------------------------------------------- /search/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | __author__ = ['"wuyadong" '] -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | __author__ = ['"wuyadong" '] -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/__init__.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/hungarian.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/hungarian.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/norwegian.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/norwegian.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/portugese.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/portugese.pyc -------------------------------------------------------------------------------- /vendor/whoosh/lang/snowball/romanian.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JobsDong/zhihudaily/HEAD/vendor/whoosh/lang/snowball/romanian.pyc -------------------------------------------------------------------------------- /operation/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | __author__ = ['"wuyadong" '] -------------------------------------------------------------------------------- /operation/crawl/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | __author__ = ['"wuyadong" '] -------------------------------------------------------------------------------- /templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %} 4 | 404 Not Found 5 | {% end %} 6 | 7 | {% block css %} {% end %} 8 | 9 | {% block content %} 10 |

404 Not Found.

11 |
知乎日报
12 | {% end %} -------------------------------------------------------------------------------- /templates/error.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %} 4 | {{ escape(code) }} 5 | {% end %} 6 | 7 | {% block css %} 8 | {% end %} 9 | 10 | {% block content %} 11 |

{{escape(code)}} {{escape(reason)}}.

12 |
{{escape(exception)}}
13 |
知乎日报
14 | {% end %} -------------------------------------------------------------------------------- /daily.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS 'newses' ( 2 | 'id' INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, 3 | 'news_id' varchar(50) NOT NULL UNIQUE, 4 | 'title' varchar(256) NOT NULL, 5 | 'share_url' varchar(128) NOT NULL, 6 | 'date' varchar(64) NOT NULL, 7 | 'body' longtext NOT NULL, 8 | 'image' varchar(128) NOT NULL, 9 | 'image_source' varchar(128) NOT NULL, 10 | 'image_public_url' varchar(128) NOT NULL 11 | ) DEFAULT CHARSET=utf8; 12 | 13 | CREATE INDEX date_newses_index USING BTREE ON 'newses'('date'); 14 | 15 | CREATE INDEX news_id_newses_index USING BTREE ON 'newses'('news_id'); -------------------------------------------------------------------------------- /config.yaml: -------------------------------------------------------------------------------- 1 | name: zhihurewen 2 | version: 1 3 | 4 | cron: 5 | - description: crawl latest news 6 | url: /operation/fetch 7 | schedule: "50 */1 * * *" 8 | login: admin@admin 9 | 10 | - description: index latest news 11 | url: /operation/index 12 | schedule: "55 12,16,22 * * *" 13 | login: admin@admin 14 | 15 | libraries: 16 | - name: "tornado" 17 | version: "3.0.0" 18 | 19 | - name: "lxml" 20 | version: "2.3.4" 21 | 22 | handlers: 23 | - url: /static/ 24 | static_path: static 25 | gzip: on 26 | 27 | - url: /robots.txt 28 | static_path: static/robots.txt 29 | 30 | - url: /favicon.ico 31 | static_path: static/favicon.ico -------------------------------------------------------------------------------- /utils/sys_util.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | __author__ = ['"wuyadong" '] 6 | 7 | 8 | def import_object(name): 9 | """import an object by name 10 | """ 11 | if isinstance(name, unicode): 12 | name = name.encode("utf-8") 13 | 14 | if name.count(".") == 0: 15 | return __import__(name, None, None) 16 | 17 | parts = name.split(".") 18 | obj = __import__(".".join(parts[:-1]), None, None, [parts[-1]], 0) 19 | try: 20 | return getattr(obj, parts[-1]) 21 | except AttributeError: 22 | raise ImportError("No module named %s" % parts[-1]) -------------------------------------------------------------------------------- /base/handler.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | __author__ = ['"wuyadong" '] 6 | 7 | import tornado.web 8 | 9 | 10 | class BaseHandler(tornado.web.RequestHandler): 11 | """定义公共函数 12 | """ 13 | 14 | def get_error_html(self, status_code, **kwargs): 15 | reason = kwargs.get('reason', "Server Error") 16 | exception = kwargs.get('exception', "") 17 | 18 | return self.render_string("error.html", code=str(status_code), 19 | reason=str(reason), exception=str(exception)) 20 | 21 | 22 | class ErrorHandler(BaseHandler): 23 | """处理错误信息 24 | """ 25 | 26 | def prepare(self): 27 | self.render("404.html") -------------------------------------------------------------------------------- /utils/extract_util.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """文本提取 5 | """ 6 | 7 | __author__ = ['"wuyadong" '] 8 | 9 | from lxml import html 10 | 11 | 12 | def extract_text(content): 13 | try: 14 | tree = html.fromstring(content, parser=html.HTMLParser(encoding='utf-8')) 15 | rc = [] 16 | for node in tree.itertext(): 17 | rc.append(node.strip()) 18 | return u''.join(rc) 19 | except Exception: 20 | return content 21 | 22 | 23 | def str2unicode(text): 24 | return text.decode('utf-8') if isinstance(text, str) else unicode(text) 25 | 26 | 27 | def unicode2str(text): 28 | return text.encode('utf-8') if isinstance(text, unicode) else str(text) -------------------------------------------------------------------------------- /static/js/hotlinking.js: -------------------------------------------------------------------------------- 1 | $("img").each(function (index, img) { 2 | $(this).replaceWith('