Skip to content

Commit

Permalink
Update to 2023
Browse files Browse the repository at this point in the history
aqzas committed Jul 3, 2023
1 parent 0746518 commit 5305e8d
Showing 5 changed files with 32 additions and 12 deletions.
Binary file removed 1912623-1.0.0.upx
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -11,4 +11,4 @@ A **utools** plugin used for query journals' **IMPACT FACTOR** (source from 2019

type `ifs` in utools, then input the journal name in search bar, fuzzy search is supported.

![](2020-04-29 03.24.25.gif)
![Usage](2020-04-29 03.24.25.gif)
38 changes: 29 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
@@ -4,9 +4,10 @@
<meta charset="utf8" />

<script src="assets/liquidmetal.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">


</head>
<body>
@@ -28,35 +29,54 @@
width="100"
>
</el-table-column>
<!-- <el-table-column
prop = 'score'
label = 'Score'>
</el-table-column> -->
</el-table>

</div>


</body>

<script>

function comparef(x, y) {
return y['score'] - x['score']
}
// function comparef(x, y) {
// return y['score'] - x['score']
// }

var tb = new Vue({
el: '#app',
data: {
tableData: [{}]
}
})

// with open("./if2023.json", 'w') as handle:
// json.dump(tab.to_json(orient='records'), handle)


var if_data = window.readjson();
utools.onPluginEnter(({ code, type, payload }) => {
utools.setExpendHeight(0);
utools.setSubInput(({
text
}) => {
utools.setExpendHeight(500);
for(item of if_data) {
item['score'] = LiquidMetal.score( item['journal'], text )

if(text == '') {
utools.setExpendHeight(0);
}
else {
utools.setExpendHeight(500);
for(item of if_data) {
item['score'] = LiquidMetal.score( item['journal'], text )
}
if_data.sort((a, b) => a['score'] - b['score'])
if_data.reverse()
tb.tableData = if_data.slice(0, 9)
}
if_data.sort(comparef)
tb.tableData = if_data.slice(0, 9)


}, "Input journal name" );
});
3 changes: 1 addition & 2 deletions preload.js
Original file line number Diff line number Diff line change
@@ -3,8 +3,7 @@ const { readFileSync } = require('fs')


readjson = function () {

const if_data = JSON.parse(readFileSync(__dirname + "/res/if.json"));
const if_data = JSON.parse(readFileSync(__dirname + "/res/if2023.json"));
return if_data;
}

1 change: 1 addition & 0 deletions res/if2023.json

Large diffs are not rendered by default.

0 comments on commit 5305e8d

Please sign in to comment.