nutsack
@nutsack@lemmy.dbzer0.com
- Comment on Annon punches a Nazi 3 days ago:
this is an extremely good link
- Comment on 6 days ago:
is this a DLC? it does not look like a DLC to me. it looks like a remaster
- Comment on I am looking for a Linux OS 1 week ago:
A lot of these things look really sleek and fancy. I’m still using Arch Linux with i3 and can play whatever games. It’s all the same shit under the hood once you’ve installed what you need
- Comment on Is it theoretically possible Trump and ICE are killing a very large number of immigrants (like 25% of those detained) and no one knows? 1 week ago:
I think the political and legal fallout from something like this would be too much of a deterrent for them. i imagine they want to build private prisons whose owners get to siphon off a shitload of tax dollars.
- Comment on The cops pay Anon a visit 1 week ago:
chemical castration is the correct way to solve ops problem
- Comment on Games you really want to play, but can't or won't? 2 weeks ago:
why did they skip VR compatibility for the on foot sections of the game? seems insane
- Comment on Gaming market melts down after Google reveals new AI game design tool — Project Genie crashes stocks. (A.K.A . Investors panic because they don't understand what "real" videogames are) 2 weeks ago:
is it? stock prices are still quite high
- Comment on Art of the deal.. 2 weeks ago:
the stock market doesn’t care about this at all. the s&p is reaching for all time highs again
- Comment on Anon is a nice guy 2 weeks ago:
thanks
- Comment on Anon is a nice guy 2 weeks ago:
op still doesn’t know the difference between being nice and being a pussy. had an experience and learned nothing
- Comment on Anon likes pizza 2 weeks ago:
I’m sorry but you can’t make a pizza for a $1.50
- Comment on What's the best free version of word? 3 weeks ago:
I could not get pandoc to work on my system. after a few attempts going in circles with dependency packages, I gave up
- Comment on With what's happening in Gaza, what can we as socialists (and non-socialists) do to fix Gaza? 3 weeks ago:
you could try protesting and getting shot by cops
- Comment on What's the best free version of word? 3 weeks ago:
I am composing documents in markdown format and then using a python script to produce a PDF:
#!/usr/bin/env python3 """Convert Markdown files to PDF.""" import argparse import sys from pathlib import Path try: import markdown from weasyprint import HTML, CSS except ImportError: print("Missing dependencies. Install with:") print(" pip install markdown weasyprint") sys.exit(1) CSS_STYLES = """ @page { margin: 0.5in 0.6in; size: letter; } body { font-family: "Courier New", Courier, "Liberation Mono", monospace; font-size: 10pt; line-height: 1.4; color: #222; max-width: 100%; } h1, h2, h3 { margin-top: 1em; margin-bottom: 0.3em; padding-bottom: 0.2em; } h1 { font-size: 16pt; } h2 { font-size: 13pt; } h3 { font-size: 11pt; } h4 { font-size: 10pt; font-weight: normal; margin-bottom: 0.5em;} ul { margin: 0.3em 0; padding-left: 1.2em; } li { margin-bottom: 0.2em; } p { margin: 0.4em 0; } p + p { margin-top: 0.2em; } strong { font-weight: bold; } """ PAGE_BREAK_MARKER = "<!-- pagebreak -->" PAGE_BREAK_HTML = '<div style="page-break-before: always;"></div>' def process_page_breaks(html_content: str) -> str: """Replace page break markers with actual page break HTML.""" return html_content.replace(PAGE_BREAK_MARKER, PAGE_BREAK_HTML) def md_to_html(input_path: Path) -> str: """Convert a Markdown file to HTML content.""" md_content = input_path.read_text(encoding="utf-8") html_content = markdown.markdown(md_content) return process_page_breaks(html_content) def convert_md_to_pdf(input_paths: list[Path], output_path: Path) -> None: """Convert one or more Markdown files to a single PDF.""" html_parts = [] for i, input_path in enumerate(input_paths): if i > 0: html_parts.append(PAGE_BREAK_HTML) html_parts.append(md_to_html(input_path)) full_html = f""" <!DOCTYPE html> <html> <head><meta charset="utf-8"></head> <body>{"".join(html_parts)}</body> </html> """ HTML(string=full_html).write_pdf(output_path, stylesheets=[CSS(string=CSS_STYLES)]) print(f"Created: {output_path}") def main(): parser = argparse.ArgumentParser(description="Convert Markdown files to PDF") parser.add_argument("files", nargs="*", type=Path, help="Markdown files to convert") parser.add_argument("-o", "--output", type=Path, help="Output PDF path") parser.add_argument("-m", "--merge", action="store_true", help="Merge all input files into a single PDF") args = parser.parse_args() # Default to all .md files in current directory files = args.files if args.files else list(Path(".").glob("*.md")) if not files: print("No Markdown files found") sys.exit(1) if args.merge: if not args.output: print("Error: --output is required when using --merge") sys.exit(1) for md_file in files: if not md_file.exists(): print(f"File not found: {md_file}") sys.exit(1) convert_md_to_pdf(files, args.output) else: if args.output and len(files) > 1: print("Error: --output can only be used with a single input file (or use --merge)") sys.exit(1) for md_file in files: if not md_file.exists(): print(f"File not found: {md_file}") continue output_path = args.output if args.output else md_file.with_suffix(".pdf") convert_md_to_pdf([md_file], output_path) if __name__ == "__main__": main()
- Comment on If the color of the Sun was orange, wouldn't the clouds and everything white also be orange? My friend is adamant that 30 years ago the "real" Sun was orange but got replaced with a white LED. 3 weeks ago:
- Comment on How can we convince Trump voters to NOT vote for Trump (or Vance) in the 2026 midterms and the 2028 election? 3 weeks ago:
That’s not what you should be trying to do. The answer is to get Democrats someone to vote for that they’ll actually come out and vote for. a lot of them just don’t vote because their choices are shit
- Comment on Anon goes to therapy 3 weeks ago:
therapist is offering to suck his dick and he’s just not getting it
- Comment on Are you people all bots? 4 weeks ago:
yea
- Comment on Are you people all bots? 4 weeks ago:
correctly an ai cannot suck your dick. That’s how you know
- Comment on Anon has a tip 4 weeks ago:
you can do this with most other search engines i think by prefixing your search with the URL of the website
- Comment on Bethesda announces a new Fallout... reality show 4 weeks ago:
the show is ok but this is dumb i don’t like it
- Comment on Bully Online, the ambitious mod that brought multiplayer and more to Rockstar's classic school sim, shuts down a month after launch: 'This was not something we wanted' 5 weeks ago:
as long as they keep making really good games I’ll keep buying them and playing them. if they want to be dicks about their intellectual property, that’s a bummer, but at least they’re making good games
- Comment on Bully Online, the ambitious mod that brought multiplayer and more to Rockstar's classic school sim, shuts down a month after launch: 'This was not something we wanted' 5 weeks ago:
Rockstar also kills off mods that are free
- Comment on At this point, what should we do about the ICE raids? If an ICE agent breaks in without a warrant or holds you at gunpoint, what do you do? 5 weeks ago:
film them. that’s about it
- Comment on How do I properly and safely clean smartphone? 5 weeks ago:
I smear my balls all over everything. I don’t give a fuck
- Comment on Anon uses 4chan 5 weeks ago:
no don’t do it
- Comment on If you're a parent, how do you prevent your kid from watching AI slop? 5 weeks ago:
I don’t have kids but I keep seeing iPad baby bullshit and that is fucking disgusting. that’s one of the reasons why it probably won’t have any
- Comment on How do I properly and safely clean smartphone? 5 weeks ago:
what did you do? why the fuck do you need to clean it
- Comment on Anon uses 4chan 5 weeks ago:
culture
- Comment on Anon uses 4chan 5 weeks ago:
rar