Coder Social home page Coder Social logo

naturalcrit / homebrewery Goto Github PK

View Code? Open in Web Editor NEW
1.0K 35.0 310.0 75.03 MB

Create authentic looking D&D homebrews using only markdown

Home Page: https://homebrewery.naturalcrit.com

License: MIT License

JavaScript 72.30% Dockerfile 0.08% Less 25.92% Shell 0.59% PowerShell 0.36% CSS 0.74%
homebrewery dnd rpg markdown stylesheet hacktoberfest

homebrewery's Introduction

The Homebrewery

Homebrewery

The Homebrewery is a tool for making authentic looking D&D content using Markdown. It is distributed under the terms of the MIT License.

Quick Start

The easiest way to get started using The Homebrewery is to use it on our website. The code is open source, so feel free to clone it and tinker with it. If you want to make changes to the code, you can run your own local version for testing by following the installation instructions below.

Installation

First, install three programs that The Homebrewery requires to run and retrieve updates:

  1. install node, version v16 or higher.

  2. install mongodb (Community version)

    For the easiest installation, follow these steps:

    1. In the installer, uncheck the option to run as a service.
    2. You can install MongoDB Compass if you want a GUI to view your database documents.
    3. If you install any version over 6.0, you will have to install MongoDB Shell.
    4. Go to the C:\ drive and create a folder called "data".
    5. Inside the "data" folder, create a new folder called "db".
    6. Open a command prompt or other terminal and navigate to your MongoDB install folder (C:\Program Files\Mongo\Server\6.0\bin).
    7. In the command prompt, run "mongod", which will start up your local database server.
    8. While MongoD is running, open a second command prompt and navigate to the MongoDB install folder.
    9. Search in Windows for "Advanced system settings" and open it.
    10. Click "Environment variables", find the "path" variable, and double-click to open it.
    11. Click "New" and paste in the path to the MongoDB "bin" folder.
    12. Click "OK" three times to close all the windows.
    13. In the second command prompt, run "mongo", which allows you to edit the database.
    14. Type use homebrewery to create The Homebrewery database. You should see switched to db homebrewery.
    15. Type db.brews.insertOne({"title":"test"}) to create a blank document. You should see { acknowledged: true, insertedId: ObjectId("63c2fce9e5ac5a94fe2410cf") }
  3. install git (select the option that allows Git to run from the command prompt).

Checkout the repo (documentation):

git clone https://github.com/naturalcrit/homebrewery.git

Second, you will need to add the environment variable NODE_ENV=local to allow the project to run locally.

You can set this temporarily (until you close the terminal) in your shell of choice with admin privileges:

  • Windows Powershell: $env:NODE_ENV="local"
  • Windows CMD: set NODE_ENV=local
  • Linux / macOS: export NODE_ENV=local

If you want to add this variable permanently the steps are as follows: 1. Search in Windows for "Advanced system settings" and open it. 1. Click "Environment variables". 1. In System Variables, click "New" 1. Click "New" and write NODE_ENV as a name and local as the value. 1. Click "OK" three times to close all the windows. This can be undone at any time if needed.

Third, you will need to install the Node dependencies, compile the app, and run it using the two commands:

  1. npm install
  2. npm start

You should now be able to go to http://localhost:8000 in your browser and use The Homebrewery offline.

If you had any issue at all, here are some links that may be useful:

If you still have problems, post in Our Subreddit and we will help you.

Running the application via Docker

Please see the docs here: README.DOCKER.md

Running the application on FreeBSD or FreeNAS

Please see the docs here: README.FreeBSD.md

Standalone PHB Stylesheet

If you just want the stylesheet that is generated to make pages look like they are from the Player's Handbook, you will find it in the phb.standalone.css file.

If you are developing locally and would like to generate your own, follow the above steps and then run npm run phb.

Issues, Suggestions, and Bugs

If you run into any issues using The Homebrewery or have suggestions for improvement, please submit an issue on GitHub. You can also get help for issues on the subreddit r/homebrewery

Changelog

You can check out the changelog.

License

This project is licensed under the MIT license, which means you are free to use The Homebrewery in any way that you want, except for claiming that you made it yourself.

If you wish to sell, or in some way gain profit for, what's created on this site, it's your responsibility to ensure you have the proper licenses/rights for any images or resources used.

Contributing

You are welcome to contribute to the development and maintenance of the project! There are several ways of doing that:

  • At the moment, we have a huge backlog of issues and some of them are outdated, duplicates, or don't contain any useful info. To help, you can mark duplicates, try to reproduce some complex or weird issues, try finding a workaround for a reported bug, or just mention our issue managers team to let them know about outdated issues via @naturalcrit/issue-managers.
  • Our subreddit is constantly growing and there are number of bug reports. Any help with sorting them out is very welcome.
  • And of course you can contribute by fixing a bug or implementing a new feature by yourself, we are waiting for your pull requests!

Anyway, if you would like to get in touch with the team and discuss/coordinate your contribution to the project, please join our gitter chat.

homebrewery's People

Contributors

5e-cleric avatar alexeysachkov avatar blitzher avatar brandon-fryslie avatar calculuschild avatar casualsuperman avatar chrisbrickhouse avatar dbolack-ab avatar dbolacksn avatar dependabot-preview[bot] avatar dependabot[bot] avatar earlng avatar ericscheid avatar g-ambatte avatar gazook89 avatar jeddai avatar jendave avatar jlgraves avatar jsocol avatar kmillerdevx3 avatar lucastucious avatar maxrothman avatar michieldemey avatar nivthefox avatar rae2che5 avatar rkuerten avatar schemen avatar stolksdorf avatar tcyrus avatar wayneoween avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebrewery's Issues

PDF printing

Your Homebrewery has thus far been a great resource, but whenever I try to save the print version as a PDF, the PDF being saved has no background or borders for the stat blocks. I haven't included the printer friendly snippet in the document, and I'm using Chrome Canary, so I'm not having problems with the two column feature, just getting there to be images when I save it as a PDF. It doesn't have a problem with Print View, either, just saving it as a Pdf.

Text flow bug in Safari

Text will not flow back to original state when removing then re-adding the following column-end syntax (3x backticks on two lines):

Steps to reproduce:

  1. Remove above syntax from example text
  2. Note will move from left to right column, with empty space above right column
  3. Undo removal (add above back to original location)
  4. Note will remain in right column, and right column text will fall off to next page.

This will fail in Safari / El Cap, however it works in Chrome / El Cap

New Line without Indenting?

As far as I can tell, there is no way to create a new line without automatically indenting. For an example of what I'm attempting to do, look at any of the class entries in the PHB under Class Features, where the hit points and proficiencies subsections have new lines without indents.

Background-flip on new page

As suggested, the background needs to be flipped when going to a new page, to mirror the book format when the footer shows up; perhaps make the footer a separate element?

Page Jumping onto second column

I don't want to link my sheet incase other people can edit it, is there an email I can send it?

Basically the text gets halfway down the page and then it jumps onto the right column rather than going all the way to the bottom

Looks amazing in Chrome Canary

Hey, just wanted to leave a quick note and thank you for this. After seeing your note on PDF export I tried it in Chrome Canary and with margins turned off and background images turned on, it looks amazing.

Adblock blocks shared pages

Somewhere in your informational sheet you may want to include that adblock will a shared page if you are trying to view it.

Add better admin controls

  • Improve the UI so it doesn't tank your browser
  • Add control for cleaning up empty and old brews
  • Turn ids into hyper links
  • Add a conform to delete

Sugestion/Improvement: brew account

Greetings,

I would like to suggest that you add the concept of accounts. Something simple with Email and Password.

this way each person creating brews can easily access all his brews without having to memorize them of store the edit link somewhere in another document or application.

That feature would be great :)

Many thanks,

  • Miguel

H1's overflow their column

As shown here. This pushes the text in the next column down and makes a weird space there.
screen shot 2016-01-13 at 12 34 50

H2's are fine though
screen shot 2016-01-13 at 12 34 20

Typos in documentation

I'm not sure if I should have posted this in the reddit post if so I'll just close this.

I noticed two typos in the documentation:

Vertical spacing, column breaks, and mutliple Pages

Should be: multiple Pages

New Pages are controlled by the author. It's impossible for the site to detect when the end of a page is reached, so indicate you'd like to start a new page with /page on it's own line .

Extra space before the last period and /page does not work, it's actually \page.

If I have time to create a pull request I will, but I'm not sure when that will be, so I thought I'd open an issue until then (if that moment ever comes).

Chrome Canary

i see that it fixed the column issues however the class table seems to have issues. Do you have any ideas how to fix this by any chance?
capture

Bold text letter spacing

Letter spacing is too narrow in bold paragraph font (BookInsanityBold), the letters nearly intersect with one another and looks off compared to normal weight. Suggest adjusting as follows:
letter-spacing: 0.03em;

On the other hand, spacing of bold text in notes is too wide (due to ScalaSans font). Suggest adjusting as follows:
letter-spacing: -0.02em;

Option to report a documetn?

Can there be an option to request a document for deletion? In the case of the edit url being lost (my situation), or if there is content that is questionable (copyright infringement)?

Implement code mirror editor for markdown

Browser Type/Version: Google Chrome: Version 48.0.2564.116 m (64-bit)

Operating System: Windows 10

Idea: Could you make it easier to read the code for editing?
Either by adding background colors for tables, non-tables, char sheets, monster stat blocks and so forth, or coloring of the text. I sometimes have a hard time finding the right spot in the text, with no difference in the text.

Make bold text bolder

Right now it's really hard to distinguish bold text from regular. Definitely not a major issue, just pointing it out.

Monster half block not displaying properly in the second column

*Browser Type/Version: * [Google Chrome 48.0.2564.109 (Official Build) m (32-bit)]

*Operating System: * [Windows 7 Home Premium SP1 x64]

Issue Description : [A monster statblock in the second column doesn't display properly.]

*Markdown code to reproduce: *

___
> ## Milk Djinni of the Lemonade Stand
>*Small fiend, weird neutral*
> ___
> - **Armor Class** 14
> - **Hit Points** 65(1d4 + 5)
> - **Speed** 3ft.
>___
>|STR|DEX|CON|INT|WIS|CHA|
>|:---:|:---:|:---:|:---:|:---:|:---:|
>|2 (-4)|13 (+2)|13 (+2)|17 (+4)|18 (+4)|6 (-2)|
>___
> - **Condition Immunities** groggy, buzzed
> - **Senses** passive Perception 20
> - **Languages** Latin, Pottymouth
> - **Challenge** 14 (5018 XP)
> ___
> ***Pack Tactics.*** These guys work together. Like super well, you don't even know.
> ### Actions
> ***Elbow Hold.*** *Melee Weapon Attack:* +4 to hit, reach 5ft., one target. *Hit* 5 (1d6 + 2) 


___
> ## Sand Cow
>*Gargantuan annoyance, neutral annoying*
> ___
> - **Armor Class** 20
> - **Hit Points** 21(1d4 + 5)
> - **Speed** 37ft.
>___
>|STR|DEX|CON|INT|WIS|CHA|
>|:---:|:---:|:---:|:---:|:---:|:---:|
>|5 (-2)|6 (-2)|5 (-2)|10 (+0)|1 (-4)|10 (+0)|
>___
> - **Condition Immunities** weak-kneed, swagged, buzzed
> - **Senses** passive Perception 11
> - **Languages** None
> - **Challenge** 5 (3425 XP)
> ___
> ***False Appearance. *** While the armor reamin motionless, it is indistinguishable from a normal suit of armor.
>
> ***False Appearance. *** While the armor reamin motionless, it is indistinguishable from a normal suit of armor.
> ### Actions
> ***Turnbuckle Roll.*** *Melee Weapon Attack:* +4 to hit, reach 5ft., one target. *Hit* 5 (1d6 + 2) 

*Images: *
error

Table and Indentations

Referring to page 66 of the Player's Handbook, text immediately following a table should be indented. At the moment, the formatting does not do that automatically, and I do not see any way to format it as such.

P.S. Very cool work. If I get some spare time I might look around your code as I have not done any work like that before.

Wont save

I started a project and I wrote up to 22 pages and it saved fine. Now for some reason it won't save anything additional I add to it.

Keyboard shortcuts for styling text

I gave this a go myself, but unfortunately I am not familiar with Reactjs, just boring ol' vanilla Javascript :'(

It would be nice if Ctrl+B emboldened items and Ctrl+I italicized them for the Homebrewery - much like you can do with other web based markdown editors. Other combinations could work such as header #'s and Ctrl+Number
(Surprisingly, I can't do this in the GitHub issue editor, one example would be StackOverflow though.)

I will continue to investigate this, but I'm getting to a dead end and it'd be nice if someone could step in and put me out of my misery.

Background-free Option

For clarity, when I make homebrew, I don't include the background, so I'd like to request a toggle background on/off button, if possible.

Maybe a way to get a 2 columns PDF ?

Well, I'm really loving the style you put on homebrew. I've played with it this weekend, but the pdf generation was bothering me.
I also use markdown-themeable-pdf package for atom.io : https://atom.io/packages/markdown-themeable-pdf
It helps me generate pdf files for my gaming translations. And I tried to put your css-style in this package, to see what hapened. Well, it generates a two-columns pdf !
Maybe you can look at it if you want to provide a pdf export function.

Render engine stops after page 2 in certain conditions

Hey fella!

Firstly, LOVE the site, it's incredible and you have to be commended for the work. Brilliant, honestly brilliant.

I've been using it to create a class, and after finishing for some reason it won't display anything past page 2, it stops at the character table. I was wondering if you had any idea where I'm screwing your system up lol?

Removed is the work I've done, when I first did it it showed everything perfectly, and now it's only displaying the first 2 pages. Any suggestions?
Many thanks!

Stuart

Class table and half class table both break away from their block and destroys the page

*Browser Type/Version: * Chrome Version 48.0.2564.116 (64-bit)

*Operating System: * Ubuntu 14.04

Issue Description :

Inserting a class table of half class table after a paragraph means the header of the table gets pushed to the 2nd column. putting it after a wide monster stat block works as intended.

*Markdown code to reproduce: *

http://www.naturalcrit.com/homebrew/edit/N1faI-cbsg

*Images: *

http://i.imgur.com/pPSciUK.png

Why no page break in the div.phb ?

Hi !

First of all, very thanks for your work, this tool in fantastic !

My problem/sugestion :
I tried to export in pdf (with an online exporter which respects columns and with chrome canary) and I was surprised to found that there is no break between pages. It causes the pages in the pdf don't match the pages in the html.

I manually fixed it by adding a style="page-break-before: always; page-break-after: always;" in each div.phb and it works !

Could you please add this feature in the css class .phb or something else ?

H1 does not span columns in chrome anymore?

Chrome Version 48.0.2564.109 (64-bit) (Ubuntu 14.04)

I went to correct a typo when I noticed half the page was falling off - dev console shows;

http://i.imgur.com/lrnd9Gi.png

The warning associated with each exclamation mark are ( from top to bottom ):

  • Unkown property name
  • Invalid property value ( "all" works )

In a similar vein;

http://i.imgur.com/VIJlei8.png

Have had overflow: hidden added, which breaks my layout - I can work around it but I wonder if it was intentional or not

TYIA

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.