Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@a_kawashiro/jendeley

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@a_kawashiro/jendeley - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

built-frontend/static/js/main.25bea2b6.js

8

dist/api.js

@@ -267,3 +267,7 @@ "use strict";

const title = req.title == "" ? yield get_title_from_url(req.url) : req.title;
json = (0, gen_1.registerWeb)(json, req.url, title, req.comments, req.tags);
const date = new Date();
const date_tag = date.toISOString().split("T")[0];
const tags = req.tags;
tags.push(date_tag);
json = (0, gen_1.registerWeb)(json, req.url, title, req.comments, tags);
fs_1.default.writeFileSync(db_path, JSON.stringify(json));

@@ -310,3 +314,3 @@ response.writeHead(200, {

tags.push(date_tag);
json = yield (0, gen_1.registerNonBookPDF)(path_1.default.dirname(db_path), filename, json, req.comments, tags, true, req.url);
json = yield (0, gen_1.registerNonBookPDF)(path_1.default.dirname(db_path), filename, json, req.title, req.comments, tags, true, req.url);
fs_1.default.writeFileSync(db_path, JSON.stringify(json));

@@ -313,0 +317,0 @@ response.writeHead(200, {

@@ -255,3 +255,3 @@ "use strict";

exports.registerWeb = registerWeb;
function registerNonBookPDF(papers_dir, pdf, json_db, comments, tags, rename_using_title, download_url) {
function registerNonBookPDF(papers_dir, pdf, json_db, user_specified_title, comments, tags, rename_using_title, download_url) {
return __awaiter(this, void 0, void 0, function* () {

@@ -281,2 +281,5 @@ logger_1.logger.info("papers_dir = " +

const dbID = t[1];
if (user_specified_title != null) {
json["title"] = user_specified_title;
}
json["comments"] = comments;

@@ -347,2 +350,3 @@ json["tags"] = tags;

pdfs.sort();
pdfs = pdfs.filter((p) => !p.includes(constants_1.JENDELEY_NO_TRACK));
for (const p of pdfs) {

@@ -352,5 +356,2 @@ if (exsting_pdfs.includes(p)) {

}
if (p.includes(constants_1.JENDELEY_NO_TRACK)) {
continue;
}
logger_1.logger.info("Processing " + p);

@@ -377,3 +378,3 @@ let is_book = false;

if (!is_book) {
json_db = yield registerNonBookPDF(papers_dir, p, json_db, "", [], false, null);
json_db = yield registerNonBookPDF(papers_dir, p, json_db, null, "", [], false, null);
}

@@ -380,0 +381,0 @@ }

@@ -39,4 +39,6 @@ #!/usr/bin/env node

.requiredOption("--db <db>", "Database json file generated by scan command")
.option("--no_browser", "Don't launch browser")
.option("--use_dev_port", "Only for developpers")
.action((cmd, options) => {
(0, server_1.startServer)(options._optionValues.db);
(0, server_1.startServer)(options._optionValues.db, options._optionValues.no_browser, options._optionValues.use_dev_port);
});

@@ -43,0 +45,0 @@ program

"use strict";
// This file is shared between client and server
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=schema.js.map

@@ -24,6 +24,6 @@ "use strict";

const api_1 = require("./api");
function startServer(db_path) {
function startServer(db_path, no_browser, use_dev_port) {
if (fs_1.default.existsSync(db_path)) {
const app = (0, express_1.default)();
const port = 5000;
const port = use_dev_port ? 5001 : 5000;
app.use((0, cors_1.default)());

@@ -57,3 +57,5 @@ const built_frontend_dir = path_1.default.join(__dirname, "..", "built-frontend");

logger_1.logger.info(`Open http://localhost:${port} with your browser`);
(0, open_1.default)(`http://localhost:${port}`);
if (!no_browser) {
(0, open_1.default)(`http://localhost:${port}`);
}
});

@@ -60,0 +62,0 @@ }

@@ -6,3 +6,3 @@ {

},
"version": "0.0.10",
"version": "0.0.11",
"description": "",

@@ -18,3 +18,3 @@ "main": "index.js",

"profile_scan_test_pdfs": "npm run build && node --require source-map-support/register --prof dist/index.js scan --papers_dir test_pdfs",
"scan_test_pdfs_and_launch": "npm run build && node --require source-map-support/register dist/index.js scan --papers_dir test_pdfs && node --require source-map-support/register dist/index.js launch --db test_pdfs/jendeley_db.json",
"scan_test_pdfs_and_launch": "npm run build && node --require source-map-support/register dist/index.js scan --papers_dir test_pdfs && node --require source-map-support/register dist/index.js launch --db test_pdfs/jendeley_db.json --use_dev_port --no_browser",
"fix:prettier": "prettier --write src",

@@ -41,2 +41,3 @@ "check:prettier": "prettier --check src"

"@types/base-64": "^1.0.0",
"@types/cors": "^2.8.13",
"@types/express": "^4.17.15",

@@ -43,0 +44,0 @@ "@types/jest": "^29.2.3",

@@ -27,2 +27,15 @@ # jendeley

## Launch automatically
When you are using Linux, you can launch `jendeley` automatically using `systemd`. Please make `~/.config/systemd/user/jendeley.service` with the following contents, run `systemctl --user enable jendeley && systemctl --user start jendeley` and access [http://localhost:5000](http://localhost:5000). You can check log with `journalctl --user -f -u jendeley.service`.
```
[Unit]
Description=jendeley JSON based document organization software
[Service]
ExecStart=jendeley launch --db <FILL PATH TO THE YOUR DATABASE JSON FILE> --no_browser
[Install]
WantedBy=default.target
```
## Check your database

@@ -29,0 +42,0 @@ Because `jendeley` is fully JSON-based, you can check the contents of the

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc