summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbjjbjjbj <julianteule@gmail.com>2017-01-13 20:02:20 +0100
committerjbjjbjjbj <julianteule@gmail.com>2017-01-13 20:02:20 +0100
commited3f8a5ba0dbdd9c0d3363568db4e47546513161 (patch)
treef08b6f119ae54eac979a3be360023a1489ecfeaa
parent70b65b88ac2119600b68e1a75e3053459d171764 (diff)
parent8d5f747e4f69c1093306a3124c42ca17392dc17c (diff)
Merge branch 'master' of https://github.com/jbjjbjjbj/newDotFiles
-rw-r--r--.emacs26
-rw-r--r--Scripts/wiki2P.py27
2 files changed, 41 insertions, 12 deletions
diff --git a/.emacs b/.emacs
index 3ae677d..731f3e5 100644
--- a/.emacs
+++ b/.emacs
@@ -12,8 +12,8 @@
'(global-auto-revert-mode t)
'(js-indent-level 2)
'(package-selected-packages
- (quote
- (magit powerline-evil spaceline js2-mode jedi auto-complete undo-tree dashboard neotree)))
+ (quote
+ (relative-line-numbers multi-web-mode magit powerline-evil spaceline js2-mode jedi auto-complete undo-tree dashboard neotree)))
'(tab-stop-list (quote (2)))
'(tab-width 2)
'(xterm-mouse-mode t))
@@ -23,7 +23,7 @@
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
-(global-linum-mode t)
+;;(global-linum-mode t)
(setq python-shell-interpreter "/usr/bin/python")
@@ -50,7 +50,11 @@
(global-unset-key "\C-z")
;;(global-set-key "\C-z" 'advertised-undo)
+(global-unset-key "\C-v")
+(global-set-key "\C-v" 'yank)
+(global-unset-key "\M-v")
+(global-set-key "\M-v" 'yank-pop)
(global-set-key [mouse-5]
(lambda () (interactive) (next-line 3)))
@@ -119,11 +123,26 @@
(global-set-key (kbd "C-x C-b") 'bs-show)
+
+
+
+
+
(when (fboundp 'winner-mode)
(winner-mode 1))
+(global-set-key(kbd "C-M-<next>") 'scroll-other-window-down)
+
+
+(global-relative-line-numbers-mode)
+
+(ac-config-default)
+
+(global-auto-complete-mode t)
+
+
;; Julians cool keybindings
(global-unset-key (kbd "C-d"))
(global-set-key (kbd "C-d u") 'undo-tree-visualize)
@@ -141,3 +160,4 @@
(display-time-mode 1)
+
diff --git a/Scripts/wiki2P.py b/Scripts/wiki2P.py
index f0ded01..84f4d82 100644
--- a/Scripts/wiki2P.py
+++ b/Scripts/wiki2P.py
@@ -1,16 +1,25 @@
-import requests, bs4
+import requests, bs4, re
-#res = requests.get("https://en.wikipedia.org/wiki/Special:Random")
-res = requests.get("https://en.wikipedia.org/wiki/Study")
+# res = requests.get("https://en.wikipedia.org/wiki/Special:Random")
+res = requests.get("https://en.wikipedia.org/wiki/Linux")
-soup = bs4.BeautifulSoup(res.text)
+soup = bs4.BeautifulSoup(res.text, "html.parser")
-element = soup.select("p > a")
+element = soup.select("#mw-content-text a[title]")
+
+
+pattern = re.compile("^\/.*")
+
+
+for i in element:
+ if "Edit section" not in i["title"] and pattern.match(i["href"]):
+ if "div" not in str(i.parent) and "th" not in str(i.parent) and "td" not in str(i.parent):
+ try:
+ i["class"]
+ except KeyError:
+ print(i)
+ break
-print(element[0])
-#while( soup.select(".firstHeading")[0] != "Philosophy"):
-#
-# print(soup.select(".firstHeading")[0].text)