2021-01-29 14:39:38 +00:00
{% extends 'base.html' %}
{% block content %}
2022-05-10 15:15:41 +00:00
< script type = "text/javascript" src = "{{url_for('static_content', group='js', filename='tabs.js')}}" defer > < / script >
< div class = "edit-form monospaced-textarea" >
< div class = "tabs collapsable" >
< ul >
2022-08-15 16:56:53 +00:00
< li class = "tab" id = "" > < a href = "#url-list" > URL List< / a > < / li >
2022-05-10 15:15:41 +00:00
< li class = "tab" > < a href = "#distill-io" > Distill.io< / a > < / li >
< / ul >
< / div >
< div class = "box-wrap inner" >
2021-08-12 10:05:59 +00:00
< form class = "pure-form pure-form-aligned" action = "{{url_for('import_page')}}" method = "POST" >
2022-03-21 21:54:27 +00:00
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" / >
2022-05-10 15:15:41 +00:00
< div class = "tab-pane-inner" id = "url-list" >
< fieldset class = "pure-group" >
< legend >
Enter one URL per line, and optionally add tags for each URL after a space, delineated by comma
(,):
< br >
< code > https://example.com tag1, tag2, last tag< / code >
< br >
URLs which do not pass validation will stay in the textarea.
< / legend >
< textarea name = "urls" class = "pure-input-1-2" placeholder = "https://"
style="width: 100%;
2021-08-12 10:05:59 +00:00
font-family:monospace;
white-space: pre;
overflow-wrap: normal;
2022-05-10 15:15:41 +00:00
overflow-x: scroll;" rows="25">{{ import_url_list_remaining }}< / textarea >
< / fieldset >
< / div >
< div class = "tab-pane-inner" id = "distill-io" >
< fieldset class = "pure-group" >
< legend >
Copy and Paste your Distill.io watch 'export' file, this should be a JSON file.< / br >
This is < i > experimental< / i > , supported fields are < code > name< / code > , < code > uri< / code > , < code > tags< / code > , < code > config:selections< / code > , the rest (including < code > schedule< / code > ) are ignored.
< br / >
< p >
How to export? < a href = "https://distill.io/docs/web-monitor/how-export-and-import-monitors/" > https://distill.io/docs/web-monitor/how-export-and-import-monitors/< / a > < br / >
Be sure to set your default fetcher to Chrome if required.< / br >
< / p >
< / legend >
< textarea name = "distill-io" class = "pure-input-1-2" style = "width: 100 % ;
font-family:monospace;
white-space: pre;
overflow-wrap: normal;
overflow-x: scroll;" placeholder="Example Distill.io JSON export file
{
" client" : {
" local" : 1
},
" data" : [
{
" name" : " Unraid | News" ,
" uri" : " https://unraid.net/blog" ,
" config" : " {\" selections\" :[{\" frames\" :[{\" index\" :0,\" excludes\" :[],\" includes\" :[{\" type\" :\" xpath\" ,\" expr\" :\" (//div[@id='App']/div[contains(@class,'flex')]/main[contains(@class,'relative')]/section[contains(@class,'relative')]/div[@class='container']/div[contains(@class,'flex')]/div[contains(@class,'w-full')])[1]\" }]}],\" dynamic\" :true,\" delay\" :2}],\" ignoreEmptyText\" :true,\" includeStyle\" :false,\" dataAttr\" :\" text\" }" ,
" tags" : [],
" content_type" : 2,
" state" : 40,
" schedule" : " {\" type\" :\" INTERVAL\" ,\" params\" :{\" interval\" :4447}}" ,
" ts" : " 2022-03-27T15:51:15.667Z"
}
]
}
" rows="25">{{ original_distill_json }}< / textarea >
< / fieldset >
< / div >
2021-08-12 10:05:59 +00:00
< button type = "submit" class = "pure-button pure-input-1-2 pure-button-primary" > Import< / button >
< / form >
2022-05-10 15:15:41 +00:00
< / div >
2021-01-29 14:39:38 +00:00
< / div >
{% endblock %}