[ubiquity][1] frontend/ige az [elvirához][2].
- [ebben a gistben a Ubiquity egyből meglátja a benne rejlő szépséget: kiömlött kód helyett az elvira parancsot látja benne][3]
var elvira_url = "http://elvira.mav-start.hu/elvira.dll/xslms/uf"; | |
CmdUtils.CreateCommand({ | |
names: ["elvira"], | |
description: "Check Elvira timetable", | |
help: "elvira (from) (to) (with via) (as student, u26, bike or bikeclub) (at [date])", | |
icon: "http://elvira.mav-start.hu/xslms/res/favicon.ico", | |
author: {name: "Gazs", email: "[email protected]"}, | |
contributors: ["KTamas ([email protected])"], | |
license: "GPL", |
átírtuk, kicsit talán vállalhatóbb: http://github.com/gazs/mr2akusztik |
// parasztjson lol | |
var g_arrAddressList = [], | |
kamu = function() { return true }; | |
ShowAddress = FillAddress = HereIam = kamu; | |
var FillRoute = function() { | |
//console.log(g_Route.m_arrMains[0].m_arrSubs; | |
$.each(g_Route.m_arrMains[0].m_arrSubs, function(i,e) { | |
if (e.m_arrBkvLines.length > 0) { |
// Authors: | |
// KTamas <[email protected]> | |
register({ | |
name: "iwiw", | |
url: "http://iwiw.hu/", | |
domains: ["iwiw.hu", "wiw.hu"], | |
sessionCookieNames: ["ajaxable", "JSESSIONID", "autoLoginNew","forgetEmail", "email", "httpslogin"], | |
identifyUser: function() { | |
var resp = this.httpGet("http://iwiw.hu/pages/main/index.jsp"); |
register({ | |
name: "indapass", | |
domains: ["indapass.hu", "daemon.indapass.hu" ], | |
sessionCookieNames: [ "PHPSESSID", "psid" ], | |
identifyUser: function () { | |
var resp = this.httpGet("http://indapass.hu/"); | |
this.userName = resp.body.querySelector("#divHeadBoxRight").textContent.trim() | |
} | |
}); |
import urllib, re | |
from BeautifulSoup import BeautifulSoup, Tag, NavigableString | |
archive_base = "http://lexal.net/scifi/scifiction/" | |
archive_soup = BeautifulSoup( urllib.urlopen(archive_base + "/archive.html" ) ) | |
for link in archive_soup.findAll("a", {"href": re.compile('originals_archive')}): | |
novella = BeautifulSoup(urllib.urlopen(archive_base + link['href'])) | |
# span.storytitle | |
# span.storybio |
// ezekre a változókra hivatkozik az útvonaltervező a válaszában: | |
var g_arrAddressList = [], | |
g_Route = [], | |
kamu = function () { | |
return true; | |
}, // hogyne, még csináljunk is valamit? | |
ShowAddress = kamu, | |
FillAddress = kamu, | |
FillRoute = kamu, | |
HereIam = kamu; |
filetype plugin indent on | |
syntax on | |
set lbr! | |
set wrap | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set hlsearch | |
set mouse=a | |
set number |