Code Monkey home page Code Monkey logo

vscode-dmbinder's Introduction

vscode-dmbinder

Visual Studio Code extension for managing campaign documents.

Documentation

Documentation of how to use vscode-dmbinder has now moved to our wiki!

Installation

Requires Visual Studio Code. Once VSCode is installed, search for the extension or install it from here.

Features

  • DMBinder view that helps organize campaign documents
  • Generation of Hombrewery elements using snippets and templating (Mustache, Handlebars or Pandoc)
  • Rendering of markdown files to PDF using Puppeteer
  • Randomly generate dungeon maps
  • Generation of content (like names, titles, locations, etc.) using randomized lists or Markov chains
  • Random generation of basic dungeon maps

Issues or Feature Requests

Please submit any issues or new feature requests to GitHub.

DMBinder Explorer

The extension looks for .dmbinder/campaign.json in your workspace folders, and displays all DMBinder campaigns in the sidebar.

DMBinder Explorer screenshot

DMBinder Explorer Screenshot

Configuration Settings

  • dmbinder.generateGettingStartedEnabled
  • dmbinder.homebrewPreviewEnabled
  • dmbinder.autogenerateOnRender
  • dmbinder.treeViewStyle
  • dmbinder.chromeExecutablePath
  • dmbinder.defaultTemplatingEngine (Default: "handlebars")

campaign.json

Below is an example Campaign configuration file:

{
    "campaignName": "My Cool Campaign",
    "sourcePaths": [
        "./source/"
    ],
    "templatePaths": [
        "./templates/"
    ],
    "componentPaths": [
        "./components/"
    ],
    "generatorPaths": [
        "./generator-sources"
    ],
    "outDirectory": "./out/"
}

Planned Changes

  • When generating a dungeon map, save settings to a Markdown comment before the map

See generator-dmbinder for a yeoman generator to help bootstrap a campaign binder.

See Changelog for release notes.


Icon Sources

Related Projects

vscode-dmbinder's People

Contributors

dependabot[bot] avatar jsnee 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

Watchers

 avatar  avatar  avatar  avatar

vscode-dmbinder's Issues

Allow Changing of PDF Render Page Size?

Hi @jsnee,

Is it possible to change the page size of the output PDF? I use A4 size paper, and I have added to my style.css the dimensions for it, but when I render the PDF, it outputs to Letter. Is it possible to allow the changing of output page size? Even a predefined list of page sizes would be appreciated.

Kind regards,

rjbprime

background-url images not loading from any source

Not sure if what's going on, but somewhere between release 0.5.9 and 0.5.12, rendering broke for loading images. Is this a regression of some sort? And can it be looked at? I've currently re-installed 0.5.9 via the method outlined in #16, via your comment, and it seems to be working now.

I'm not a programmer by any means, so I mainly code with several examples on hand.

Kind regards

"Automaticaly generate component blocks" tags and add spaces at the end of html self closing ones

The Automaticaly generate component blocks function.
It add a space at the end of all html self closing tags so that

<img src="Cite_Franche.jpg" style="position:absolute;bottom:100px;left:50px;" />

becomes

<img src="Cite_Franche.jpg" style="position:absolute;bottom:100px;left:50px;"     />

after some times.
And the style tags at the top of my doc is emptied leaving only this :

<style></style>

with previously

<style>
.phb#p1 { text-align:center; }
.phb#p1:after { display:none; } 
</style>

Page Number code?

Trying to change the colour of the pagenumber auto in my brew using CSS. I have written color: black; in the relevant place, and it's defaulting to a gold colour and a different size from what I chose, which seems to be the same as the default Homebrewery PHB style. Would it be possible to change this to allow the change?

Attached are the PDF and renamed md files, to see if they help.

A4.pdf

A4.md.txt

Backgrounds / Stylesheet Images Not Loading

Heyyo, I'm having trouble getting the default background image to load from the CSS. My guess is that it's rendering "too fast" and outputting to file before that image is loaded. I've tried half a dozen different versions of chromium even up to 891643 and it's the same result every time. I've also confirmed that images are working correctly, as you can see here in preview and render.
image
image

I found a number of issues on Puppeteer's side mentioning that it's not waiting for background images specifically to finish before saying it's done rendering. I haven't tracked this further (maybe a chromium issue but I can't get older versions to work with puppeteer).

A guess on a temporary workaround would be to add a tenth of a second pause on the render for each page. It's a gross hack but I can wait a few seconds for my docs to not be ugly.

Command Not Found

Hello,

On a fresh installation of the extension, attempting to do anything results in a 'command 'dmbinder.xxxxx.xxxxxx' not found' message. For example:

  • command 'dmbinder.source.addFile' not found
  • command 'dmbinder.source.addFolder' not found
  • command 'dmbinder.campaign.refresh' not found
  • command 'dmbinder.component.addFile' not found

I have attempted this on multiple computers. Also tried to manually create a campaign.json file using the example in the wiki and created the folder structure for it. I can't seem to get any commands to work. Is there something I could be missing?

Issue with exporting files

Not sure what's going on, but the last couple of days, whenever I have been trying to export a files as pdf, it only renders part of the file, such that either the majority of text is missing, or the background is corrupted. Could this be a Puppeteer issue or something else? As copying the code into homebrewery itself, the files work.

Customizing css for rendering

Hi !

I'm using this extensions for some days now (wonderful work by the way) and i'm currently trying to improve my layout. For this, i add a style tag at the beggining of the doc with my css. But even if it's working within https://homebrewery.naturalcrit.com/ it's not for the pdf rendering.

Any advice on how to make it work ?

PS. Not sure about how to post this but couldn't find a better place (please tell me if there is such and i'll move this right away).

New issue with exporting to PDF. Possible Regression of Issue #

Hi JSNee,

Started using the app again to update my campaign guide. Using current version of the plugin, and it now exports with an new(?) issue, that of the output pdf has a white page border on left and bottom sides of most pages, and the top and the left on the cover page.. Seems to be 2 to 3 mm on those two sides. I've tested my code in Homebrewery, and it doesn't show this error in that.

I'm attaching the VSCode-DMBinder PDF and renamed md file to this post, and linking to the Homebrewery PDF Link as well. I know that the Homebrewery version Title page fonts are not the right size, but that's due to the code using for them.

Homebrewery version

manateros.pdf

manateros.txt

All A4 based.

Needs support for installing to vscodium

Request: Add extension to open-vsx.org for use with VSCodium.

Issue:
Using Visual Studio Code: DMBinder extension is found in extension marketplace.
Using VSCodium (https://vscodium.com): DMBinder extension is not found in default extension marketplace.

Currently:
I have both VSCode 1.55.0 and VSCodium 1.55.2 open. DMBinder is only available within the marketplace for VSCode.

Details:
The product.json file for VSCodium is set up to use open-vsx.org as extension gallery, versus VSCode's use of marketplace.visualstudio.com. (See https://github.com/VSCodium/vscodium/blob/master/DOCS.md#howto-vscode-marketplace)

Solution (recommended):
Can this extension be added to open-vsx.org?
Alternate Solution:
Users would need to modify the settings to use the Microsoft Marketplace, which may not be legal. See above link for details.

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.