Merge branch 'master' of github.com:nichus/sundry
This commit is contained in:
		@@ -21,11 +21,12 @@ limitations under the License.
 | 
			
		||||
 | 
			
		||||
:root {
 | 
			
		||||
   /* Modify these to change your theme colors: */
 | 
			
		||||
   --primary: #09F;
 | 
			
		||||
   --text: #c3c4c5;
 | 
			
		||||
   --background: #23272a;
 | 
			
		||||
   --background-elevated: #2c2f33;
 | 
			
		||||
   --background-content: #36393e;
 | 
			
		||||
   --attention: #d98719;
 | 
			
		||||
   --primary: var(--attention);
 | 
			
		||||
 | 
			
		||||
   /* These should be less important: */
 | 
			
		||||
   --background-hover: rgba(255, 255, 255, 0.1);
 | 
			
		||||
@@ -36,7 +37,7 @@ limitations under the License.
 | 
			
		||||
   --border-bright: #aaa;
 | 
			
		||||
 | 
			
		||||
   --text-bright: #FFF;
 | 
			
		||||
   --text-special: var(--primary);
 | 
			
		||||
   --text-special: #08C;
 | 
			
		||||
 | 
			
		||||
   --scrollbar-background: #000;
 | 
			
		||||
   --scrollbar-border: var(--primary);
 | 
			
		||||
@@ -295,6 +296,10 @@ ts-message {
 | 
			
		||||
   box-shadow: none !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.msg_inline_attachment_column.column_border {
 | 
			
		||||
  background-color: var(--border-dim);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ts-message:hover {
 | 
			
		||||
   background: var(--background-hover) !important;
 | 
			
		||||
}
 | 
			
		||||
@@ -318,7 +323,6 @@ ts-message:hover {
 | 
			
		||||
.rxn,
 | 
			
		||||
#col_channels,
 | 
			
		||||
#col_channels_footer,
 | 
			
		||||
pre,
 | 
			
		||||
ts-message .action_hover_container .btn_msg_action,
 | 
			
		||||
.file_container,
 | 
			
		||||
.file_container .CodeMirror .CodeMirror-code>div:before, .file_container .CodeMirror .sssh-line:before, .file_container .sssh-code .CodeMirror-code>div:before, .file_container .sssh-code .sssh-line:before,
 | 
			
		||||
@@ -329,9 +333,13 @@ ts-message .action_hover_container .btn_msg_action,
 | 
			
		||||
.menu,
 | 
			
		||||
.menu #menu_items_scroller,
 | 
			
		||||
.btn, .btn_outline {
 | 
			
		||||
  background: var(--background-elevated) !important;
 | 
			
		||||
  background: var(--background-content) !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* orien attachment */
 | 
			
		||||
.attachment_group .media_caret {
 | 
			
		||||
  color: var(--border-dim);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#flex_contents .heading,
 | 
			
		||||
#flex_contents .heading a,
 | 
			
		||||
@@ -344,7 +352,7 @@ ts-message .action_hover_container .btn_msg_action,
 | 
			
		||||
 | 
			
		||||
pre,
 | 
			
		||||
ts-message .action_hover_container .btn_msg_action,
 | 
			
		||||
.file_container .CodeMirror .CodeMirror-code>div pre, .file_container .CodeMirror .sssh-line pre, .file_container .sssh-code .CodeMirror-code>div pre, .file_container .sssh-code .sssh-line pre,
 | 
			
		||||
.file_container .CodeMirror .CodeMirror-code>div pre, .file_container .CodeMirror .CodeMirror-code>div, .file_container .CodeMirror .sssh-line pre, .file_container .sssh-code .CodeMirror-code>div pre, .file_container .sssh-code .CodeMirror-code>div, .file_container .sssh-code .sssh-line pre,
 | 
			
		||||
.search_message_result .search_message_result_meta a,
 | 
			
		||||
.search_message_result .search_message_result_meta .date_links a,
 | 
			
		||||
.flexpane_redesign #flex_contents .heading_text,
 | 
			
		||||
@@ -354,6 +362,7 @@ ts-message .action_hover_container .btn_msg_action,
 | 
			
		||||
.btn, .btn_outline, .menu {
 | 
			
		||||
  color: var(--text) !important;
 | 
			
		||||
  border-color: var(--border-dim) !important;
 | 
			
		||||
  background-color: var(--background);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.btn:hover:after {
 | 
			
		||||
@@ -410,12 +419,15 @@ ts-message .action_hover_container .btn_msg_action,
 | 
			
		||||
 | 
			
		||||
.feature_name_tagging_client ts-message .mention, ts-message .mention,
 | 
			
		||||
span.match {
 | 
			
		||||
  border: 1px solid var(--border-bright) !important;
 | 
			
		||||
  border: 1px solid var(--attention) !important;
 | 
			
		||||
  background-color: var(--background-elevated) !important;
 | 
			
		||||
  font-weight: bold;
 | 
			
		||||
  /*
 | 
			
		||||
  padding: 2px 4px;
 | 
			
		||||
  margin: 2px;
 | 
			
		||||
  border-radius: 10px;
 | 
			
		||||
  orien
 | 
			
		||||
  */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.mention > .mention {
 | 
			
		||||
@@ -491,10 +503,25 @@ ts-message a.timestamp{
 | 
			
		||||
  color: #fff !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* orien divider */
 | 
			
		||||
#msgs_div .unread_divider hr {
 | 
			
		||||
  border-color: var(--attention); /* default is #f26130 */
 | 
			
		||||
}
 | 
			
		||||
#msgs_div .unread_divider .divider_label
 | 
			
		||||
{
 | 
			
		||||
  background: var(--background);
 | 
			
		||||
  padding: 4px 4px;
 | 
			
		||||
  border-radius: 0px;
 | 
			
		||||
  border: 1px solid var(--attention);
 | 
			
		||||
  margin: -1px 11px -13px 0px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#msgs_div .unread_divider.no_unreads .divider_label
 | 
			
		||||
{
 | 
			
		||||
 background: #000 !important;
 | 
			
		||||
 background: var(--background-elevated);
 | 
			
		||||
 color: #aaa !important;
 | 
			
		||||
 border: none;
 | 
			
		||||
 margin-top: 0px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#msgs_div .unread_divider.no_unreads hr{
 | 
			
		||||
@@ -743,6 +770,20 @@ ts-message .reply_bar:hover {
 | 
			
		||||
   border-color: var(--border-dim);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* orien : HERE */
 | 
			
		||||
#messages_unread_status {
 | 
			
		||||
  border: 1px solid var(--attention);
 | 
			
		||||
  background-color: var(--background);
 | 
			
		||||
  border-radius: 0px;
 | 
			
		||||
  height: 25px;
 | 
			
		||||
}
 | 
			
		||||
#messages_unread_status:hover, #messages_unread_status:hover .clear_unread_messages {
 | 
			
		||||
  background-color: var(--background-elevated);
 | 
			
		||||
}
 | 
			
		||||
#messages_unread_status .clear_unread_messages {
 | 
			
		||||
  border-left: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#archives_return, .messages_banner {
 | 
			
		||||
   color: var(--text);
 | 
			
		||||
   background-color: var(--background-elevated);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								vimrc
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								vimrc
									
									
									
									
									
								
							@@ -14,6 +14,7 @@
 | 
			
		||||
" * https://github.com/scrooloose/syntastic
 | 
			
		||||
" * https://github.com/hashivim/vim-terraform.git
 | 
			
		||||
" * https://github.com/tangledhelix/vim-kickstart.git
 | 
			
		||||
" * git@github.com:yorokobi/vim-splunk.git
 | 
			
		||||
"
 | 
			
		||||
" Pathogen colorschemes used: (vimcolors.com for more)
 | 
			
		||||
" * https://github.com/Marfisc/vorange.git
 | 
			
		||||
@@ -46,8 +47,8 @@ set comments-=s1:/*,mb:*,ex:*/
 | 
			
		||||
set comments+=s:/*,mb:\ *,ex:\ */
 | 
			
		||||
set comments+=fb:*
 | 
			
		||||
 | 
			
		||||
" Highlight the focused line
 | 
			
		||||
set cursorline
 | 
			
		||||
" If uncommented highlight the focused line
 | 
			
		||||
"set cursorline
 | 
			
		||||
 | 
			
		||||
"set background=dark
 | 
			
		||||
"let g:badwolf_darkgutter=1
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1241
									
								
								wod/Cargo.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										1241
									
								
								wod/Cargo.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										9
									
								
								wod/Cargo.toml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								wod/Cargo.toml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
[package]
 | 
			
		||||
name = "wod"
 | 
			
		||||
version = "0.1.0"
 | 
			
		||||
authors = ["Orien Vandenbergh <orien.vandenbergh@defpoint.com>"]
 | 
			
		||||
 | 
			
		||||
[dependencies]
 | 
			
		||||
reqwest = "0.8.2"
 | 
			
		||||
scraper = "0.4.0"
 | 
			
		||||
select = "0.4.2"
 | 
			
		||||
							
								
								
									
										41
									
								
								wod/src/main.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								wod/src/main.rs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
extern crate reqwest;
 | 
			
		||||
extern crate scraper;
 | 
			
		||||
extern crate select;
 | 
			
		||||
 | 
			
		||||
use select::document::Document;
 | 
			
		||||
use select::predicate::{Class,Name,Predicate};
 | 
			
		||||
 | 
			
		||||
fn main() {
 | 
			
		||||
    if is_cached() {
 | 
			
		||||
    } else {
 | 
			
		||||
        wod("http://www.merriam-webster.com/word-of-the-day");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
fn is_cached() -> bool {
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
fn wod(url: &str) {
 | 
			
		||||
    let yellow      = "\x1b[1;33m";
 | 
			
		||||
    let purple      = "\x1b[0;35m";
 | 
			
		||||
    let nc          = "\x1b[0m";
 | 
			
		||||
 | 
			
		||||
    let resp = reqwest::get(url).unwrap();
 | 
			
		||||
    assert!(resp.status().is_success());
 | 
			
		||||
 | 
			
		||||
    let document    = Document::from_read(resp).unwrap();
 | 
			
		||||
    let node        = document.find(Class("word-header")).next().unwrap();
 | 
			
		||||
    let word        = node.find(Name("h1")).next().unwrap().text();
 | 
			
		||||
 | 
			
		||||
    let node        = document.find(Class("word-attributes")).next().unwrap();
 | 
			
		||||
    let attr        = node.find(Class("main-attr")).next().unwrap().text();
 | 
			
		||||
    let syllables   = node.find(Class("word-syllables")).next().unwrap().text();
 | 
			
		||||
 | 
			
		||||
    println!("Word of the Day: {}{} : {} ({}){}", yellow, word, attr, syllables, nc);
 | 
			
		||||
    for definition in document.find(Class("wod-definition-container").child(Name("p"))) {
 | 
			
		||||
        let children: Vec<String> = definition.children().map(|n| n.text()).collect();
 | 
			
		||||
        let texts = children.join("");
 | 
			
		||||
        println!("     definition: {}{}{}", purple, texts, nc);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user