Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 05:32
    jeddai synchronize #1841
  • 05:05
    jeddai synchronize #1841
  • Nov 30 08:59
    G-Ambatte review_requested #1867
  • Nov 30 08:59
    G-Ambatte opened #1867
  • Nov 30 08:37
    G-Ambatte synchronize #1801
  • Nov 30 05:18
    calculuschild commented #1841
  • Nov 30 04:49
    G-Ambatte labeled #1866
  • Nov 30 04:49
    G-Ambatte labeled #1866
  • Nov 30 04:49
    G-Ambatte opened #1866
  • Nov 30 04:29
    ericscheid commented #1844
  • Nov 30 04:22
    ericscheid labeled #1844
  • Nov 30 04:22
    ericscheid commented #1844
  • Nov 30 04:20
    dependabot[bot] edited #1758
  • Nov 30 04:20
    dependabot[bot] synchronize #1860
  • Nov 30 04:20

    dependabot[bot] on npm_and_yarn

    Bump marked from 3.0.8 to 4.0.5… (compare)

  • Nov 30 04:20
    dependabot[bot] edited #1860
  • Nov 30 04:19
    dependabot[bot] edited #1860
  • Nov 30 04:19
    dependabot[bot] synchronize #1860
  • Nov 30 04:19

    dependabot[bot] on npm_and_yarn

    Bump marked from 3.0.8 to 4.0.5… (compare)

  • Nov 30 04:19
    dependabot[bot] edited #1860
G.Ambatte
@G-Ambatte
Doesn't help that the team has been cut and cut again over the last four or five years, so we're now handling an increasing workload with about 1/3 of the original staff. Uh, yay progress?
G.Ambatte
@G-Ambatte
I think Undo/Redo is finally working!
G.Ambatte
@G-Ambatte
Rebased to master, switched the branches on the PR, it's still working on my local install... I think it's actually ready for a final review!
G.Ambatte
@G-Ambatte
Pushed through a quick PR to close the code wrapping issue as well.
G.Ambatte
@G-Ambatte
Pushed through #1760 to (hopefully) fix the issue with the divider getting lost off the edge of the screen.
Trevor Buckner
@calculuschild
I think I got CodeMirror document swapping figured out. No more losing your place (or undo history) when swapping between tabs!
G.Ambatte
@G-Ambatte
Nice!
caesuric
@caesuric

Hey, folks. I hope this is the right place to reach out to the Homebrewery dev team. I have a tool for building PDF books from Markdown sources, and I have built some Homebrewery-related extensions for it:

  1. A style fork of Homebrewery that is compatible with print media as well as the HTML renderer we are using.
  2. A plugin to my tool that will parse the Homebrewery markdown extensions into "Markdown in HTML" extension compatible Markdown that we can parse with the tool.

I would like to open source all of the above, but I wanted to check in for the Homebrewery-specific stuff and see if that's okay with you and/or if you need any specific form of attribution besides a link and general acknowledgment.

Thanks!

Trevor Buckner
@calculuschild
@caesuric The Homebrewery is licensed using the MIT License. Which means you are free to use The Homebrewery or any parts of the codebase any way that you want, except for claiming that you made it yourself, and provided that you include a copy of the license somewhere in your project where others can see it (even as a comment in the code is fine , just so people can trace it back to us somehow).
caesuric
@caesuric
@calculuschild Awesome, thank you for the clarification. I believe I am familiar with the legal obligations of the license, I was more just checking for things you'd like/appreciate beyond the things I'm legally required to do . Feel free to let me know if doing this in any particular way would be helpful for you. :)
Trevor Buckner
@calculuschild
@caesuric You could always make a shout-out to us whenever you advertise it. Point people to our Patreon page, etc. Maybe let us know when you release it so we can check it out! But really we don't expect anything else. Depending how your project functions, we could potentially create some kind of collaboration and add your extension as an official Homebrewery component if you would be amenable to that. Lots of people are creating new CSS themes, tweaks in their own forks, etc. and occasionally we reach out and ask if we can incorporate their work into the official project. Open-source is nice when it goes both ways, if that makes sense.
caesuric
@caesuric
Absolutely will do all of that, and am open to collaboration if it's welcome and makes sense. Really appreciate all of the work that went into Homebrewery.
caesuric
@caesuric
(Depending on your server setup, there could potentially be some benefit to having a PDF download feature that isn't reliant on browser rendering and allows PDF anchor links within documents (which the stack I am using allows). It's not perfect at handling certain things yet (mainly large block elements and column balancing), but it is still a work in progress and I hope to solve those eventually. Though I guess there may also be a bandwidth consideration for you if you integrated such a thing.)
Trevor Buckner
@calculuschild

The one issue we face is that with user-generated content (Markdown) there is always a chance that someone comes up with a nasty input that results in some evil Regex and can tie up a lot of server memory or leave us open to certain attacks. We try to have all Markdown processing handled on the client end for that reason.

That said, if it's possible to run your tool in-browser, it might help with getting more uniform results across the different browsers (Chrome print-to-PDF is slightly different than Firefox, etc.), and possibly save users some confusion when they go to retrieve a PDF and instead of a download link they get the Print dialog.

