Compare commits
21 Commits
merge-date
...
fix-output
Author | SHA1 | Date | |
---|---|---|---|
1b2f9a2278 | |||
937708f5d8 | |||
4c3ee712bb | |||
f5af965a33 | |||
bce16d336d | |||
729514ac89 | |||
46ce070b09 | |||
891fa50868 | |||
fdb3963ede | |||
90379a69c5 | |||
0faca67c35 | |||
77b533b642 | |||
ccf013e3c9 | |||
e67db4f1ef | |||
b11a26a812 | |||
4f41d8597f | |||
17b2d359bb | |||
62ca62274e | |||
501cae8329 | |||
0543c3e89f | |||
2191140232 |
12
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
12
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Thanks for contributing to centillion!
|
||||
|
||||
Please place an x between the brackets to indicate a yes answer
|
||||
to the questions below.
|
||||
|
||||
- [ ] Is this pull request mergeable?
|
||||
- [ ] Has this been tested locally?
|
||||
- [ ] Does this pull request pass the tests?
|
||||
- [ ] Have new tests been added to cover any new code?
|
||||
- [ ] Was a spellchecker run on the source code and documentation after
|
||||
changes were made?
|
||||
|
43
CODE_OF_CONDUCT.md
Normal file
43
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Code of Conduct
|
||||
|
||||
## DCPPC Code of Conduct
|
||||
|
||||
All members of the Commons are expected to agree with the following code
|
||||
of conduct. We will enforce this code as needed. We expect cooperation
|
||||
from all members to help ensuring a safe environment for everybody.
|
||||
|
||||
## The Quick Version
|
||||
|
||||
The Consortium is dedicated to providing a harassment-free experience
|
||||
for everyone, regardless of gender, gender identity and expression, age,
|
||||
sexual orientation, disability, physical appearance, body size, race, or
|
||||
religion (or lack thereof). We do not tolerate harassment of Consortium
|
||||
members in any form. Sexual language and imagery is generally not
|
||||
appropriate for any venue, including meetings, presentations, or
|
||||
discussions.
|
||||
|
||||
## The Less Quick Version
|
||||
|
||||
Harassment includes offensive verbal comments related to gender, gender
|
||||
identity and expression, age, sexual orientation, disability, physical
|
||||
appearance, body size, race, religion, sexual images in public spaces,
|
||||
deliberate intimidation, stalking, following, harassing photography or
|
||||
recording, sustained disruption of talks or other events, inappropriate
|
||||
physical contact, and unwelcome sexual attention.
|
||||
|
||||
Members asked to stop any harassing behavior are expected to comply
|
||||
immediately.
|
||||
|
||||
If you are being harassed, notice that someone else is being harassed,
|
||||
or have any other concerns, please contact [Titus
|
||||
Brown](mailto:ctbrown@ucdavis.edu) immediately. If Titus is the cause of
|
||||
your concern, please contact [Vivien
|
||||
Bonazzi](mailto:bonazziv@mail.nih.gov).
|
||||
|
||||
We expect members to follow these guidelines at any Consortium event.
|
||||
|
||||
Original source and credit: <http://2012.jsconf.us/#/about> & The Ada
|
||||
Initiative. Please help by translating or improving:
|
||||
<http://github.com/leftlogic/confcodeofconduct.com>. This work is
|
||||
licensed under a Creative Commons Attribution 3.0 Unported License
|
||||
|
21
CONTRIBUTING.md
Normal file
21
CONTRIBUTING.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Contributing to the DCPPC Internal Repository
|
||||
|
||||
Hello, and thank you for wanting to contribute to the DCPPC Internal
|
||||
Repository\!
|
||||
|
||||
By contributing to this repository, you agree:
|
||||
|
||||
1. To obey the [Code of Conduct](./CODE_OF_CONDUCT.md)
|
||||
2. To release all your contributions under the same terms as the
|
||||
license itself: the [Creative Commons Zero](./LICENSE.md) (aka
|
||||
Public Domain) license
|
||||
|
||||
If you are OK with these two conditions, then we welcome both you and
|
||||
your contribution\!
|
||||
|
||||
If you have any questions about contributing, please [open an
|
||||
issue](https://github.com/dcppc/internal/issues/new) and Team Copper
|
||||
will lend a hand ASAP.
|
||||
|
||||
Thank you for being here and for being a part of the DCPPC project.
|
||||
|
@@ -267,7 +267,11 @@ def list_docs(doctype):
|
||||
if org['login']=='dcppc':
|
||||
# Business as usual
|
||||
search = Search(app.config["INDEX_DIR"])
|
||||
return jsonify(search.get_list(doctype))
|
||||
results_list = search.get_list(doctype)
|
||||
for result in results_list:
|
||||
ct = result['created_time']
|
||||
result['created_time'] = datetime.strftime(ct,"%Y-%m-%d %I:%M %p")
|
||||
return jsonify(results_list)
|
||||
|
||||
# nope
|
||||
return render_template('403.html')
|
||||
|
@@ -744,10 +744,10 @@ class Search:
|
||||
full_items[f['id']] = f
|
||||
|
||||
## Shorter:
|
||||
break
|
||||
#break
|
||||
## Longer:
|
||||
#if nextPageToken is None:
|
||||
# break
|
||||
if nextPageToken is None:
|
||||
break
|
||||
|
||||
|
||||
writer = self.ix.writer()
|
||||
@@ -795,7 +795,7 @@ class Search:
|
||||
subprocess.call(['rm','-fr',temp_dir])
|
||||
|
||||
writer.commit()
|
||||
print("Done, updated %d documents in the index" % count)
|
||||
print("Done, updated %d Google Drive files in the index" % count)
|
||||
|
||||
|
||||
# ------------------------------
|
||||
@@ -873,7 +873,7 @@ class Search:
|
||||
|
||||
|
||||
writer.commit()
|
||||
print("Done, updated %d documents in the index" % count)
|
||||
print("Done, updated %d Github issues in the index" % count)
|
||||
|
||||
|
||||
|
||||
@@ -1247,7 +1247,7 @@ class Search:
|
||||
elif doctype=='issue':
|
||||
item_keys = ['title','repo_name','repo_url','url','created_time','modified_time']
|
||||
elif doctype=='emailthread':
|
||||
item_keys = ['title','owner_name','url','created_time','modified_time']
|
||||
item_keys = ['title','owner_name','url','group','created_time','modified_time']
|
||||
elif doctype=='disqus':
|
||||
item_keys = ['title','created_time','url']
|
||||
elif doctype=='ghfile':
|
||||
|
@@ -1,20 +1,38 @@
|
||||
######################################
|
||||
# github oauth
|
||||
GITHUB_OAUTH_CLIENT_ID = "XXX"
|
||||
GITHUB_OAUTH_CLIENT_SECRET = "YYY"
|
||||
|
||||
######################################
|
||||
# github acces token
|
||||
GITHUB_TOKEN = "XXX"
|
||||
|
||||
######################################
|
||||
# groups.io
|
||||
GROUPSIO_TOKEN = "XXXXX"
|
||||
GROUPSIO_USERNAME = "XXXXX"
|
||||
GROUPSIO_PASSWORD = "XXXXX"
|
||||
|
||||
######################################
|
||||
# Disqus API public key
|
||||
DISQUS_TOKEN = "XXXXX"
|
||||
|
||||
######################################
|
||||
# everything else
|
||||
|
||||
# Location of index file
|
||||
INDEX_DIR = "search_index"
|
||||
|
||||
# oauth client deets
|
||||
GITHUB_OAUTH_CLIENT_ID = "XXX"
|
||||
GITHUB_OAUTH_CLIENT_SECRET = "YYY"
|
||||
GITHUB_TOKEN = "ZZZ"
|
||||
|
||||
# More information footer: Repository label
|
||||
FOOTER_REPO_ORG = "charlesreid1"
|
||||
FOOTER_REPO_ORG = "dcppc"
|
||||
FOOTER_REPO_NAME = "centillion"
|
||||
|
||||
# Toggle to show Whoosh parsed query
|
||||
SHOW_PARSED_QUERY=True
|
||||
|
||||
TAGLINE = "Search All The Things"
|
||||
TAGLINE = "Search the Data Commons"
|
||||
|
||||
# Flask settings
|
||||
DEBUG = True
|
||||
SECRET_KEY = 'WWWWW'
|
||||
SECRET_KEY = 'XXXXX'
|
||||
|
||||
|
@@ -118,6 +118,7 @@ class DisqusCrawler(object):
|
||||
|
||||
link = response['link']
|
||||
clean_link = re.sub('data-commons.us','nihdatacommons.us',link)
|
||||
clean_link += "#disqus_comments"
|
||||
|
||||
# Finished working on thread.
|
||||
|
||||
|
@@ -66,7 +66,7 @@ class GroupsIOArchivesCrawler(object):
|
||||
|
||||
## Short circuit
|
||||
## for debugging purposes
|
||||
break
|
||||
#break
|
||||
|
||||
return subgroups
|
||||
|
||||
|
BIN
static/centillion_white_beta.png
Normal file
BIN
static/centillion_white_beta.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
BIN
static/centillion_white_localhost.png
Normal file
BIN
static/centillion_white_localhost.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
@@ -57,6 +57,25 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
|
||||
//////////////////////////////////
|
||||
// utility functions
|
||||
|
||||
// https://stackoverflow.com/a/25275808
|
||||
function iso8601(date) {
|
||||
var hours = date.getHours();
|
||||
var minutes = date.getMinutes();
|
||||
var ampm = hours >= 12 ? 'PM' : 'AM';
|
||||
hours = hours % 12;
|
||||
hours = hours ? hours : 12; // the hour '0' should be '12'
|
||||
minutes = minutes < 10 ? '0'+minutes : minutes;
|
||||
var strTime = hours + ':' + minutes + ' ' + ampm;
|
||||
return date.getYear() + "-" + (date.getMonth()+1) + "-" + date.getDate() + " " + strTime;
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/a/7390612
|
||||
var toType = function(obj) {
|
||||
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
// API-to-Table Functions
|
||||
@@ -315,8 +334,10 @@ function load_emailthreads_table(){
|
||||
var r = new Array(), j = -1, size=result.length;
|
||||
r[++j] = '<thead>'
|
||||
r[++j] = '<tr class="header-row">';
|
||||
r[++j] = '<th width="70%">Topic</th>';
|
||||
r[++j] = '<th width="30%">Started By</th>';
|
||||
r[++j] = '<th width="60%">Topic</th>';
|
||||
r[++j] = '<th width="15%">Started By</th>';
|
||||
r[++j] = '<th width="15%">Date</th>';
|
||||
r[++j] = '<th width="10%">Mailing List</th>';
|
||||
r[++j] = '</tr>';
|
||||
r[++j] = '</thead>'
|
||||
r[++j] = '<tbody>'
|
||||
@@ -327,6 +348,10 @@ function load_emailthreads_table(){
|
||||
r[++j] = '</a>'
|
||||
r[++j] = '</td><td>';
|
||||
r[++j] = result[i]['owner_name'];
|
||||
r[++j] = '</td><td>';
|
||||
r[++j] = result[i]['created_time'];
|
||||
r[++j] = '</td><td>';
|
||||
r[++j] = result[i]['group'];
|
||||
r[++j] = '</td></tr>';
|
||||
}
|
||||
r[++j] = '</tbody>'
|
||||
|
@@ -58,7 +58,7 @@ button#feedback {
|
||||
/* search results table */
|
||||
td#search-results-score-col,
|
||||
td#search-results-type-col {
|
||||
width: 100px;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
div.container {
|
||||
@@ -86,6 +86,14 @@ div.container {
|
||||
}
|
||||
|
||||
/* badges for number of docs indexed */
|
||||
span.results-count {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
span.indexing-count {
|
||||
background-color: #337ab7;
|
||||
}
|
||||
|
||||
span.badge {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
@@ -126,7 +134,7 @@ li.search-group-item {
|
||||
}
|
||||
|
||||
div.url {
|
||||
background-color: rgba(86,61,124,.15);
|
||||
background-color: rgba(40,40,60,.15);
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
@@ -192,7 +200,7 @@ table {
|
||||
|
||||
.info, .last-searches {
|
||||
color: gray;
|
||||
font-size: 12px;
|
||||
/*font-size: 12px;*/
|
||||
font-family: Arial, serif;
|
||||
}
|
||||
|
||||
@@ -202,27 +210,27 @@ table {
|
||||
|
||||
div.tags a, td.tag-cloud a {
|
||||
color: #b56020;
|
||||
font-size: 12px;
|
||||
/*font-size: 12px;*/
|
||||
}
|
||||
|
||||
td.tag-cloud, td.directories-cloud {
|
||||
font-size: 12px;
|
||||
/*font-size: 12px;*/
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
td.directories-cloud a {
|
||||
font-size: 12px;
|
||||
/*font-size: 12px;*/
|
||||
color: #377BA8;
|
||||
}
|
||||
|
||||
div.path {
|
||||
font-size: 12px;
|
||||
/*font-size: 12px;*/
|
||||
color: #666666;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
div.path a {
|
||||
font-size: 12px;
|
||||
/*font-size: 12px;*/
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
|
@@ -7,11 +7,18 @@
|
||||
<div class="col12sm" id="banner-col">
|
||||
<center>
|
||||
<a id="banner-a" href="{{ url_for('search')}}?query=&fields=">
|
||||
<img id="banner-img" src="{{ url_for('static', filename='centillion_white.png') }}">
|
||||
{% if 'betasearch' in request.url %}
|
||||
<img id="banner-img" src="{{ url_for('static', filename='centillion_white_beta.png') }}">
|
||||
{% elif 'localhost' in request.url %}
|
||||
<img id="banner-img" src="{{ url_for('static', filename='centillion_white_localhost.png') }}">
|
||||
{% else %}
|
||||
<img id="banner-img" src="{{ url_for('static', filename='centillion_white.png') }}">
|
||||
{% endif %}
|
||||
</a>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if config['TAGLINE'] %}
|
||||
<div class="row" id="tagline-row">
|
||||
<div class="col12sm" id="tagline-col">
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<div class="alert alert-success alert-dismissible fade in">
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
{% for message in messages %}
|
||||
<p class="lead">{{ message }}</p>
|
||||
<p>{{ message }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -52,8 +52,8 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 info">
|
||||
<b>Found:</b> <span class="badge">{{entries|length}}</span> results
|
||||
out of <span class="badge">{{totals["total"]}}</span> total items indexed
|
||||
<b>Found:</b> <span class="badge results-count">{{entries|length}}</span> results
|
||||
out of <span class="badge results-count">{{totals["total"]}}</span> total items indexed
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,32 +67,32 @@
|
||||
<div class="col-xs-12 info">
|
||||
<b>Indexing:</b>
|
||||
|
||||
<span class="badge">{{totals["gdoc"]}}</span>
|
||||
<span class="badge indexing-count">{{totals["gdoc"]}}</span>
|
||||
<a href="/master_list?doctype=gdoc#gdoc">
|
||||
Google Drive files
|
||||
</a>,
|
||||
|
||||
<span class="badge">{{totals["issue"]}}</span>
|
||||
<span class="badge indexing-count">{{totals["issue"]}}</span>
|
||||
<a href="/master_list?doctype=issue#issue">
|
||||
Github issues
|
||||
</a>,
|
||||
|
||||
<span class="badge">{{totals["ghfile"]}}</span>
|
||||
<span class="badge indexing-count">{{totals["ghfile"]}}</span>
|
||||
<a href="/master_list?doctype=ghfile#ghfile">
|
||||
Github files
|
||||
</a>,
|
||||
|
||||
<span class="badge">{{totals["markdown"]}}</span>
|
||||
<span class="badge indexing-count">{{totals["markdown"]}}</span>
|
||||
<a href="/master_list?doctype=markdown#markdown">
|
||||
Github Markdown files
|
||||
</a>,
|
||||
|
||||
<span class="badge">{{totals["emailthread"]}}</span>
|
||||
<span class="badge indexing-count">{{totals["emailthread"]}}</span>
|
||||
<a href="/master_list?doctype=emailthread#emailthread">
|
||||
Groups.io email threads
|
||||
</a>,
|
||||
|
||||
<span class="badge">{{totals["disqus"]}}</span>
|
||||
<span class="badge indexing-count">{{totals["disqus"]}}</span>
|
||||
<a href="/master_list?doctype=disqus#disqus">
|
||||
Disqus comment threads
|
||||
</a>
|
||||
@@ -101,6 +101,7 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user