Skip to content

Commit

Permalink
onefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamlinerm committed Oct 20, 2024
1 parent 54fe977 commit 55bca33
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion AuthorHours.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time":"479h6m27s"}
{"time":"479h40m40s"}
1 change: 0 additions & 1 deletion AuthorHours.txt

This file was deleted.

4 changes: 2 additions & 2 deletions hourstxtToJSON.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const path = require("path");

// open AuthorHours.txt and write time into JSON file

const hours = fs.readFileSync("AuthorHours.txt", "utf8");
const hours = fs.readFileSync("authorHours.json", "utf8");
console.log(hours.split("\n")[0].split(": ")[1]);
const json = { time: hours.split("\n")[0].split(": ")[1] };

fs.writeFile("AuthorHours.json", JSON.stringify(json), "utf8", function (err) {
fs.writeFile("authorHours.json", JSON.stringify(json), "utf8", function (err) {
if (err) return console.log(err);
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"lint": "web-ext lint",
"esLint": "npx eslint firefox/ chrome/",
"test": "cd firefox && web-ext build --overwrite-dest && cd .. && node refreshXPI.js && python test.py",
"hours": "git hours -since 2018-02-01 -before today -author [email protected] > AuthorHours.txt && node hourstxtToJSON.js"
"hours": "git hours -since 2018-02-01 -before today -author [email protected] > authorHours.json && node hourstxtToJSON.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 55bca33

Please sign in to comment.