Skip to main content

event parser of kyoto-univ.

Project description

event-parser

イベント情報が載っているウェブページから情報を抽出し、特定のデータ形式に変換するパッケージ。

Usage

install

pip を利用する場合(主にインストールした後バージョン管理をpipでしたい人向け)

$ pip install kueventparser

run script

parse_event [-h] [--help]

Develop

git clone https://github.com/kkiyama117/KUEventParser.git
# recommend using pipenv
pipenv install --dev

you can also use venv with requirements.txt

Docs

get

from kueventparser import get
get(url="url of event")

get_all

from kueventparser import get_all
get_all()

kueventparser

import kueventparser
kueventparser.kueventparser('get_all', year=2019, month=2)

eventは指定URLのイベントページから抽出したイベント情報(Event)で、以下の構造になっている。

class Event:
    """イベント情報を含んだclass
    """

    def __init__(self, name:str, url: str, location: str, description: str, date: datetime.date,
                 start: datetime.time,
                 end: datetime.time):
        """イニシャライザー
        
        Args:
            name: イベント名
            url: イベント情報のURL
            location: 開催地
            description: 詳細説明文
            date: 開催日
            start: 開始時間
            end: 終了時間
        """

detail

より正確なドキュメント群はsphinxで書かれている.

# /docs/build/html/ にドキュメントが作成される.
cd docs
python make_docs.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kueventparser-3.0.1.tar.gz (12.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page