Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- package.json +1 -0
- routes/refinity.js +4 -0
package.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
| 18 |
"express-rate-limit": "^7.1.5",
|
| 19 |
"docx": "^8.5.0",
|
| 20 |
"diff": "^5.2.0",
|
|
|
|
| 21 |
"mammoth": "^1.6.0",
|
| 22 |
"googleapis": "^118.0.0",
|
| 23 |
"jsonwebtoken": "^9.0.2",
|
|
|
|
| 18 |
"express-rate-limit": "^7.1.5",
|
| 19 |
"docx": "^8.5.0",
|
| 20 |
"diff": "^5.2.0",
|
| 21 |
+
"jszip": "^3.10.1",
|
| 22 |
"mammoth": "^1.6.0",
|
| 23 |
"googleapis": "^118.0.0",
|
| 24 |
"jsonwebtoken": "^9.0.2",
|
routes/refinity.js
CHANGED
|
@@ -3,6 +3,7 @@ const multer = require('multer');
|
|
| 3 |
const mammoth = require('mammoth');
|
| 4 |
const { diffWords } = require('diff');
|
| 5 |
const { Document, Packer, Paragraph, TextRun, CommentRangeStart, CommentRangeEnd, CommentReference, Comments } = require('docx');
|
|
|
|
| 6 |
|
| 7 |
const router = express.Router();
|
| 8 |
const RefinityTask = require('../models/RefinityTask');
|
|
@@ -154,6 +155,9 @@ router.post('/track-changes-comments', async (req, res) => {
|
|
| 154 |
}
|
| 155 |
});
|
| 156 |
|
|
|
|
|
|
|
|
|
|
| 157 |
// ---- Persistence Endpoints ----
|
| 158 |
// Tasks
|
| 159 |
router.get('/tasks', async (req, res) => {
|
|
|
|
| 3 |
const mammoth = require('mammoth');
|
| 4 |
const { diffWords } = require('diff');
|
| 5 |
const { Document, Packer, Paragraph, TextRun, CommentRangeStart, CommentRangeEnd, CommentReference, Comments } = require('docx');
|
| 6 |
+
const JSZip = require('jszip');
|
| 7 |
|
| 8 |
const router = express.Router();
|
| 9 |
const RefinityTask = require('../models/RefinityTask');
|
|
|
|
| 155 |
}
|
| 156 |
});
|
| 157 |
|
| 158 |
+
// NOTE: True Word revision tracking (w:ins/w:del, w:comments) at OOXML level is possible by post-processing the .docx zip.
|
| 159 |
+
// If you want me to proceed, I can generate proper w:ins/w:del runs and a /word/comments.xml part with relationships.
|
| 160 |
+
|
| 161 |
// ---- Persistence Endpoints ----
|
| 162 |
// Tasks
|
| 163 |
router.get('/tasks', async (req, res) => {
|