Giter Site home page Giter Site logo

eduos / vim-qanda Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 12 KB

vim-QandA is a Vim plugin that includes two separated parts: one for crawling transcript and panellist information from the website of the Australia talk show Q&A; another for showing these information in my favorite editor Vim.

Python 71.64% Vim Script 28.36%

vim-qanda's Introduction

Description

vim-QandA is a Vim plugin that includes two separated parts: one for crawling transcript and panellist information from the website of the Australia talk show Q&A; another for showing these information in my favorite editor Vim.

Prerequisites

Make sure that Python and MySQL have been installed.

Installation

Copy plugin/vim-QandA to ~/.vim/bundle
Or add a GitHub repository entry if you are using a Plugin Manager such as Vundle:
Plugin 'eduOS/vim-QandA'

Configuration

Change the database and password to your own.
Add this line to your ~/.bashrc or ~/.zshrc if zsh is installed: alias qanda='cd ~/.vim/plugin/vim-QandA/autoload/QandA/ && python QandA.py yourpassword && cd -'

Functions

  1. Crawling
    Open a command prompt and navigate to ~/.vim/plugin/vim-QandA/autoload/QandA/, then input python qanda. You'll see a message warning that the database is updated xx days ago and asking if you want to update the homepage or not. For instance:
    You updated the database 17 days ago. y for update homepage and n for using old homepage?[y/n]
    After configuring the alias you can enter qanda under any directory to update the database.
    All episodes from the first one in 2008 to the last one broadcasted in the last Monday will be downloaded into the folder named soupfiles. Each soup file will be named the episode's short code. By the same time all needed information in the HTML files will be extracted and saved into MySQL database.
    The crawler will first search the soupfile directory for the file, and if the file doesn't exist then it will download it.

  2. Viewing the subtitile
    Press :QandA in any Vim under any directory, and then a list will show you ten lastest episodes with the respective time and topic as titiles.
    Hit Enter for the transcript.

  3. Reading the introduction of panellists
    Pressing <leader>p will trigger a side window which shows the panel information of the episode.

Screenshots

list
details

Todo

  • vim interface design and completion
  • dump all transcript to database
  • modify the dump_to_tatabase function through str mangement and line-by-line absorb
  • optimize the refresh function allowing per episode refreshment.
  • alter database for every line
  • alter database for panellist
  • automatically update
  • natural language process for intelligence
  • connecting twitter and other social networks intelligently

License

MIT

vim-qanda's People

Contributors

eduos avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.