Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Mynij-test
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mynij
Mynij-test
Commits
f8e8422e
Commit
f8e8422e
authored
May 28, 2019
by
Alexandra Rogova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
custom parser storage working
parent
e9254adc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
gadget_parser.js
gadget_parser.js
+2
-3
jio-parser-test.js
jio-parser-test.js
+15
-2
No files found.
gadget_parser.js
View file @
f8e8422e
...
...
@@ -22,7 +22,7 @@
.
declareMethod
(
"
read_file_new
"
,
function
(
link
){
var
gadget
=
this
;
return
gadget
.
get_rss
(
link
)
;
return
gadget
.
get_rss
(
link
)
.
push
(
function
(
result
){
var
rss
,
title
;
...
...
@@ -77,8 +77,7 @@
};
xmlhttp
.
open
(
"
GET
"
,
link
,
true
);
xmlhttp
.
send
();
});
})
})
.
declareMethod
(
"
parse
"
,
function
(
local_cur_text
)
{
var
title_start
=
local_cur_text
.
indexOf
(
"
<title>
"
)
+
7
,
...
...
jio-parser-test.js
View file @
f8e8422e
...
...
@@ -26,11 +26,24 @@
if
(
xmlhttp
.
status
==
200
&&
xmlhttp
.
readyState
==
4
){
return
gadget
.
test_storage
.
putAttachment
(
"
doc_id
"
,
"
att_id
"
,
new
Blob
([
xmlhttp
.
responseText
],
{
type
:
"
text/xml
"
}))
.
push
(
function
(){
return
gadget
.
test_storage
.
get
(
"
/0/1
"
);
//return gadget.test_storage.get("/0/1");
console
.
log
(
gadget
.
test_storage
);
return
gadget
.
test_storage
.
allDocs
();
})
.
push
(
function
(
result
){
console
.
log
(
"
get result :
"
);
console
.
log
(
result
);
var
promise_list
=
[],
i
;
for
(
i
=
1
;
i
<
result
.
data
.
total_rows
;
i
+=
1
){
promise_list
.
push
(
gadget
.
test_storage
.
get
(
result
.
data
.
rows
[
i
].
id
));
}
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
(
result
){
var
i
;
for
(
i
=
0
;
i
<
result
.
length
;
i
+=
1
){
if
(
result
[
i
].
title
.
match
(
"
la
"
))
console
.
log
(
result
[
i
]);
}
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment