Downloads:
55
Downloads of v 0.1.0:
8
Last Update:
24 Apr 2024
Published Date:
24 Apr 2024
Package Maintainer(s):
Software Author(s):
- tuffff
Tags:
tuffcards- Software Specific:
- Software Site
- Software Source
- Software License
- Software Issues
- Package Specific:
- Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
tuffCards
(Ready for review)
- 1
- 2
- 3
0.1.0 | Updated: 24 Apr 2024
- Software Specific:
- Software Site
- Software Source
- Software License
- Software Issues
- Package Specific:
- Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
Downloads:
55
Downloads of v 0.1.0:
8
Published:
24 Apr 2024
Maintainer(s):
Software Author(s):
- tuffff
Tags:
tuffcardstuffCards 0.1.0
(Ready for review)
- 1
- 2
- 3
All Checks are Passing
3 Passing Tests
This version is in moderation and has not yet been approved. This means it doesn't show up under normal search.
- Until approved, you should consider this package version unsafe - it could do very bad things to your system (it probably doesn't but you have been warned, that's why we have moderation).
- This package version can change wildly over the course of moderation until it is approved. If you install it and it later has changes to this version, you will be out of sync with any changes that have been made to the package. Until approved, you should consider that this package version doesn't even exist.
- You cannot install this package under normal scenarios. See How to install package version under moderation for more information.
- There are also no guarantees that it will be approved.
There are versions of this package awaiting moderation (possibly just this one). See the Version History section below.
tuffCards is a small tool to convert html/css/csv templates to cards.
Quick Start
Installation: choco install tuff-cards --version 0.1.0
(it's still in review)
Command overview: tuffCards --help
See example output:
md example-project | cd
tuffCards create-example
tuffCards convert
.\output\default\actions.html
.\output\default\buildings.html
General workflow
- Prepare an empty project folder
- Create a project with
tuffCards create
- Add all needed card types with
tuffCards add-type ‹name›
- this will add a matching csv, html and css file in/cards
- Adjust the csv to include all needed fields
- Adjust the html to render those fields
- Create the layout via css
- Convert the project with
tuffCards convert
- Take a look at your cards in
/output/default
- just open the file in your browser - To export your cards in a specific format, copy
/targets/default.html
to a new file and adjust, then convert with--target ‹target›
- To create an image from your target, use
--image
- you may need to adjust the size (see below)
How it works
tuffCards does three or four templating steps:
Parse Markdown from /cards/‹type›.csv
The table is expected to be a semicolon-separated csv file that represents the card data. The header-line defines the name of the fields (use alphanumeric and - or _). Each content-row will result in one card.
The content of each field is parsed as Markdown with Markdig. There are two custom commands:
{iconname}
will result in an image with the css-classicon
and the first file from the/icons
folder in the formaticonname.anything
. If no file is found,iconname
will just show up (and a warning appears).{{imagename}}
will do the same, but with the css-classimage
and from the folder/images
.
This action is done for every csv file found in /cards
. A matching html template is expected and throws an error if missing.
Parse card template from /cards/‹type›.html
The html file is parsed with scriban.
- Use the format {{ columnname }} to insert the content from the card table. Use the name exactly as in the header-line in the csv file.
- Use the function
md
to also perform a markdown parse with the same rules as above.{{ md "{iconname}" }}
would result in a static icon.
Parse target template from /targets/‹target›.html
This step packs all cards of one type into a single file. If not specified, /targets/default.html
is used. The following fields can be used:
name
is the card type's name. This can be useful to target specific card types via global css.cards
is a list of all cards of that type.scripts
contains all scripts from/scripts
. By default, the script/scripts/fit-text
can be used to shrink text to fit. These files are optional.globaltargetcss
is just the file/targets/global.css
. This file is optional.cardtypecss
is the file/cards/‹type›.css
. This file is optional.
The result is written to /output/‹target›/‹type›.html
.
(Optional) Render the target as image
If you use the --image
option, tuffCards uses Puppeteer Sharp to take a to take a screenshot.
MIT No Attribution
Copyright 2024 tuffff
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
md5: E60AEC088394E51427C38B7C10685751 | sha1: 7E7107DC48DFE3EA38E49214C85335E3A15B7614 | sha256: 667514D9BE5E74CD44FD063BB995E96E17A9532774511F3268767060FBC9FFA0 | sha512: FE1BC6F64B8096671C3CE61E2F9D138A7A0E9506454253C96BFC3C25E2F9CFB67DEF33FF3DC2292D9B736665FB390FBEC382BE3A70445886A317B8018C045126
VERIFICATION
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.
MD5 hash of .\tuffCards.exe:
e60aec088394e51427c38b7c10685751
Log in or click on link to see number of positives.
- tuff-cards.0.1.0.nupkg (e5c547257552) - ## / 65
- tuffCards.exe (667514d9be5e) - ## / 69
In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).
Chocolatey Pro provides runtime protection from possible malware.
This package has no dependencies.
Ground Rules:
- This discussion is only about tuffCards and the tuffCards package. If you have feedback for Chocolatey, please contact the Google Group.
- This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
- The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
- Tell us what you love about the package or tuffCards, or tell us what needs improvement.
- Share your experiences with the package, or extra configuration or gotchas that you've found.
- If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
tuffff (maintainer) on 24 Apr 2024 07:17:22 +00:00:
User 'tuffff' (maintainer) submitted package.
chocolatey-ops (reviewer) on 24 Apr 2024 07:50:40 +00:00:
tuff-cards has passed automated validation. It may have or may still fail other checks like testing (verification).
NOTE: No required changes that the validator checks have been flagged! It is appreciated if you fix other items, but only Requirements will hold up a package version from approval. A human review could still turn up issues a computer may not easily find.
Guidelines
Guidelines are strong suggestions that improve the quality of a package version. These are considered something to fix for next time to increase the quality of the package. Over time Guidelines can become Requirements. A package version can be approved without addressing Guideline comments but will reduce the quality of the package.
Notes
Notes typically flag things for both you and the reviewer to go over. Sometimes this is the use of things that may or may not be necessary given the constraints of what you are trying to do and/or are harder for automation to flag for other reasons. Items found in Notes might be Requirements depending on the context. A package version can be approved without addressing Note comments.
chocolatey-ops (reviewer) on 24 Apr 2024 08:01:38 +00:00:
tuff-cards has passed automated package testing (verification). The next step in the process is package scanning.
Please visit https://gist.github.com/choco-bot/f465a29f577939df51f2e699d2511f1f for details.
This is an FYI only. There is no action you need to take.
chocolatey-ops (reviewer) on 24 Apr 2024 08:22:08 +00:00:
tuff-cards has passed automated virus scanning.