mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-27 00:07:16 +00:00
Merge branch 'master' into crawler_manager
This commit is contained in:
commit
8633d6460c
3 changed files with 52 additions and 45 deletions
|
@ -271,8 +271,10 @@ def update_tag_last_seen(tag, tag_first_seen, tag_last_seen):
|
||||||
if r_serv_tags.scard('{}:{}'.format(tag, tag_last_seen)) > 0:
|
if r_serv_tags.scard('{}:{}'.format(tag, tag_last_seen)) > 0:
|
||||||
r_serv_tags.hset('tag_metadata:{}'.format(tag), 'last_seen', tag_last_seen)
|
r_serv_tags.hset('tag_metadata:{}'.format(tag), 'last_seen', tag_last_seen)
|
||||||
else:
|
else:
|
||||||
tag_last_seen = Date.date_substract_day(tag_last_seen)
|
# # TODO: # FIXME:
|
||||||
update_tag_last_seen(tag, tag_first_seen, tag_last_seen)
|
#tag_last_seen = Date.date_substract_day(str(tag_last_seen))
|
||||||
|
#update_tag_last_seen(tag, tag_first_seen, tag_last_seen)
|
||||||
|
pass
|
||||||
|
|
||||||
def update_tag_metadata(tag, tag_date, object_type=None, add_tag=True):
|
def update_tag_metadata(tag, tag_date, object_type=None, add_tag=True):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -118,7 +118,10 @@ $AIL_HOME/doc/generate_modules_data_flow_graph.sh
|
||||||
pushd ${AIL_HOME}
|
pushd ${AIL_HOME}
|
||||||
# shallow clone
|
# shallow clone
|
||||||
git fetch --depth=500 --tags --prune
|
git fetch --depth=500 --tags --prune
|
||||||
git fetch --unshallow
|
if [ ! -z "$TRAVIS" ]; then
|
||||||
|
echo "Travis detected"
|
||||||
|
git fetch --unshallow
|
||||||
|
fi
|
||||||
git describe --abbrev=0 --tags | tr -d '\n' > ${AIL_HOME}/update/current_version
|
git describe --abbrev=0 --tags | tr -d '\n' > ${AIL_HOME}/update/current_version
|
||||||
echo "AIL current version:"
|
echo "AIL current version:"
|
||||||
git describe --abbrev=0 --tags
|
git describe --abbrev=0 --tags
|
||||||
|
|
|
@ -55,8 +55,8 @@
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group input-group" >
|
<div class="input-group" >
|
||||||
<input id="ltags" style="width:850%;" type="text" name="ltags">
|
<input id="ltags" type="text" class="form-control" autocomplete="off" style="width: 760px" name="ltags">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-group btn-block">
|
<div class="btn-group btn-block">
|
||||||
|
@ -73,8 +73,8 @@
|
||||||
</div>
|
</div>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
<div class="form-group input-group" >
|
<div class="input-group">
|
||||||
<input id="ltagsgalaxies" style="width:850%;" type="text" name="ltagsgalaxies">
|
<input id="ltagsgalaxies" type="text" class="form-control" autocomplete="off" style="width: 760px" name="ltagsgalaxies">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-group btn-block">
|
<div class="btn-group btn-block">
|
||||||
|
@ -529,51 +529,53 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
{% if crawler_metadata['get_metadata'] %}
|
||||||
var ctx = canvas.getContext('2d'), img = new Image();
|
<script>
|
||||||
|
var ctx = canvas.getContext('2d'), img = new Image();
|
||||||
|
|
||||||
/// turn off image smoothing
|
/// turn off image smoothing
|
||||||
ctx.webkitImageSmoothingEnabled = false;
|
ctx.webkitImageSmoothingEnabled = false;
|
||||||
ctx.imageSmoothingEnabled = false;
|
ctx.imageSmoothingEnabled = false;
|
||||||
|
|
||||||
img.onload = pixelate;
|
img.onload = pixelate;
|
||||||
img.addEventListener("error", img_error);
|
img.addEventListener("error", img_error);
|
||||||
var draw_img = false;
|
var draw_img = false;
|
||||||
|
|
||||||
img.src = "{{ url_for('showsavedpastes.screenshot', filename=crawler_metadata['screenshot']) }}";
|
img.src = "{{ url_for('showsavedpastes.screenshot', filename=crawler_metadata['screenshot']) }}";
|
||||||
|
|
||||||
function pixelate() {
|
function pixelate() {
|
||||||
|
|
||||||
|
/// use slider value
|
||||||
|
if( blocks.value == 50 ){
|
||||||
|
size = 1;
|
||||||
|
} else {
|
||||||
|
var size = (blocks.value) * 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
|
canvas.width = img.width;
|
||||||
|
canvas.height = img.height;
|
||||||
|
|
||||||
|
/// cache scaled width and height
|
||||||
|
w = canvas.width * size;
|
||||||
|
h = canvas.height * size;
|
||||||
|
|
||||||
|
/// draw original image to the scaled size
|
||||||
|
ctx.drawImage(img, 0, 0, w, h);
|
||||||
|
|
||||||
|
/// pixelated
|
||||||
|
ctx.drawImage(canvas, 0, 0, w, h, 0, 0, canvas.width, canvas.height);
|
||||||
|
|
||||||
/// use slider value
|
|
||||||
if( blocks.value == 50 ){
|
|
||||||
size = 1;
|
|
||||||
} else {
|
|
||||||
var size = (blocks.value) * 0.01;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
canvas.width = img.width;
|
function img_error() {
|
||||||
canvas.height = img.height;
|
img.onerror=null;
|
||||||
|
img.src="{{ url_for('static', filename='image/AIL.png') }}";
|
||||||
|
blocks.value = 50;
|
||||||
|
pixelate;
|
||||||
|
}
|
||||||
|
|
||||||
/// cache scaled width and height
|
blocks.addEventListener('change', pixelate, false);
|
||||||
w = canvas.width * size;
|
</script>
|
||||||
h = canvas.height * size;
|
{% endif %}
|
||||||
|
|
||||||
/// draw original image to the scaled size
|
|
||||||
ctx.drawImage(img, 0, 0, w, h);
|
|
||||||
|
|
||||||
/// pixelated
|
|
||||||
ctx.drawImage(canvas, 0, 0, w, h, 0, 0, canvas.width, canvas.height);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function img_error() {
|
|
||||||
img.onerror=null;
|
|
||||||
img.src="{{ url_for('static', filename='image/AIL.png') }}";
|
|
||||||
blocks.value = 50;
|
|
||||||
pixelate;
|
|
||||||
}
|
|
||||||
|
|
||||||
blocks.addEventListener('change', pixelate, false);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue