From 81c361bfb81180af51bf18e3bb3f4e626ea6b09e Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 10 Jan 2020 16:03:04 -0500 Subject: [PATCH 1/8] Make brand new files also save compressed --- server/homebrew.api.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/homebrew.api.js b/server/homebrew.api.js index 346c6fe00..1a028f7f6 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -32,9 +32,14 @@ router.post('/api', (req, res)=>{ req.body, { authors: authors } )); + if(!newHomebrew.title){ newHomebrew.title = getGoodBrewTitle(newHomebrew.text); } + + newHomebrew.textBin = zlib.deflateRawSync(newHomebrew.text); // Compress brew text to binary before saving + newHomebrew.text = ''; // Clear out the non-binary text field so its not saved twice + newHomebrew.save((err, obj)=>{ if(err){ console.error(err, err.toString(), err.stack); From ef325e261733be32aaca1f6cab33ea155bb2904b Mon Sep 17 00:00:00 2001 From: Christian Brickhouse Date: Thu, 14 Mar 2019 00:32:28 -0700 Subject: [PATCH 2/8] Updating README.md with more detailed install instructions and reformatting. --- README.md | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index f0eae7e04..1bf2316c8 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,46 @@ # The Homebrewery -The Homebrewery is a tool for making authentic looking [D&D content](https://dnd.wizards.com/products/tabletop-games/rpg-products/rpg_playershandbook) using only [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet). Check it out [here](https://homebrewery.naturalcrit.com). +The Homebrewery is a tool for making authentic looking [D&D content](https://dnd.wizards.com/products/tabletop-games/rpg-products/rpg_playershandbook) using [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet). It is distributed under the terms of the [MIT License](./license). +## Quick Start +The easiest way to get started using the Homebrewery is to use it [on our website](https://homebrewery.naturalcrit.com). If you have larger brews or want to make changes to the code follow the installation instructions below. -### issues, suggestions, bugs -If you run into any issues using The Homebrewery, please submit an issue [here](/issues). +### Installation +First, install two programs that the Homebrewery requires to run. - -### local dev -The Homebrewery is open source, so feel free to clone it, tinker with it, or run your own local version. - -#### pre-reqs 1. install [node](https://nodejs.org/en/) 1. install [mongodb](https://www.mongodb.com/) -#### getting started -1. clone it +Second, download a copy of the repository. If you have git you can do so with +``` +git clone https://github.com/naturalcrit/homebrewery.git +``` + +Third, you will need to modify line 9 of the file server.js so that it looks like: +``` +//app.use(require('./server/forcessl.mw.js')); +``` + +Fourth, you will need to install the program and run it using the two commands: + 1. `npm install` -1. `npm build` 1. `npm start` -#### 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 [here](https://github.com/stolksdorf/homebrewery/blob/master/phb.standalone.css). +You should now be able to go to [http://localhost:8000](http://localhost:8000) in your browser and use the Homebrewery offline. + +### 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](./blob/master/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`. -### changelog +## Issues, Suggestions, and Bugs +If you run into any issues using The Homebrewery or have suggestions for improvement, please submit an issue [on GitHub](/issues). You can also get help for issues on the subreddit [r/homebrewery](https://www.reddit.com/r/homebrewery) -You can check out the changelog [here](https://github.com/stolksdorf/homebrewery/blob/master/changelog.md). +## Changelog -### license +You can check out the [changelog](./blob/master/changelog.md). -This project is licensed under [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. +## License + +This project is licensed under the [MIT license](./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. From 3e8551bad6673f02b79218a2ee89d6ae24d1570f Mon Sep 17 00:00:00 2001 From: Christian Brickhouse Date: Thu, 14 Mar 2019 00:39:53 -0700 Subject: [PATCH 3/8] Fix links to blobs in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1bf2316c8..08140f98e 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Fourth, you will need to install the program and run it using the two commands: You should now be able to go to [http://localhost:8000](http://localhost:8000) in your browser and use the Homebrewery offline. ### 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](./blob/master/phb.standalone.css) file. +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](./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`. @@ -37,7 +37,7 @@ If you run into any issues using The Homebrewery or have suggestions for improve ## Changelog -You can check out the [changelog](./blob/master/changelog.md). +You can check out the [changelog](./changelog.md). ## License From ecd25ca49f4207dee81444a8b8889496b144c6c4 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 21 Jan 2020 10:03:52 -0500 Subject: [PATCH 4/8] Changed to encourage environment variable --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 08140f98e..571ffb876 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The Homebrewery is a tool for making authentic looking [D&D content](https://dnd.wizards.com/products/tabletop-games/rpg-products/rpg_playershandbook) using [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet). It is distributed under the terms of the [MIT License](./license). ## Quick Start -The easiest way to get started using the Homebrewery is to use it [on our website](https://homebrewery.naturalcrit.com). If you have larger brews or want to make changes to the code follow the installation instructions below. +The easiest way to get started using the Homebrewery is to use it [on our website](https://homebrewery.naturalcrit.com). The code is open source, so feel free to clone it, 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 two programs that the Homebrewery requires to run. @@ -15,10 +15,12 @@ Second, download a copy of the repository. If you have git you can do so with git clone https://github.com/naturalcrit/homebrewery.git ``` -Third, you will need to modify line 9 of the file server.js so that it looks like: -``` -//app.use(require('./server/forcessl.mw.js')); -``` +Third, you will need to add the environment variable `NODE_ENV = local` to allow the project to run locally. + +You can set this temporarily in your shell of choice: +* Windows Powershell: `$env:NODE_ENV="local"` +* Windows CMD: `set NODE_ENV=production` +* Linux / OSX: `export NODE_ENV=production` Fourth, you will need to install the program and run it using the two commands: From e8dcb042f8d14621ca2962bcc31e78c485aa0cc1 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 21 Jan 2020 10:05:03 -0500 Subject: [PATCH 5/8] Typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 571ffb876..7922df074 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ Third, you will need to add the environment variable `NODE_ENV = local` to allow You can set this temporarily in your shell of choice: * Windows Powershell: `$env:NODE_ENV="local"` -* Windows CMD: `set NODE_ENV=production` -* Linux / OSX: `export NODE_ENV=production` +* Windows CMD: `set NODE_ENV=local` +* Linux / OSX: `export NODE_ENV=local` Fourth, you will need to install the program and run it using the two commands: From 09ae750eece0f8201f73a40820468a2ece96a0e1 Mon Sep 17 00:00:00 2001 From: Eric Scheid Date: Sun, 23 Dec 2018 17:35:06 +1100 Subject: [PATCH 6/8] list-style-type is a property of
  • , not
      --- client/homebrew/phbStyle/phb.style.less | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/homebrew/phbStyle/phb.style.less b/client/homebrew/phbStyle/phb.style.less index eea74771e..2b5dd9c72 100644 --- a/client/homebrew/phbStyle/phb.style.less +++ b/client/homebrew/phbStyle/phb.style.less @@ -464,6 +464,8 @@ body { } ul{ padding-left : 0; + } + ul li{ list-style-type : none; } &>ul>li{ From 462a5608d295544b8da7cd9ce3d139a0b8475213 Mon Sep 17 00:00:00 2001 From: Eric Scheid Date: Sun, 23 Dec 2018 18:03:41 +1100 Subject: [PATCH 7/8] Revert "list-style-type is a property of
    • , not
        " This reverts commit 831bf5bc625e07be978a2cd10ef8c634404488ce. --- client/homebrew/phbStyle/phb.style.less | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/homebrew/phbStyle/phb.style.less b/client/homebrew/phbStyle/phb.style.less index 2b5dd9c72..eea74771e 100644 --- a/client/homebrew/phbStyle/phb.style.less +++ b/client/homebrew/phbStyle/phb.style.less @@ -464,8 +464,6 @@ body { } ul{ padding-left : 0; - } - ul li{ list-style-type : none; } &>ul>li{ From aeffec1763960ca544b2b9525156641514fad83d Mon Sep 17 00:00:00 2001 From: Eric Scheid Date: Mon, 24 Dec 2018 15:56:25 +1100 Subject: [PATCH 8/8] minor grammar fixes in error messages --- client/homebrew/brewRenderer/errorBar/errorBar.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/brewRenderer/errorBar/errorBar.jsx b/client/homebrew/brewRenderer/errorBar/errorBar.jsx index d5447e71d..63daf5b4d 100644 --- a/client/homebrew/brewRenderer/errorBar/errorBar.jsx +++ b/client/homebrew/brewRenderer/errorBar/errorBar.jsx @@ -36,13 +36,13 @@ const ErrorBar = createClass({ const msg = []; if(this.hasOpenError){ msg.push(
        - An unmatched opening tag means there's an opened tag that isn't closed, you need to close a tag, like this {'
        '}. Make sure to match types! + An unmatched opening tag means there's an opened tag that isn't closed. You need to close your tags, like this {''}. Make sure to match types! ); } if(this.hasCloseError){ msg.push(
        - An unmatched closing tag means you closed a tag without opening it. Either remove it, you check to where you think you opened it. + An unmatched closing tag means you closed a tag without opening it. Either remove it, or check to where you think you opened it.
        ); }