Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1953] [#1935] rewrite the algorithm in docx + security and performance issue fix #1967

Open
wants to merge 36 commits into
base: main
Choose a base branch
from

Conversation

TruncatedDinoSour
Copy link

@TruncatedDinoSour TruncatedDinoSour commented Jan 23, 2024

fixes #1953 and #1935

docx > *, best programming language known to man,, customizability, memory safety, speed and also supported on the best IDE ever -- microsoft (r)(c)(allrightsreserverd)(m$) word

and added SECURITY.png file for security ensurance

Ari Archer added 30 commits January 23, 2024 19:03
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Ari Archer added 5 commits January 23, 2024 19:21
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
@CLAassistant
Copy link

CLAassistant commented Jan 23, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Ari Archer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@TruncatedDinoSour
Copy link
Author

TruncatedDinoSour commented Jan 23, 2024

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

no, if twitter cant follow basic open source ethics ( or ethics in general ) im not gonna sign this shitty cla bro

@TruncatedDinoSour
Copy link
Author

TruncatedDinoSour commented Jan 23, 2024

( for anyone interested in the very bad automation scripts, license : cc0, aka do whatever u want

click to expand the shitty scripts

d.py

from docx import Document
from sys import argv
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from os import path
from docx.shared import Cm, Pt

# read file
with open(argv[1], "r") as file:
    content = file.read()

# create a new Word document
doc = Document()

# set default style
style = doc.styles["Normal"]
# font size and type
font = style.font
font.name = "Arial"
font.size = Pt(12)

# margin
sections = doc.sections
for section in sections:
    section.top_margin = Cm(2.5)
    section.bottom_margin = Cm(2.5)
    section.left_margin = Cm(2.5)
    section.right_margin = Cm(2.5)

# add paragraph to the document
for line in content.split("\n"):
    paragraph = doc.add_paragraph()
    paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
    paragraph.add_run(line)

# save the doc
doc.save(f"{path.splitext(argv[1])[0]}.docx")

a.sh

cd the-algorithm/

count=0

for file in $(find . -type f -not -path './.git/*'); do
    echo "$file"
    python3 ../d.py "$file"
    rm -f "$file"

    ((count=count+1))

    if ((count % 200 == 0)); then
        git add -A
        git commit -sm "[docx] split commit for file $count"
        git push -u origin main
        echo 'pushed, sleeping'
        sleep 10
    fi
done

git add -A
git commit -sm "[docx] final commit @ $(date) for file $count"
git push -u origin main
echo 'pushed'

)

@Exponential-Workload
Copy link

lgtm 👍

@TruncatedDinoSour
Copy link
Author

can musky husky pls merge this faster, this is a security critical issue !!

@TruncatedDinoSour TruncatedDinoSour changed the title [#1953] rewrite the algorithm in docx [#1953] [#1935] rewrite the algorithm in docx + security and performance issue fix Jan 23, 2024
@TruncatedDinoSour
Copy link
Author

ive also fixed #1935 in the mean time

@TruncatedDinoSour
Copy link
Author

can musky husky pls merge this faster, this is a security critical issue !!

sorry musky husky

image

@DarkGuy10
Copy link

Internet, please never change

@TruncatedDinoSour
Copy link
Author

TruncatedDinoSour commented Jan 23, 2024

Internet, please never change

i will make sure
i <3 corporate stunts by shitty companies not go as well as they expected it to go
plus like its entertaining lmao, id rather procrastinate and do this

image
image
image

redbubble is funny

@rollerozxa
Copy link

have you considered using .doc instead of .docx? it would allow for much wider compatibility

@TruncatedDinoSour
Copy link
Author

have you considered using .doc instead of .docx? it would allow for much wider compatibility

i think its a better idea to stick w more modern technologies, such as docx, for best performance and features,, we can deal with compatibility by re-distributing pre-built packages

@Exponential-Workload
Copy link

have you considered using .doc instead of .docx? it would allow for much wider compatibility

i think its a better idea to stick w more modern technologies, such as docx, for best performance and features,, we can deal with compatibility by re-distributing pre-built packages

@TruncatedDinoSour i personally think we should be using .docm to allow for a more extensible featureset over time, by allowing macros

@TruncatedDinoSour
Copy link
Author

have you considered using .doc instead of .docx? it would allow for much wider compatibility

i think its a better idea to stick w more modern technologies, such as docx, for best performance and features,, we can deal with compatibility by re-distributing pre-built packages

@TruncatedDinoSour i personally think we should be using .docm to allow for a more extensible featureset over time, by allowing macros

after a long time of considering, i have decided to take the executive decision to not include this, .docm uses vba which is, as we all know it - c, and c is slow ( 🤮 ) and not memory safe ( ⛔ 🚀 )

so far, after very extensive research, docx seems like the best option here for high performance applications with security in mind, such as twitter x( org ??? foss ref ??/?? )

@ghost
Copy link

ghost commented Feb 26, 2024

lgtm

@TruncatedDinoSour
Copy link
Author

TruncatedDinoSour commented Feb 29, 2024

sorry for the unverified commits, i mightve needed to change my gpg key a bit 👍
also the person who 👎 this pr, pls make changes to make this pr better - talk is cheap

@Marioood
Copy link

Marioood commented Mar 1, 2024

LGTM

@DarkGuy10
Copy link

Lgtm

@Exponential-Workload
Copy link

lgtm

@TruncatedDinoSour
Copy link
Author

can twitter review and merge this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite in docx
6 participants