first commit for refactored project
This commit is contained in:
18
ax3Services/docGenService/createWatcher.mjs
Normal file
18
ax3Services/docGenService/createWatcher.mjs
Normal file
@@ -0,0 +1,18 @@
|
||||
import * as fs from "fs";
|
||||
import * as sleep from "system-sleep";
|
||||
import createFormattedContent from "./responseHeaderGenerator.mjs";
|
||||
|
||||
const directory = "/Users/kjannette/workspace/agentxa2new/Backend/Doctemp";
|
||||
|
||||
async function watchOnce() {
|
||||
const watcher = fs.watch(directory, (event, file) => {
|
||||
const path = `/Users/kjannette/workspace/agentxa2new/Backend/Doctemp/${file}`;
|
||||
createFormattedContent(path);
|
||||
watcher.close();
|
||||
// Relaunch watcher after 1 second
|
||||
sleep(1000);
|
||||
watchOnce();
|
||||
});
|
||||
}
|
||||
|
||||
watchOnce();
|
||||
@@ -0,0 +1,79 @@
|
||||
import {
|
||||
AlignmentType,
|
||||
Document,
|
||||
convertInchesToTwip,
|
||||
Packer,
|
||||
Paragraph,
|
||||
Styles,
|
||||
Style,
|
||||
SectionType,
|
||||
TextRun,
|
||||
UnderlineType,
|
||||
Underline,
|
||||
} from "docx";
|
||||
|
||||
export const newYorkCaptionTemplate = (
|
||||
jurisdiction,
|
||||
venue,
|
||||
plaintiff,
|
||||
defendant,
|
||||
caseNumber,
|
||||
judge,
|
||||
documentType,
|
||||
comesNow
|
||||
) => {
|
||||
const template = [
|
||||
new Paragraph({
|
||||
text: `${jurisdiction}`,
|
||||
style: "normalIndent",
|
||||
}),
|
||||
new Paragraph({ text: `${venue}`, style: "normalIndent" }),
|
||||
new Paragraph({
|
||||
text: "________________________________________________",
|
||||
}),
|
||||
new Paragraph({
|
||||
text: `${plaintiff}`,
|
||||
style: "normalIndentSpacingAfter",
|
||||
}),
|
||||
new Paragraph({
|
||||
text: `Plaintiffs, Index No.: ${caseNumber}`,
|
||||
style: "captionIndent",
|
||||
}),
|
||||
new Paragraph({
|
||||
text: `-against- Judge: ${judge}`,
|
||||
style: "normalIndentMostSpacingAfter",
|
||||
}),
|
||||
new Paragraph({
|
||||
text: `${defendant}`,
|
||||
style: "normalIndentSpacingAfter",
|
||||
}),
|
||||
new Paragraph({
|
||||
text: "Defendants.",
|
||||
style: "captionIndent",
|
||||
}),
|
||||
new Paragraph({
|
||||
text: "________________________________________________",
|
||||
style: "normalIndent",
|
||||
}),
|
||||
new Paragraph({
|
||||
style: "headingIndent",
|
||||
children: [
|
||||
new TextRun({
|
||||
text: `RESPONSE TO ${documentType}`,
|
||||
bold: true,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
new Paragraph({
|
||||
style: "reset",
|
||||
children: [
|
||||
new TextRun({
|
||||
text: `COMES NOW, ${comesNow}, by and through the undersigned counsel, in accordance with NY CPLR § 3133, et. seq., as and for its response to the ${documentType.toLowerCase()}, served upon it, and states as follows:`,
|
||||
bold: false,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
];
|
||||
|
||||
return template;
|
||||
};
|
||||
175
ax3Services/docGenService/documentTemplates/styleTemplates.mjs
Normal file
175
ax3Services/docGenService/documentTemplates/styleTemplates.mjs
Normal file
@@ -0,0 +1,175 @@
|
||||
import {
|
||||
AlignmentType,
|
||||
Document,
|
||||
convertInchesToTwip,
|
||||
Packer,
|
||||
Paragraph,
|
||||
Styles,
|
||||
Style,
|
||||
SectionType,
|
||||
TextRun,
|
||||
UnderlineType,
|
||||
Underline,
|
||||
LineRuleType,
|
||||
} from "docx";
|
||||
|
||||
export const newYorkStyleTemplate = {
|
||||
styles: {
|
||||
paragraphStyles: [
|
||||
{
|
||||
id: "captionIndent",
|
||||
name: "Caption Indent",
|
||||
basedOn: "Normal",
|
||||
next: "Normal",
|
||||
paragraph: {
|
||||
indent: {
|
||||
left: convertInchesToTwip(1.5),
|
||||
hanging: convertInchesToTwip(0.18),
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "headingIndent",
|
||||
name: "Heading Indent",
|
||||
basedOn: "Normal",
|
||||
next: "Normal",
|
||||
paragraph: {
|
||||
indent: {
|
||||
left: convertInchesToTwip(2.1),
|
||||
hanging: convertInchesToTwip(0.18),
|
||||
},
|
||||
spacing: {
|
||||
before: 340,
|
||||
after: 340,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "indexIndent",
|
||||
name: "indexIndent",
|
||||
basedOn: "Normal",
|
||||
next: "Normal",
|
||||
paragraph: {
|
||||
indent: {
|
||||
left: convertInchesToTwip(4),
|
||||
hanging: convertInchesToTwip(0.18),
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "normalIndent",
|
||||
name: "Normal Indent",
|
||||
basedOn: "Normal",
|
||||
next: "Normal",
|
||||
paragraph: {
|
||||
indent: {
|
||||
left: convertInchesToTwip(0),
|
||||
hanging: convertInchesToTwip(0.18),
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "normalIndentSpacingAfter",
|
||||
name: "normalIndentSpacingAfter",
|
||||
basedOn: "Normal",
|
||||
next: "Normal",
|
||||
paragraph: {
|
||||
indent: {
|
||||
left: convertInchesToTwip(0),
|
||||
hanging: convertInchesToTwip(0.18),
|
||||
},
|
||||
spacing: {
|
||||
after: 240,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "normalIndentMoreSpacingAfter",
|
||||
name: "normalIndentSpacingAfter",
|
||||
basedOn: "Normal",
|
||||
next: "Normal",
|
||||
paragraph: {
|
||||
indent: {
|
||||
left: convertInchesToTwip(0),
|
||||
hanging: convertInchesToTwip(0.18),
|
||||
},
|
||||
spacing: {
|
||||
after: 310,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "normalIndentMostSpacingAfter",
|
||||
name: "normalIndentSpacingAfter",
|
||||
basedOn: "Normal",
|
||||
next: "Normal",
|
||||
paragraph: {
|
||||
indent: {
|
||||
left: convertInchesToTwip(0),
|
||||
hanging: convertInchesToTwip(0.18),
|
||||
},
|
||||
spacing: {
|
||||
after: 340,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "verticalSpacing",
|
||||
name: "Vertical Spacing",
|
||||
basedOn: "Normal",
|
||||
next: "Normal",
|
||||
paragraph: {
|
||||
spacing: {
|
||||
after: 220,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "reset",
|
||||
name: "reset",
|
||||
basedOn: "Normal",
|
||||
next: "Normal",
|
||||
paragraph: {
|
||||
indent: {
|
||||
left: convertInchesToTwip(0),
|
||||
hanging: convertInchesToTwip(0),
|
||||
},
|
||||
spacing: {
|
||||
after: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "doubleSpacedText",
|
||||
name: "Double Spaced Text",
|
||||
basedOn: "Normal",
|
||||
next: "Normal",
|
||||
paragraph: {
|
||||
spacing: {
|
||||
before: 10 * 72 * 0.1,
|
||||
after: 10 * 72 * 0.01,
|
||||
lineRule: LineRuleType.AT_LEAST,
|
||||
line: 2,
|
||||
},
|
||||
alignment: AlignmentType.JUSTIFIED,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "secondHeaderRun",
|
||||
name: "Second Header Run",
|
||||
basedOn: "Normal",
|
||||
next: "Normal",
|
||||
paragraph: {
|
||||
spacing: {
|
||||
before: 10 * 72 * 0.3,
|
||||
after: 10 * 72 * 0.3,
|
||||
lineRule: LineRuleType.EXACTLY,
|
||||
line: 276,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
sections: [],
|
||||
};
|
||||
348
ax3Services/docGenService/generateDocument.py
Normal file
348
ax3Services/docGenService/generateDocument.py
Normal file
@@ -0,0 +1,348 @@
|
||||
import json
|
||||
import os
|
||||
from docx import Document
|
||||
from docx.shared import Inches
|
||||
from docx.shared import Pt
|
||||
from docx.shared import Length
|
||||
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
|
||||
from docx.enum.text import WD_ALIGN_PARAGRAPH
|
||||
from pyCaptionTemplates import make_ny_header, make_nj_header, make_fl_header, make_mi_header
|
||||
from pyGenObjectionTemplates import make_ny_gen_obj, make_nj_gen_obj, make_fl_gen_obj, make_mi_gen_obj
|
||||
from pyOutgoingCopy import make_outgoing_instructions
|
||||
from pyRequestsForProduction import make_requests_for_production
|
||||
|
||||
|
||||
class GenerateBody(object):
|
||||
def generate(self, docId):
|
||||
|
||||
path = os.path.abspath(os.path.join(os.path.dirname( __file__ ), ".."))
|
||||
foundationRogArray = [
|
||||
"State your full name, home addresses for the past ten years, your employer for the last 10 years, your current work address, date of birth and social security number.",
|
||||
"Identify all insurance carriers or self-insured funds, by name, address, policy numbers and policy limits, for any insurance policy or fund which may provide coverage for any judgment entered against you in this action.",
|
||||
"If you contend that any other entity or person, including any other party or the Plaintiff, was responsible for the occurrence and Plaintiff's damages, identify such person(s) or entities, and give a concise statement of the facts upon which you rely in support of your contention.",
|
||||
"Identify all experts who will be called to testify at a trial on the merits of this action, the subject matter and substance of such testimony, a summary of the grounds for each opinion; and produce any written report made by the expert concerning those findings and opinions.",
|
||||
"Identify any documents and recordings including, but not limited to, pictures, photographs, PowerPoint presentations for use at trial, demonstrative exhibits, computer generated exhibits, electronically stored data, visual aids, overlays, employment records, plats, visual recorded images, audio recordings, cassette tapes, transcripts of testimony, diagrams and objects relative to the occurrence, the scene of the occurrence, Plaintiff's physical condition or statements made by any party or witness. Identify the substance of the item, the date obtained, what is depicted within the item, and the name and address of the present custodian of each item.",
|
||||
"If you, your insurance carrier, private investigator, or any other person or entity is in possession of any written, oral or recorded statements by any party or person with personal knowledge relative to the occurrence, indicate the date and time each statement was obtained, the name and address of each person who provided the statement, the contents of the statement, and the name and address of the current custodian of the statement.",
|
||||
"Describe any conduct, comment, conversation, statement, or report made by any person at the scene of the occurrence or at any time, concerning fault for the occurrence or facts relevant to any issue in this case. Include in your answer where the conduct, comment, conversation, or statement took place, and in whose presence it was made/observed, as well as the name of the author of such statement, the present custodian of the statement and the address for the custodian.",
|
||||
"Since your eighteenth birthday, when you were represented by an attorney or waived the right to be represented by an attorney, state whether you have been found guilty of, or plead guilty to, any crimes other than minor traffic violations (i.e., those traffic offenses without the potential penalty of incarceration) and, if so, state the nature of the offense, the date of each conviction, and the full name of the court where each conviction was entered.",
|
||||
"If you are aware of any other case or proceeding involving the incident identified in Plaintiff's Complaint including, but not limited to, civil, criminal or administrative actions, identify the case or action by tribunal, case number, docket number or citation number, the date of any hearing, and indicate any pleas in the case(s) and the disposition of the matter(s).",
|
||||
]
|
||||
|
||||
# Init variables
|
||||
reqType = None
|
||||
arrLen = None
|
||||
respArray = None
|
||||
reqArray = None
|
||||
reqHeader = None
|
||||
respHeader = None
|
||||
jsonData = None
|
||||
leadAttorneys = None
|
||||
clientPosition = None
|
||||
respondent = None
|
||||
servingParty = None
|
||||
firmStreetAddress = None
|
||||
firmCity = None
|
||||
firmState = None
|
||||
firmZip = None
|
||||
firmTel = None
|
||||
reqFile = None
|
||||
respFile = None
|
||||
# filePath = f"/Users/kjannette/workspace/ax3/ax3Services/docGenService/Docxstaging/{docId}.docx"
|
||||
# f = open(filePath, "rb")
|
||||
document = Document()
|
||||
dataFile = f"./Docxinfo/{docId}.json"
|
||||
|
||||
# Get case data
|
||||
with open(dataFile) as json_data:
|
||||
caseInfo = json.load(json_data)
|
||||
|
||||
#caseInfo = jsonData.get("caseInfo")
|
||||
|
||||
caption1 = caseInfo["caseCaption1"]
|
||||
caption2 = caseInfo["caseCaption2"]
|
||||
clientPosition = caseInfo["clientPosition"]
|
||||
defendant = caseInfo["defendant"]
|
||||
plaintiff = caseInfo["plaintiff"]
|
||||
jurisdiction = caseInfo["jurisdiction"]
|
||||
reqType = caseInfo["currentRequestType"]
|
||||
venue = caseInfo["venue"]
|
||||
caseNumber = caseInfo["caseNumber"]
|
||||
judge = caseInfo["judge"]
|
||||
|
||||
# Get attorney/firm data
|
||||
firm = caseInfo["firm"]
|
||||
leadAttorneys = caseInfo["leadAttorneys"]
|
||||
firmStreetAddress = caseInfo["firmStreetAddress"]
|
||||
firmCity = caseInfo["firmCity"]
|
||||
firmState = caseInfo["state"]
|
||||
firmTel = caseInfo["tel"]
|
||||
firmZip = caseInfo["firmZip"]
|
||||
|
||||
if reqType == "interrogatories":
|
||||
#reqFile = f"/var/www/ax3Services/Documents/Requests/Parsedrogs/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
#respFile = f"/var/www/ax3Services/Documents/Responses/Rogresp/{docId}/{docId}-jbk-responses.json"
|
||||
reqFile = f"{path}/Documents/Requests/interrogatories/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
respFile = f"{path}/Documents/Responses/interrogatories/{docId}/{docId}-jbk-responses.json"
|
||||
elif reqType == "combined-numbered":
|
||||
reqFile = f"{path}/Documents/Requests/combined-numbered/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
respFile = f"{path}/Documents/Responses/combined-numbered/{docId}/{docId}-jbk-responses.json"
|
||||
#reqFile = f"/var/www/ax3Services/Documents/Requests/combined-numbered/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
#respFile = f"/var/www/ax3Services/Documents/Responses/combined-numbered/{docId}/{docId}-jbk-responses.json"
|
||||
elif reqType == "production":
|
||||
reqFile = f"{path}/Documents/Requests/production/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
reqFile = f"{path}/Documents/Requests/production/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
#reqFile = f"/var/www/ax3Services/Documents/Requests/production/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
#reqFile = f"/var/www/ax3Services/Documents/Requests/production/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
elif reqType == "admissions":
|
||||
reqFile = f"{path}/Documents/Requests/admissions/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
respFile = f"{path}/Documents/Responses/admissions/{docId}/{docId}-jbk-responses.json"
|
||||
#reqFile = f"/var/www/ax3Services/Documents/Requests/admissions/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
#respFile = f"/var/www/ax3Services/Documents/Responses/admissions/{docId}/{docId}-jbk-responses.json"
|
||||
elif reqType == "interrogatories-out":
|
||||
reqFile = f"{path}/Documents/RequestsOut/{docId}/{docId}-jbk-requests-out.json"
|
||||
#reqFile = f"/var/www/ax3Services/Documents/RequestsOut/{docId}/{docId}-jbk-requests-out.json"
|
||||
|
||||
if reqType == 'interrogatories-out':
|
||||
if clientPosition == "Plaintiff":
|
||||
respondent = defendant
|
||||
elif clientPosition == "Defendant":
|
||||
respondent = plaintiff
|
||||
else:
|
||||
if clientPosition == "Plaintiff":
|
||||
respondent = plaintiff
|
||||
elif clientPosition == "Defendant":
|
||||
respondent = defendant
|
||||
|
||||
if reqType == 'interrogatories-out':
|
||||
if clientPosition == "Plaintiff":
|
||||
servingParty = plaintiff
|
||||
elif clientPosition == "Defendant":
|
||||
servingParty = defendant
|
||||
else:
|
||||
if clientPosition == "Plaintiff":
|
||||
servingParty = caption2
|
||||
elif clientPosition == "Defendant":
|
||||
servingParty = caption1
|
||||
|
||||
if reqType == 'interrogatories-out':
|
||||
if firmState == "mi":
|
||||
comesNowString = f"COMES NOW, {clientPosition}, {servingParty}, through counsel, and hereby propounds these Interrogatories and Requests for Production upon {respondent}, to be answered under oath, in writing."
|
||||
elif firmState == "ny":
|
||||
comesNowString = f"COMES NOW, {clientPosition}, {servingParty}, through counsel, and hereby propounds these Interrogatories and Requests for Production upon {respondent}, to be answered under oath, in writing, in accordance with NY CPLR 3120 - 3130."
|
||||
elif firmState == "nj":
|
||||
comesNowString = f"Comes now ${clientPosition}, ${servingParty}, through counsel, and hereby propounds these Interrogatories and Requests for Production upon ${respondent}, to be answered to be answered under oath, in writing, in accordance with NJ R. 4:17-1 - 4:18-1, + et. seq. All questions must be answered unless the court otherwise orders or unless a claim of privilege or protective order is made in accordance with R. 4:17-1(b)(3)."
|
||||
elif firmState == "fl":
|
||||
comesNowString = f"COMES NOW, ${clientPosition}, ${servingParty}, through counsel, and hereby propounds these Interrogatories and Requests for Production upon ${respondent}, to be answered to be answered under oath, in writing, in accordance with Rule 1.340, Florida Rules of Civil Procedure."
|
||||
else:
|
||||
comesNowString = f"COMES NOW, Respondent(s), {respondent}, through counsel, in response to the {reqType} served by {servingParty}, and states as follows:"
|
||||
|
||||
if reqType == "interrogatories":
|
||||
reqHeader = "INTERROGATORY NO."
|
||||
respHeader = "RESPONSE TO INTERROGATORY NO."
|
||||
mainHeader = "RESPONSE TO INTERROGATORIES"
|
||||
mainHeader2 = "RESPONSES"
|
||||
elif reqType == "admissions":
|
||||
reqHeader = "Request for Admission No."
|
||||
respHeader = "Response to Request for Admission No."
|
||||
mainHeader = "RESPONSE TO REQUEST FOR ADMISSIONS"
|
||||
mainHeader2 = "RESPONSES"
|
||||
elif reqType == "production":
|
||||
reqHeader = "Request for Production No."
|
||||
respHeader = "Response to Request for Production No."
|
||||
mainHeader = "RESPONSE TO REQUEST FOR PRODUCTON"
|
||||
mainHeader2 = "RESPONSES"
|
||||
elif reqType == 'interrogatories-out':
|
||||
reqHeader = "Request no."
|
||||
respHeader = "Response to Request for Production No."
|
||||
mainHeader = "INTERROGATORIES AND REQUEST FOR PRODUCTION OF DOCUMENTS"
|
||||
mainHeader2 = "INTERROGATORIES"
|
||||
else:
|
||||
reqHeader = "Request No."
|
||||
respHeader = "Response to Request No."
|
||||
mainHeader = "RESPONSE TO INTERROGATORIES AND REQUEST FOR PRODUCTION"
|
||||
mainHeader2 = "RESPONSES"
|
||||
|
||||
# Create header
|
||||
if firmState == "mi":
|
||||
document = make_mi_header(
|
||||
document,
|
||||
jurisdiction,
|
||||
venue,
|
||||
caption1,
|
||||
caption2,
|
||||
mainHeader,
|
||||
caseNumber,
|
||||
judge,
|
||||
clientPosition,
|
||||
)
|
||||
elif firmState == "ny":
|
||||
document = make_ny_header(
|
||||
document,
|
||||
jurisdiction,
|
||||
venue,
|
||||
caption1,
|
||||
caption2,
|
||||
mainHeader,
|
||||
caseNumber,
|
||||
judge,
|
||||
clientPosition,
|
||||
)
|
||||
elif firmState == "nj":
|
||||
document = make_nj_header(
|
||||
comesNowString,
|
||||
firm,
|
||||
leadAttorneys,
|
||||
document,
|
||||
jurisdiction,
|
||||
venue,
|
||||
caption1,
|
||||
caption2,
|
||||
mainHeader,
|
||||
caseNumber,
|
||||
judge,
|
||||
firmStreetAddress,
|
||||
firmCity,
|
||||
firmState,
|
||||
firmTel,
|
||||
firmZip,
|
||||
clientPosition,
|
||||
)
|
||||
elif firmState == "fl":
|
||||
document = make_fl_header(
|
||||
comesNowString,
|
||||
firm,
|
||||
leadAttorneys,
|
||||
document,
|
||||
jurisdiction,
|
||||
venue,
|
||||
caption1,
|
||||
caption2,
|
||||
mainHeader,
|
||||
caseNumber,
|
||||
judge,
|
||||
firmStreetAddress,
|
||||
firmCity,
|
||||
firmState,
|
||||
firmTel,
|
||||
firmZip,
|
||||
clientPosition,
|
||||
)
|
||||
elif firmState == None:
|
||||
document = make_ny_header(
|
||||
document,
|
||||
jurisdiction,
|
||||
venue,
|
||||
caption1,
|
||||
caption2,
|
||||
mainHeader,
|
||||
caseNumber,
|
||||
judge,
|
||||
clientPosition,
|
||||
)
|
||||
|
||||
paragraph = document.add_paragraph(f"{comesNowString}")
|
||||
paragraph.paragraph_format.line_spacing = Pt(24)
|
||||
paragraph.paragraph_format.space_before = Pt(12)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
||||
|
||||
# Add Instructions/Definitions if outgoing, else add General Objections
|
||||
if reqType == "interrogatories-out":
|
||||
document = make_outgoing_instructions(document, clientPosition, servingParty)
|
||||
else:
|
||||
if firmState == "mi":
|
||||
document = make_mi_gen_obj(document, clientPosition, servingParty)
|
||||
elif firmState == "ny":
|
||||
document = make_ny_gen_obj(document, clientPosition, servingParty)
|
||||
elif firmState == "nj":
|
||||
document = make_nj_gen_obj(document, clientPosition, servingParty)
|
||||
elif firmState == "fl":
|
||||
document = make_fl_gen_obj(document, clientPosition, servingParty)
|
||||
|
||||
# Add main heading two
|
||||
p = document.add_paragraph()
|
||||
p.add_run(f"{mainHeader2}").underline = True
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
|
||||
# INIT responses to iterate if doc is responsive, not outgoing
|
||||
if (reqType != "interrogatories-out"):
|
||||
json_resp_data = open(respFile)
|
||||
respData = json.load(json_resp_data)
|
||||
respArray = respData[0]["responses"]
|
||||
arrLen = len(respArray)
|
||||
|
||||
# INIT requests and begin iteration to generate copy
|
||||
if (reqType == "interrogatories-out"):
|
||||
with open(reqFile) as json_data:
|
||||
dataz = json.load(json_data)
|
||||
reqArray = dataz[0]["requests"]
|
||||
filtered = []
|
||||
for req in reqArray:
|
||||
filtered.append(req["text"])
|
||||
|
||||
joinedReqArray = [*foundationRogArray, *filtered]
|
||||
arrLen2 = len(joinedReqArray)
|
||||
count = 1
|
||||
|
||||
for req in joinedReqArray:
|
||||
if count == arrLen2:
|
||||
break
|
||||
|
||||
paragraph = document.add_paragraph(f"{count}. {req}")
|
||||
paragraph.paragraph_format.line_spacing = Pt(20)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
||||
count = count + 1
|
||||
|
||||
document = make_requests_for_production(document, clientPosition, servingParty)
|
||||
|
||||
elif (reqType != "interrogatories-out"):
|
||||
with open(reqFile) as json_data:
|
||||
dataz = json.load(json_data)
|
||||
reqArray = dataz[0]["requests"]
|
||||
count = 1
|
||||
|
||||
for req in reqArray:
|
||||
if count == arrLen:
|
||||
break
|
||||
text = req["text"]
|
||||
paragraph = document.add_paragraph(f"{reqHeader} {count}:")
|
||||
paragraph = document.add_paragraph(text)
|
||||
paragraph.paragraph_format.line_spacing = Pt(20)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
||||
paragraph = document.add_paragraph(f"{respHeader} {count}:")
|
||||
paragraph.paragraph_format.space_before = Pt(24)
|
||||
paragraph = document.add_paragraph(respArray[count]["text"])
|
||||
paragraph.paragraph_format.line_spacing = Pt(24)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
||||
count = count + 1
|
||||
|
||||
paragraph = document.add_paragraph(
|
||||
f"For the {clientPosition}, attorney {leadAttorneys} on this ______ day of _______________________, 2024."
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(24)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph = document.add_paragraph(
|
||||
" ___________________________________"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(24)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
document.save(f"{path}/Docxfinal/{docId}.docx")
|
||||
|
||||
respBody = json.dumps({'Status': 'Success'})
|
||||
return respBody
|
||||
|
||||
# document.save(
|
||||
# f"/Users/kjannette/workspace/ax3/ax3Services/Docxfinal/{docId}.docx"
|
||||
# document.save(f"/var/www/ax3Services/Docxfinal/{docId}.docx")
|
||||
# Uncomment for development/smoke testing
|
||||
#genBod = GenerateBody()
|
||||
|
||||
#genBod.generate("eb75d30a-d58a-4b2e-80ba-695c8a79a1e6")
|
||||
# reqFile = f"/Users/kjannette/workspace/ax3/ax3Services/Documents/Requests/Parsedrogs/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
# respFile = f"/Users/kjannette/workspace/ax3/ax3Services/Documents/Responses/Rogresp/{docId}/{docId}-jbk-responses.json"
|
||||
|
||||
# reqFile = f"/Users/kjannette/workspace/ax3/ax3Services/Documents/Requests/Parsedrogs/{docId}/{docId}-jbk-parsedRequests.json"
|
||||
# respFile = f"/Users/kjannette/workspace/ax3/ax3Services/Documents/Responses/Rogresp/{docId}/{docId}-jbk-responses.json"
|
||||
304
ax3Services/docGenService/pyCaptionTemplates.py
Normal file
304
ax3Services/docGenService/pyCaptionTemplates.py
Normal file
@@ -0,0 +1,304 @@
|
||||
import json
|
||||
from docx import Document
|
||||
from docx.shared import Inches
|
||||
from docx.shared import Pt
|
||||
from docx.shared import Length
|
||||
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
|
||||
|
||||
|
||||
# New York *******************************************************************/
|
||||
def make_ny_header(
|
||||
document,
|
||||
jurisdiction,
|
||||
venue,
|
||||
caption1,
|
||||
caption2,
|
||||
mainHeader,
|
||||
caseNumber,
|
||||
judge,
|
||||
clientPosition,
|
||||
):
|
||||
print(
|
||||
"______________________________________________________________NEW YORK!! MAKE HEADER FIRED"
|
||||
)
|
||||
paragraph = document.add_paragraph(f"{jurisdiction}")
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(1)
|
||||
paragraph = document.add_paragraph(f"{venue}")
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(1)
|
||||
paragraph = document.add_paragraph(
|
||||
"-------------------------------------------------------------X"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(1)
|
||||
paragraph = document.add_paragraph(f"{caption1}")
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph = document.add_paragraph(
|
||||
f" Plaintiff(s) Index No.: {caseNumber}"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph = document.add_paragraph(
|
||||
f"- against - Judge: {judge}"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(16)
|
||||
paragraph = document.add_paragraph(f"{caption2}")
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(1)
|
||||
paragraph = document.add_paragraph(
|
||||
" Defendant(s)"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(3)
|
||||
paragraph = document.add_paragraph(
|
||||
"-------------------------------------------------------------X"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
|
||||
p = document.add_paragraph()
|
||||
p.add_run(f"{clientPosition.upper()}'S {mainHeader}").underline = True
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
|
||||
return document
|
||||
|
||||
|
||||
# Florida *******************************************************************/
|
||||
|
||||
|
||||
def make_fl_header(
|
||||
comesNowString,
|
||||
firm,
|
||||
leadAttorneys,
|
||||
document,
|
||||
jurisdiction,
|
||||
venue,
|
||||
caption1,
|
||||
caption2,
|
||||
mainHeader,
|
||||
caseNumber,
|
||||
judge,
|
||||
firmStreetAddress,
|
||||
firmCity,
|
||||
firmState,
|
||||
firmTel,
|
||||
firmZip,
|
||||
clientPosition,
|
||||
):
|
||||
print(
|
||||
"______________________________________________________________FLORIDA MAKE HEADER FIRED"
|
||||
)
|
||||
jurisdictionUpper = jurisdiction.upper()
|
||||
venueUpper = venue.upper()
|
||||
|
||||
p = document.add_paragraph()
|
||||
p.add_run(f" IN THE CIRCUIT COURT OF THE {jurisdictionUpper}")
|
||||
p.paragraph_format.space_before = Pt(0)
|
||||
p.paragraph_format.space_after = Pt(1)
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
p = document.add_paragraph()
|
||||
p.add_run(f"OF FLORIDA, IN AND FOR {venueUpper} COUNTY")
|
||||
p.paragraph_format.space_before = Pt(0)
|
||||
p.paragraph_format.space_after = Pt(12)
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
paragraph = document.add_paragraph(f"{caption1}")
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph = document.add_paragraph(
|
||||
f" Plaintiff(s), Case No.: {caseNumber}"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph = document.add_paragraph(f"v.")
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(16)
|
||||
paragraph = document.add_paragraph(f"{caption2}")
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(1)
|
||||
paragraph = document.add_paragraph(
|
||||
" Defendant(s)."
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(3)
|
||||
paragraph = document.add_paragraph(
|
||||
"________________________________________________________________________/"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
|
||||
p = document.add_paragraph()
|
||||
p.add_run(f"{clientPosition.upper()}'S {mainHeader}").underline = True
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
|
||||
return document
|
||||
|
||||
|
||||
# New Jersey *******************************************************************/
|
||||
def make_nj_header(
|
||||
comesNowString,
|
||||
firm,
|
||||
leadAttorneys,
|
||||
document,
|
||||
jurisdiction,
|
||||
venue,
|
||||
caption1,
|
||||
caption2,
|
||||
mainHeader,
|
||||
caseNumber,
|
||||
judge,
|
||||
firmStreetAddress,
|
||||
firmCity,
|
||||
firmState,
|
||||
firmTel,
|
||||
firmZip,
|
||||
clientPosition,
|
||||
):
|
||||
paragraph = document.add_paragraph(f"{firm}")
|
||||
paragraph.paragraph_format.space_before = Pt(2)
|
||||
paragraph.paragraph_format.space_after = Pt(2)
|
||||
paragraph = document.add_paragraph(f"By: {leadAttorneys}")
|
||||
paragraph.paragraph_format.space_before = Pt(2)
|
||||
paragraph.paragraph_format.space_after = Pt(2)
|
||||
paragraph = document.add_paragraph(f"{firmStreetAddress}")
|
||||
paragraph.paragraph_format.space_before = Pt(2)
|
||||
paragraph.paragraph_format.space_after = Pt(2)
|
||||
paragraph = document.add_paragraph(f"{firmCity}, {firmState} {firmZip}")
|
||||
paragraph.paragraph_format.space_before = Pt(2)
|
||||
paragraph.paragraph_format.space_after = Pt(2)
|
||||
paragraph = document.add_paragraph(f"Tel: {firmTel}")
|
||||
paragraph.paragraph_format.space_before = Pt(2)
|
||||
paragraph.paragraph_format.space_after = Pt(2)
|
||||
paragraph = document.add_paragraph(
|
||||
f"_______________________________________________________________"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph(f"{caption1:<92} ")
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph(
|
||||
f" {jurisdiction} "
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph(
|
||||
f" {venue} "
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph(
|
||||
f" Plaintiff "
|
||||
)
|
||||
paragraph = document.add_paragraph(
|
||||
f" "
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph(
|
||||
f" v. Docket No,{caseNumber}"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph(
|
||||
f" "
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph(
|
||||
f" "
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph((f"{caption2:<90} "))
|
||||
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph(
|
||||
f" "
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph(
|
||||
f" Defendant "
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph(
|
||||
f" "
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
paragraph = document.add_paragraph(
|
||||
f"_______________________________________________________________"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
|
||||
return document
|
||||
|
||||
# Michigan *******************************************************************/
|
||||
def make_mi_header(
|
||||
document,
|
||||
jurisdiction,
|
||||
venue,
|
||||
caption1,
|
||||
caption2,
|
||||
mainHeader,
|
||||
caseNumber,
|
||||
judge,
|
||||
clientPosition,
|
||||
):
|
||||
print(
|
||||
"______________________________________________________________MICHIGAN MAKE HEADER FIRED"
|
||||
)
|
||||
temp = venue.split(" ", 1)
|
||||
newVenue = temp[0].upper()
|
||||
paragraph = document.add_paragraph("STATE OF MICHIGAN")
|
||||
paragraph.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(1)
|
||||
paragraph = document.add_paragraph(f"IN THE CIRCUIT COURT FOR THE COUNTY OF {newVenue}")
|
||||
paragraph.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(0)
|
||||
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(1)
|
||||
paragraph = document.add_paragraph(" ")
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(1)
|
||||
paragraph = document.add_paragraph(f"{caption1}")
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph = document.add_paragraph(
|
||||
f" Plaintiff(s) Case No.: {caseNumber}"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph = document.add_paragraph(
|
||||
f"v. Hon. {judge}"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(16)
|
||||
paragraph = document.add_paragraph(f"{caption2}")
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(1)
|
||||
paragraph = document.add_paragraph(
|
||||
" Defendant(s)"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(3)
|
||||
paragraph = document.add_paragraph(
|
||||
"___________________________________________________________________/"
|
||||
)
|
||||
paragraph.paragraph_format.space_before = Pt(0)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
|
||||
p = document.add_paragraph()
|
||||
p.add_run(f"{clientPosition.upper()}'S {mainHeader}").underline = True
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
|
||||
return document
|
||||
41
ax3Services/docGenService/pyCreateWatcher.py
Normal file
41
ax3Services/docGenService/pyCreateWatcher.py
Normal file
@@ -0,0 +1,41 @@
|
||||
import sys
|
||||
import time
|
||||
import logging
|
||||
from generateDocument import GenerateBody
|
||||
from watchdog.observers import Observer
|
||||
import os
|
||||
|
||||
# from watchdog.events import LoggingEventHandler
|
||||
from watchdog.events import PatternMatchingEventHandler
|
||||
|
||||
bodygen = GenerateBody()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
def on_created(event):
|
||||
print(f"Event: {event.src_path} was created.")
|
||||
path = str(event.src_path).split("/")
|
||||
print(">>>>>>>>>>>>>>>>>>>>>>>path", path[-1].split(".")[0])
|
||||
docId = str(path[-1].split(".")[0])
|
||||
bodygen.generate(docId)
|
||||
|
||||
root_path = os.path.abspath(os.path.join(os.path.dirname( __file__ ), ".."))
|
||||
patterns = ["*"]
|
||||
ignore_patterns = None
|
||||
ignore_directories = False
|
||||
case_sensitive = True
|
||||
#path = "/var/www/ax3Services/docGenService/Docxinfo"
|
||||
path = f"{root_path}/docGenService/Docxinfo"
|
||||
my_event_handler = PatternMatchingEventHandler(
|
||||
patterns, ignore_patterns, ignore_directories, case_sensitive
|
||||
)
|
||||
my_event_handler.on_created = on_created
|
||||
observer = Observer()
|
||||
observer.schedule(my_event_handler, path, recursive=True)
|
||||
observer.start()
|
||||
try:
|
||||
while True:
|
||||
time.sleep(1)
|
||||
finally:
|
||||
observer.stop()
|
||||
observer.join()
|
||||
133
ax3Services/docGenService/pyGenObjectionTemplates.py
Normal file
133
ax3Services/docGenService/pyGenObjectionTemplates.py
Normal file
@@ -0,0 +1,133 @@
|
||||
import json
|
||||
from docx import Document
|
||||
from docx.shared import Inches
|
||||
from docx.shared import Pt
|
||||
from docx.shared import Length
|
||||
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
|
||||
from docx.enum.text import WD_ALIGN_PARAGRAPH
|
||||
|
||||
|
||||
# Michigan *****************************************************************/
|
||||
def make_mi_gen_obj(document, clientPosition, servingParty):
|
||||
objectionsArray = [
|
||||
f"All of {clientPosition}'s responses herein are subject to the following objections, in addition to any and all specific objections set forth in the responses to individual requests.",
|
||||
f"In responding to these requests, {clientPosition} does not admit or concede any presumptions or assumptions made in the propounding parties' definitions, or in the requests themselves.",
|
||||
f"{clientPosition} objects to any and all requests to the extent they seek or may be interpreted to seek disclosure of information not within the scope of MCR 2.302(B), or not within the scope of what is permitted under any applicable Preliminary Conference or Case Scheduling Order entered in this case, and {clientPosition} reserves all rights to contest any such matters in any other context or proceeding where they may be relevant.",
|
||||
f"{clientPosition} objects to all requests that seek disclosure of information which (a) is subject to attorney-client privilege, or (b) the 'work product' doctrine; (c) is subject to the required reports privilege; (d) is subject to a joint defense or common interest privilege; (e) was generated in anticipation of litigation or for trial, (f) relates to the identity or opinions of experts who have been retained or employed in anticipation of litigation and who are not expected to be called as witnesses at trial; (g) is protected as a trade secret; (h) is subject to a protective order or confidentiality order or agreement which was entered or made in another matter, and/or (i) is otherwise privileged, protected from disclosure, or beyond the scope of discovery under applicable rules and laws. Further, {clientPosition} does not intend to disclose or produce any such information, and any disclosure of such information is inadvertent, and all rights to demand return and/or destruction of any such information are reserved.",
|
||||
f"{clientPosition} objects to the propounding parties' requests insofar as they seek a proposition of law and/or the formulation of a legal theory, or seek contentions regarding factual matters as to which essential discovery is incomplete. {clientPosition}'s current responses to such requests necessarily cannot present all information {clientPosition} may ultimately discover and utilize or rely upon in this matter. {clientPosition} thus reserves all rights to supplement or amend its responses in accordance with applicable rules, laws, orders or agreements of the parties, if and when circumstances warrant.",
|
||||
]
|
||||
print(
|
||||
"______________________________________________________________NEW YORK MAKE OBJECTION FIRED"
|
||||
)
|
||||
p = document.add_paragraph()
|
||||
p.add_run("GENERAL OBJECTIONS").underline = True
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
arrLen = len(objectionsArray)
|
||||
count = 0
|
||||
|
||||
for obj in objectionsArray:
|
||||
if count == arrLen:
|
||||
break
|
||||
|
||||
paragraph = document.add_paragraph(f"{count + 1}. {obj}")
|
||||
paragraph.paragraph_format.line_spacing = Pt(20)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
||||
count = count + 1
|
||||
|
||||
return document
|
||||
|
||||
# New York *****************************************************************/
|
||||
def make_ny_gen_obj(document, clientPosition, servingParty):
|
||||
objectionsArray = [
|
||||
f"All of {clientPosition}'s responses herein are subject to the following objections, in addition to any and all specific objections set forth in the responses to individual requests.",
|
||||
f"In responding to these requests, {clientPosition} does not admit or concede any presumptions or assumptions made in the propounding parties' definitions, or in the requests themselves.",
|
||||
f"{clientPosition} objects to any and all requests to the extent they seek or may be interpreted to seek disclosure of information not within the scope of New York CPLR 3120, 3130 - 33, or not within the scope of what is permitted under any applicable Preliminary Conference or Case Scheduling Order entered in this case, and {clientPosition} reserves all rights to contest any such matters in any other context or proceeding where they may be relevant.",
|
||||
f"{clientPosition} objects to all requests that seek disclosure of information which (a) is subject to attorney-client privilege, or (b) the 'work product' doctrine; (c) is subject to the self-critical analysis privilege; (d) is subject to the required reports privilege; (e) is subject to a joint defense or common interest privilege; (f) was generated in anticipation of litigation or for trial, (g) relates to the identity or opinions of experts who have been retained or employed in anticipation of litigation and who are not expected to be called as witnesses at trial; (h) is protected as a trade secret; (i) is subject to a protective order or confidentiality order or agreement which was entered or made in another matter, and/or (j) is otherwise privileged, protected from disclosure, or beyond the scope of discovery under applicable rules and laws. Further, {clientPosition} does not intend to disclose or produce any such information, and any disclosure of such information is inadvertent, and all rights to demand return and/or destruction of any such information are reserved.",
|
||||
f"{clientPosition} objects to the propounding parties' requests insofar as they seek a proposition of law and/or the formulation of a legal theory, or seek contentions regarding factual matters as to which essential discovery is incomplete. {clientPosition}'s current responses to such requests necessarily cannot present all information {clientPosition} may ultimately discover and utilize or rely upon in this matter. {clientPosition} thus reserves all rights to supplement or amend its responses in accordance with applicable rules, laws, orders or agreements of the parties, if, as and when circumstances may warrant.",
|
||||
]
|
||||
print(
|
||||
"______________________________________________________________NEW YORK MAKE OBJECTION FIRED"
|
||||
)
|
||||
p = document.add_paragraph()
|
||||
p.add_run("GENERAL OBJECTIONS").underline = True
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
arrLen = len(objectionsArray)
|
||||
count = 0
|
||||
|
||||
for obj in objectionsArray:
|
||||
if count == arrLen:
|
||||
break
|
||||
|
||||
paragraph = document.add_paragraph(f"{count + 1}. {obj}")
|
||||
paragraph.paragraph_format.line_spacing = Pt(20)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
||||
count = count + 1
|
||||
|
||||
return document
|
||||
|
||||
|
||||
# New Jersey *******************************************************************/
|
||||
def make_nj_gen_obj(document, clientPosition, servingParty):
|
||||
objectionsArray = [
|
||||
f"All of {clientPosition}’s responses to the discovery requests being answered are subject to the following objections, in addition to any and all objections stated in the answers to each individual request.",
|
||||
f"""{clientPosition} objects to the definitions and instructions included in {servingParty}'s discovery requests, to the extent that: (a) the definitions or instructions are inconsistent with any applicable statutes, regulations, laws, legal precedents, or the terms of any applicable agreements or other legal documents; (b) the definitions or instructions seek to impose on {clientPosition} obligations that exceed the requirements of the New Jersey Rules of Court; and/or, (c) the definitions are overly broad or inclusive, and presume or assume unproven assertions of fact or law.""",
|
||||
f"In responding to these requests, {clientPosition} does not admit or concede any presumptions or assumptions embedded in {servingParty}'s definitions.",
|
||||
f"{clientPosition} objects to any and all requests to the extent they seek or may be interpreted to seek disclosure of information not within the scope of R. 4:10-2(a) or not within the scope of what is permitted under any applicable Case Management Order entered in this case, and {clientPosition} reserves all rights to contest any such matters in any other context or proceeding where they may be relevant.",
|
||||
f"{clientPosition} objects to any and all requests to the extent they seek or may be interpreted to seek disclosure of any information which (a) is subject to the attorney-client privilege; (b) is covered by the 'work product' doctrine; (c) is subject to the self-critical analysis privilege; (d) is subject to the required reports privilege; (e) is subject to a joint defense or common interest privilege; (f) was generated in anticipation of litigation or for trial by or for {clientPosition} or any representatives of {clientPosition} including attorneys, consultants or agents; (g) relates to the identity or opinions of consultants or experts who have been retained or specially employed in anticipation of litigation and who are not expected to be called as witnesses at trial; (h) is protected as a trade secret; (i) is subject to a protective order or confidentiality order or agreement which was entered or made in another matter, to the extent the same prevents disclosure in this matter; and/or (j) is otherwise privileged, protected from disclosure, or beyond the scope of discovery under applicable rules and laws. {clientPosition} does not intend to disclose or produce any such information in response to the request being answered, and the following responses should be read accordingly. Any disclosure of information which is privileged or otherwise protected from disclosure is inadvertent, and all rights to demand return and/or destruction of any such information are reserved.",
|
||||
f"{clientPosition} objects to the propounding parties' requests insofar as they seek a proposition of law and/or the formulation of a legal theory, or seek contentions regarding factual matters as to which essential discovery is incomplete. {clientPosition}'s current responses to such requests necessarily cannot present all information {clientPosition} may ultimately discover and utilize or rely upon in this matter. {clientPosition} thus reserves all rights to supplement or amend its responses in accordance with applicable rules, laws, orders or agreements of the parties as circumstances may warrant.",
|
||||
]
|
||||
print(
|
||||
"______________________________________________________________NEW JERSEY MAKE OBJECTION FIRED"
|
||||
)
|
||||
p = document.add_paragraph()
|
||||
p.add_run("GENERAL OBJECTIONS").underline = True
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
arrLen = len(objectionsArray)
|
||||
count = 0
|
||||
|
||||
for obj in objectionsArray:
|
||||
if count == arrLen:
|
||||
break
|
||||
|
||||
paragraph = document.add_paragraph(f"{count + 1}. {obj}")
|
||||
paragraph.paragraph_format.line_spacing = Pt(20)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
||||
count = count + 1
|
||||
|
||||
return document
|
||||
|
||||
|
||||
# Florida *******************************************************************/
|
||||
def make_fl_gen_obj(document, clientPosition, servingParty):
|
||||
objectionsArray = [
|
||||
f"All of {clientPosition}’s responses to the discovery requests answered herein are subject to the following objections, in addition to any and all objections stated in the answers to each individual request.",
|
||||
f"""{clientPosition} objects to the definitions and instructions included in {servingParty}'s discovery requests, to the extent that: (a) the definitions or instructions are inconsistent with any applicable statutes, rules, legal precedents, or the terms of any applicable agreements or orders; (b) the definitions or instructions seek to impose on {clientPosition} obligations that exceed the requirements of the Florida Rules of Civil Procedure; and/or, (c) the definitions are overly broad or inclusive, and presume or assume unproven assertions of fact or law.""",
|
||||
f"In responding to these requests, {clientPosition} does not admit or concede any presumptions or assumptions embedded in {servingParty}'s definitions.",
|
||||
f"{clientPosition} objects to any and all requests to the extent they seek or may be interpreted to seek disclosure of information not within the scope of what is permitted under any applicable Case Management Order entered in this case, and {clientPosition} reserves all rights to contest any such matters in any other context or proceeding where they may be relevant.",
|
||||
f"{clientPosition} objects to any requests to the extent they seek disclosure of information which is subject to (a) the attorney-client privilege; (b) the 'work product' doctrine; (c) the spousal communications privilege; (e) a joint defense or common interest privilege; or (f) was generated in anticipation of litigation by or for {clientPosition} or any representatives of {clientPosition}; or (g) that relates to the identity or opinions of experts retained in anticipation of litigation and who are not expected to be called as trial witnesses; or (h) is protected as a trade secret; (i) subject to a protective order in another matter; or (j) is otherwise privileged, protected from disclosure, or beyond the scope of discovery. {clientPosition} does not intend to disclose any such information, and disclosure of any information which is privileged or protected from disclosure is inadvertent. All rights to demand return or destruction of such information are reserved.",
|
||||
f"{clientPosition} objects to the propounding parties' requests insofar as they seek a conclusion of law and/or formulation of a legal theory, or seek contentions regarding factual matters as to which essential discovery is incomplete. {clientPosition}'s current responses to such requests necessarily cannot present all information {clientPosition} may ultimately discover and utilize or rely upon in this matter. {clientPosition} thus reserves all rights to supplement or amend its responses in accordance with applicable rules, laws, orders or agreements of the parties as circumstances may warrant.",
|
||||
]
|
||||
print(
|
||||
"______________________________________________________________FLORIDA MAKE OBJECTION FIRED"
|
||||
)
|
||||
|
||||
p = document.add_paragraph()
|
||||
p.add_run("GENERAL OBJECTIONS").underline = True
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
arrLen = len(objectionsArray)
|
||||
count = 0
|
||||
|
||||
for obj in objectionsArray:
|
||||
if count == arrLen:
|
||||
break
|
||||
|
||||
paragraph = document.add_paragraph(f"{count + 1}. {obj}")
|
||||
paragraph.paragraph_format.line_spacing = Pt(20)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
||||
count = count + 1
|
||||
|
||||
return document
|
||||
26
ax3Services/docGenService/pyGenServ.py
Normal file
26
ax3Services/docGenService/pyGenServ.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import bottle
|
||||
from bottle import run, get, post, request, route
|
||||
from bottle import HTTPResponse
|
||||
from generateDocument import GenerateBody
|
||||
from pathlib import Path
|
||||
import json
|
||||
|
||||
def fix_environ_middleware(app):
|
||||
def fixed_app(environ, start_response):
|
||||
environ['wsgi.url_scheme'] = 'https'
|
||||
environ['HTTP_X_FORWARDED_HOST'] = 'novodraft.com'
|
||||
return app(environ, start_response)
|
||||
return fixed_app
|
||||
|
||||
app = bottle.default_app()
|
||||
app.wsgi = fix_environ_middleware(app.wsgi)
|
||||
gen_body = GenerateBody()
|
||||
|
||||
@post('/gen-req-docx/<docId>')
|
||||
def newdoc(docId):
|
||||
print('________________in pyserv docId', docId)
|
||||
gen_body.generate(docId)
|
||||
respBody = json.dumps({'Status': 'Success'})
|
||||
return bottle.HTTPResponse(status=200, body=respBody)
|
||||
|
||||
run(app, host='127.0.0.1', port=8087, debug=True)
|
||||
65
ax3Services/docGenService/pyOutgoingCopy.py
Normal file
65
ax3Services/docGenService/pyOutgoingCopy.py
Normal file
@@ -0,0 +1,65 @@
|
||||
import json
|
||||
from docx import Document
|
||||
from docx.shared import Inches
|
||||
from docx.shared import Pt
|
||||
from docx.shared import Length
|
||||
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
|
||||
from docx.enum.text import WD_ALIGN_PARAGRAPH
|
||||
|
||||
def make_outgoing_instructions(document, clientPosition, servingParty):
|
||||
print(
|
||||
"______________________________________________________________OUTGOING FIRED"
|
||||
)
|
||||
instructionsArray = [
|
||||
"These requests are continuing in nature and require you to file supplementary or amended responses if you obtain further, different or contradictory information at any time prior to a trial of this action.",
|
||||
"Unless otherwise stated, these requests refer to the time, place, and circumstances of the occurrences described and/or complained of in the Complaint and which form the basis for this action.",
|
||||
"Where name and identity of a person is required, state the full name, home address and business address, if known.",
|
||||
"When the identity of a corporation or other business entity is requested, state the entity's principal place of business, address and telephone number. Also, set forth the individual or individuals with knowledge of the facts and circumstances that form the basis for this action.",
|
||||
"Where knowledge or information in possession of a party is requested, such request includes knowledge of the party's agents, representatives, and, unless privileged, attorneys. ",
|
||||
"Where the respondent is a corporation or other business entity, state the name, address and title of persons supplying the information and making the affidavit, and state with particularity the source of his or her information and basis of knowledge.",
|
||||
"If you are unable to provide an accurate answer to an interrogatory, or are uncertain regarding a response to any item, please provide your best estimate of the information requested, specifying that the answer is merely an estimate, and that an accurate response cannot be given by you to the item.",
|
||||
"If you withhold any information or documents on the basis of privilege, confidentiality, relevance, or for any other reason whatsoever please identify it, providing sufficient information to identify the withheld documents or items for this party and the Court to determine whether the documents, items or information should be disclosed.",
|
||||
]
|
||||
|
||||
definitionsArray = [
|
||||
"'You' refers to the party to whom the requests are addressed and any additional parties or entities as described in the foregoing instructions and these definitions.",
|
||||
"“Person”, unless otherwise specified”, includes the plural as well as the singular, and includes in its meaning any natural person, or artificial or legal entity, including corporations, partnerships, joint ventures, associations, governmental agencies, groups, organizations, and any and every other form of entity cognizable at law.",
|
||||
"“Document” means and includes all written and graphic matter of every kind and description, whether printed or produced by any process or by hand, whether final draft or reproduction, whether in the actual or constructive possession, custody or control of the respondent to a given interrogatory, including any and all written letters, correspondence, memoranda, notes, statements, transcripts, files, charters, articles of incorporation, securities, bonds, stocks, certificates of deposit, evidences of debt, contracts, agreements, licenses, memoranda or notes of telephone or personal conversations, work papers, tapes, charts, reports, books, ledgers, telegrams, sound recordings, books of account, customer account statements, financial statements, catalogs, checks, check stubs, and written statements of witnesses or other persons having knowledge pertaining to the pertinent facts requested or relating to the interrogatory or subpart thereof, whether or not these documents are claimed to be privileged against disclosure.",
|
||||
"“Identify” means, when used with reference to an individual person, organization, corporation or association, to state the full name, home and work addresses, e-mail address, home and business telephone numbers, present or last known position and business affiliation and position both in the past and at the time said interrogatory or subpart thereof is being responded to.",
|
||||
"The term “identify” further means, when used with reference to a document, to state the date it was created, its author, the signatory, if different, the addressee, the recipient of all copies, the type of document (e.g. chart, memorandum, letter, or other written document) and its present or last known custodian.",
|
||||
"“Describe” means that the person or entity to whom the interrogatory or subpart thereof is directed should state what is requested to be described, including all facts and opinions known and held regarding, relating to, or pertinent to what is requested to be described, and (i) the identity of each person or entity involved or having any knowledge of each fact or opinion that relates to what is so described, (ii) the identity of each document evidencing the answer or response given or relating, referring or pertaining to said subject-matter in any way, and (iii) all relevant or material dates and time periods, specifying the way in which said dates or time periods are pertinent to the subject-matter described.",
|
||||
]
|
||||
|
||||
p = document.add_paragraph()
|
||||
p.add_run("INSTRUCTIONS").underline = True
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
arrLen = len(instructionsArray)
|
||||
count = 0
|
||||
|
||||
for inst in instructionsArray:
|
||||
if count == arrLen:
|
||||
break
|
||||
|
||||
paragraph = document.add_paragraph(f"{count + 1}. {inst}")
|
||||
paragraph.paragraph_format.line_spacing = Pt(20)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
||||
count = count + 1
|
||||
|
||||
p = document.add_paragraph()
|
||||
p.add_run("DEFINITIONS").underline = True
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
arrLen = len(definitionsArray)
|
||||
count_two = 0
|
||||
|
||||
for defn in definitionsArray:
|
||||
if count_two == arrLen:
|
||||
break
|
||||
|
||||
paragraph = document.add_paragraph(f"{count_two + 1}. {defn}")
|
||||
paragraph.paragraph_format.line_spacing = Pt(20)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
||||
count_two = count_two + 1
|
||||
|
||||
return document
|
||||
41
ax3Services/docGenService/pyRequestsForProduction.py
Normal file
41
ax3Services/docGenService/pyRequestsForProduction.py
Normal file
@@ -0,0 +1,41 @@
|
||||
import json
|
||||
from docx import Document
|
||||
from docx.shared import Inches
|
||||
from docx.shared import Pt
|
||||
from docx.shared import Length
|
||||
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
|
||||
from docx.enum.text import WD_ALIGN_PARAGRAPH
|
||||
|
||||
def make_requests_for_production(document, clientPosition, servingParty):
|
||||
requestsForProductionArray = [
|
||||
"All documents identified, directly or indirectly, in your answers to Interrogatories.", "All written reports of all expert witnesses with whom you or your attorneys have consulted, including, of course, those persons you expect to call as an expert witness at trial.",
|
||||
"All documents upon which any expert witness upi intend to call at trial relied upon in formulating an opinion about the subject matter of this action.",
|
||||
"The most recent curriculum vitae of each expert whom you expect to call as an expert witness at trial.",
|
||||
"All notes, correspondence, bills, invoices, diagrams, photographs, or other documents prepared or reviewed by each person whom you expect to call as an expert witness at trial.",
|
||||
"All invoices generated by expert witnesses generated for performing all expert witness services to you, including but not limited to, fees for the medical examination, the records review, the pretrial preparation, any telephone conference, any trial testimony anticipated and any other fee paid for expert fees.",
|
||||
"Any and all written, recorded, or signed statements of any party, including the plaintiff, defendant, witnesses, investigators, or agent, representative or employee of the parties concerning the subject matter of this action.",
|
||||
"All documents, photographs, videotapes or audio tapes, recordings in any medium, diagnostic images, diagrams, records, surveys or other graphic representations of information concerning the subject matter of this action.",
|
||||
"Any documents which afforded, described or pertained to liability insurance coverage for the occurrences which are the subject matter of the complaint.",
|
||||
"Any documents identified in any other parties' answers to Interrogatories in your possession, if any.",
|
||||
"Any documents received pursuant to a subpoena request in this case.",
|
||||
"Any document prepared during the regular course of business as a result of the occurrence complained of in the complaint.",
|
||||
"Copies of any treaties, standards in the industry, legal authority, rule, case, statute, or code that will be relied upon in the defense of this case.",
|
||||
]
|
||||
|
||||
p = document.add_paragraph()
|
||||
p.add_run("REQUESTS FOR PRODUCTION OF DOCUMENTS").underline = True
|
||||
p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
|
||||
arrLen = len(requestsForProductionArray)
|
||||
count = 0
|
||||
|
||||
for req in requestsForProductionArray:
|
||||
if count == arrLen:
|
||||
break
|
||||
|
||||
paragraph = document.add_paragraph(f"{count + 1}. {req}")
|
||||
paragraph.paragraph_format.line_spacing = Pt(20)
|
||||
paragraph.paragraph_format.space_after = Pt(12)
|
||||
paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
|
||||
count = count + 1
|
||||
|
||||
return document
|
||||
121
ax3Services/docGenService/responseHeaderGenerator.mjs
Normal file
121
ax3Services/docGenService/responseHeaderGenerator.mjs
Normal file
@@ -0,0 +1,121 @@
|
||||
import * as fs from "fs";
|
||||
import { newYorkCaptionTemplate } from "./documentTemplates/captionTemplates.mjs";
|
||||
//import { newYorkStyleTemplate } from "./documentTemplates/styleTemplates.mjs";
|
||||
|
||||
function selectRequestPath(reqType, isRequests, folder) {
|
||||
let dir;
|
||||
if (reqType == "interrogatories") {
|
||||
dir = `../Documents/Requests/Parsedrogs/${folder}/`;
|
||||
} else if (reqType == "admissions") {
|
||||
dir = `../Documents/Requests/Parsedadmit/${folder}/`;
|
||||
} else if (reqType == "production") {
|
||||
dir = `../Documents/Requests/Parsedprod/${folder}`;
|
||||
} else if (reqType == "combined-numbered") {
|
||||
dir = `../Documents/Requests/Parsedcombined/${folder}/`;
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
||||
function selectResponsePath(reqType, isRequests, folder) {
|
||||
let dir;
|
||||
if (reqType === "interrogatories") {
|
||||
dir = `./Documents/Responses/Rogresp/${folder}/`;
|
||||
} else if (reqType == "admissions") {
|
||||
dir = `./Documents/Responses/Admitresp/${folder}/`;
|
||||
} else if (reqType == "production") {
|
||||
dir = `./Documents/Responses/Prodresp/${folder}/`;
|
||||
} else if (reqType == "combined-numbered") {
|
||||
dir = `./Documents/Responses/Combinedresp/${folder}/`;
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
||||
async function makeDir(docId, dest) {
|
||||
const dir = `/var/www/ax3Services/docGenService/${dest}/${docId}`;
|
||||
//const dir = `/Users/kjannette/workspace/ax3/ax3Services/docGenService/${dest}/${docId}`;
|
||||
fs.mkdir(dir, function (err) {
|
||||
if (err) {
|
||||
console.log("createDoc makeDir. Error creating directory: " + err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* ******************************* generateDoc ******************************* */
|
||||
const responseHeaderGenerator = (docId, reqType, data) => {
|
||||
const documentType = reqType.toUpperCase();
|
||||
const jurisdiction = data?.jurisdiction.toUpperCase();
|
||||
|
||||
console.log("---------------------------------->data", data);
|
||||
//const responndantPosition =
|
||||
// / data?.clientPosition === "Plaintiff" ? "Plaintiff" : "Defendant";
|
||||
//const { defendant, plaintiff, caseNumber, judge } = data;
|
||||
//const venue = data.venue.toUpperCase();
|
||||
//const comesNow = responndantPosition === "Plaintiff" ? plaintiff : defendant;
|
||||
//let doc;
|
||||
//const dest = "Docxstaging";
|
||||
//const dest2 = "Docxinfo";
|
||||
//makeDir(docId, dest);
|
||||
//makeDir(docId, dest2);
|
||||
/*
|
||||
const templateNY = newYorkCaptionTemplate(
|
||||
jurisdiction,
|
||||
venue,
|
||||
plaintiff,
|
||||
defendant,
|
||||
caseNumber,
|
||||
judge,
|
||||
documentType,
|
||||
comesNow
|
||||
);
|
||||
*/
|
||||
//doc = new Document(newYorkStyleTemplate);
|
||||
//const temp1 = JSON.parse(responseFileData);
|
||||
//const responseArray = temp1[0].responses;
|
||||
// /const temp2 = JSON.parse(requestFileData);
|
||||
//const requestArray = temp2[0].requests;
|
||||
//const allChildren = [];
|
||||
/*
|
||||
doc.addSection({
|
||||
properties: {
|
||||
type: SectionType.CONTINUOUS,
|
||||
},
|
||||
children: templateNY,
|
||||
});
|
||||
*/
|
||||
|
||||
/*
|
||||
Packer.toBuffer(doc).then((buffer) => {
|
||||
fs.writeFileSync(
|
||||
`/Users/kjannette/workspace/ax3/ax3Services/docGenService/Docxstaging/${docId}.docx`,
|
||||
buffer
|
||||
);
|
||||
});
|
||||
*/
|
||||
//const dir = `/var/www/ax3Services/docGenService/Docxinfo/${docId}.json`;
|
||||
const dir = `/Users/kjannette/workspace/ax3/ax3Services/docGenService/Docxinfo/${docId}.json`;
|
||||
data["currentRequestType"] = reqType;
|
||||
const saveData = JSON.stringify(data);
|
||||
fs.writeFile(dir, saveData, function (err) {
|
||||
if (err) {
|
||||
return console.log("Error writing in responseHeaderGenerator", err);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export default responseHeaderGenerator;
|
||||
|
||||
/*
|
||||
import {
|
||||
AlignmentType,
|
||||
Document,
|
||||
convertInchesToTwip,
|
||||
Packer,
|
||||
Paragraph,
|
||||
Styles,
|
||||
Style,
|
||||
SectionType,
|
||||
TextRun,
|
||||
UnderlineType,
|
||||
Underline,
|
||||
} from "docx";
|
||||
*/
|
||||
Reference in New Issue
Block a user