caesuric
@caesuric
Unfortunately it definitely won't run in-browser. It probably makes more sense as a separate tool with those concerns.
Trevor Buckner
@calculuschild
What language/framework are you using?
caesuric
@caesuric
Python. The markdown handling is markdown2 and the PDF generation is WeasyPrint which is, being honest, kind of complicated as a dependency, so even if there's some browser Python iteration out there, I can't see it working.
Trevor Buckner
@calculuschild
Gotcha. Well, in any case, I'm excited to see how it turns out. It seems like an interesting project!
caesuric
@caesuric
Thank you! I'll let you know when it becomes public. :)
Trevor Buckner
@calculuschild
Easy PR if someone still needs to fill out their Hacktoberfest quota. naturalcrit/homebrewery#1767
Just update the Dockerfile to match the version of Node in Package.json
caesuric
@caesuric
@calculuschild just made the project(s) public! You may be interested in the tweaks needed to get Homebrewery's style working with paged media without explicit page breaks, possibly.
libris (multiple MD -> PDF tool) here: https://github.com/lazy-scrivener-games/libris
Homebrewery style fork here: https://github.com/lazy-scrivener-games/homebrewery-fork-for-libris
pipe for pasting Homebrewery flavored markdown directly into libris input files here: https://github.com/lazy-scrivener-games/homebrewery-to-libris
G.Ambatte
@G-Ambatte
Oh man, Docker... It's been a while.
I should have time to a swing at it later today, if no one else wants to leap on it - I already have 4 accepted PRs for Hacktoberfest, but I'm happy to push through some more.
Trevor Buckner
@calculuschild
I'm pretty sure it's just changing a number. Should be easy.
G.Ambatte
@G-Ambatte
I'm just looking through the Docker packages for Node 16.11, and they don't seem to have one... 16.12 is there, though.
I might have to install Docker, just to confirm the changes actually work before committing a PR.
G.Ambatte
@G-Ambatte
I must have been looking in the wrong place.... Despite not being listed on the page I was looking at, setting the version in the Dockerfile to 16.11 allows it to compile and run just fine. PR coming through shortly.
G.Ambatte
@G-Ambatte
I've just opened PR #1771, which is some initial work at including CodeMirror's editor themes in Homebrewery. If I've done anything the awkward/difficult way, please let me know the simple solution!
Trevor Buckner
@calculuschild
@G-Ambatte I might recommend using a package like less-plugin-glob as a less plugin rather than shuffling around files everywhere
then you can just use @import (less) 'codemirror/theme/*'; in the codeEditor.less to import all the files.
Trevor Buckner
@calculuschild
Alternatively, do copy the cm themes over to \buildbut don't bother manually stitching them together. Instead just swap the css file in and out on the editor as needed like we do with the brew themes in https://github.com/naturalcrit/homebrewery/blob/732021f5a5ab190752eacf76a178c7b5bc256c07/client/homebrew/brewRenderer/brewRenderer.jsx#L202 .
probably the easiest and keeps the themes separated so users dont have to download every theme in a big lump, just one by one as they select them.
Trevor Buckner
@calculuschild
yeah, probably cleaner than needing more dependencies
G.Ambatte
@G-Ambatte
For some reason, I was under the impression we couldn't <link> in <body>. That'll make things much easier!
Trevor Buckner
@calculuschild
In html 4 it wasn't allowed but html 5 is fine with it, even if its not considered "best practice". It seemed to be the most straightforward way that takes advantage of React's ability to rebuilt the DOM at-will.
G.Ambatte
@G-Ambatte
Cool... This week is shaping up to be super busy but I'll see if I can squeeze in those changes.
Trevor Buckner
@calculuschild
Hey, so you guys who do Docker... this is solved, right? naturalcrit/homebrewery#198
G.Ambatte
@G-Ambatte
It worked for me after I fixed the base Node image to 16.11, so I guess?
In #206, stolksdorf explicitly states that Docker will no longer be supported.
#203 and #206 were closed without merging, as best I can tell. #206 looked like it was going to reduce the container size significantly by using the Alpine base image, rather than the standard Node image.
G.Ambatte
@G-Ambatte
I'm just testing running 16.11-alpine instead of flat 16.11, looks like it's reduced the Docker container size by about 40%.
It does appear that the Docker install is running Homebrewery using Yarn, rather than NPM. Not entirely sure what difference that makes, just an interesting point of note.
G.Ambatte
@G-Ambatte
Looks like Yarn is a better NPM, so it shouldn't be a major issue.
G.Ambatte
@G-Ambatte
I've pushed through the Docker change to 16.11-alpine as PR #1775.
G.Ambatte
@G-Ambatte
I've closed #1588 as updating the CodeMirror dependency to v5.63.3 corrected the underlying issue.
Trevor Buckner
@calculuschild
Awesome. Thanks!
Eric Scheid
@ericscheid_twitter
OK, you guys know how flex works .. is the following layout (not for HB) is at least possible?
image.png
So, a header affixed to the top of the window, the footer to the bottom, and then any number of columns in between, with excess columns available via scrolling to the right?
Eric Scheid
@ericscheid_twitter
Slept on it, found an actually useful intro to flex, coded this: https://codepen.io/ericscheid/pen/mdMwyEE .. almost exactly what I want =)