项目作者: DrMcCoy

项目描述 :
A FLOSS Pathfinder TTRPG helper
高级语言: C++
项目地址: git://github.com/DrMcCoy/decemvirate.git
创建时间: 2020-03-19T18:16:19Z
项目社区:https://github.com/DrMcCoy/decemvirate

开源协议:GNU Affero General Public License v3.0

下载


Decemvirate README

Decemvirate is a free/libre and open source (FLOSS) helper program for the
Pathfinder tabletop roleplaying game, licensed under the terms of the
GNU Affero General Public License version 3
(or later), written in Python.

This repository contains an SQLite3 database. For details on its contents, see
data/README.md. To easier manage that database inside a git
repository, we’re using git-sqlite.
Just checking out, building and using Decemvirate does not require git-sqlite,
but viewing commit diffs and merging commits does. To continue viewing the
database as an opaque binary blob, remove the relevant line in the file
.gitattributes.

Decemvirate itself can be found on GitHub here.

What does Decemvirate do?

Decemvirate’s main use is to translate Pathfinder 1e terminology between
English and German. Specifically, it can search and translate

  • feat names
  • spell names
  • publication (book) names

You can search either the English or the German name of one of these and it
will tell you the translated counterpart.

Additionally, Decemvirate contains various metadata associated with each of
these concepts. For example, for a publication, it also shows the ISBN. For a
feat, it shows a short description. For a spell, it know which classes have that
spell in their spell book. It also knows in which book the feat or spell can be
found, and displays URLs to various additional resources on the internet.

Decemvirate can run both as a command line program and as a web application.

In the former case, single Pathfinder database queries are issued and the
results printed to stdout. In the latter case, a whole web service runs
continuously to allow for easy database querying over a period of time.

Why?

Decemvirate was born out of the COVID pandemic, when all my games moved to
online play via FoundryVTT.

We’re playing in German, but unfortunately, not all feats and spells in the
Pathfinder 1e system in FoundryVTT have been translated to German. Additionally,
sometimes we wanted to look up a complete description of a spell or a feat, and
also see how it was phrased in the original (as opposed to the German
translation). And sometimes I was GM’ing a module that was never translated into
German to begin with, so had to do the translation work myself.

Installation

To install Decemvirate system-wide, use

  1. pip install .

To install Decemvirate for current user only, use

  1. pip install --user .

To install Decemvirate in a virtualenv, use

  1. pip -m venv env
  2. source env/bin/activate
  3. pip install .

Optionally, the included Makefile can be leveraged to install and
run Decemvirate from a virtualenv. Please read the Makefile itself
to understand what it can do.

One example of using the Makefile:

  1. PYTHON=python3 make arg="-d data/pathfinder.sqlite web -l :: -p 31000"

This would install Decemvirate into a virtualenv and run it as a webserver,
using “python3” as the Python environment.

Command line usage

  1. usage: decemvirate [-h] [-v] -d DATABASE
  2. {web,finddepub,findenpub,finddespell,findenspell,findspellbyclass,finddefeat,findenfeat}
  3. ...
  4. decemvirate -- A FLOSS Pathfinder TTRPG helper
  5. options:
  6. -h, --help show this help message and exit
  7. -v, --version print the version and exit
  8. -d DATABASE, --database DATABASE
  9. SQLite database to use (required)
  10. Supported commands:
  11. {web,finddepub,findenpub,finddespell,findenspell,findspellbyclass,finddefeat,findenfeat}
  12. web Run the Decemvirate web application (default)
  13. finddepub Search German publication by abbreviation or title
  14. findenpub Search English publication by product code,
  15. abbreviation or title
  16. finddespell Search German spells by name
  17. findenspell Search English spells by name
  18. findspellbyclass Search spells by class (and level)
  19. finddefeat Search German feats by name
  20. findenfeat Search English feats by name
  21. Command web:
  22. usage: decemvirate web [-h] [-l HOST] [-p PORT] [-t THREADS]
  23. options:
  24. -h, --help show this help message and exit
  25. -l HOST, --host HOST hostname or IP address on which to listen (default:
  26. 127.0.0.0)
  27. -p PORT, --port PORT TCP port on which to listen (default: 8080)
  28. -t THREADS, --threads THREADS
  29. the number of threads used to process application
  30. logic (default: 4)
  31. Command finddepub:
  32. usage: decemvirate finddepub [-h] abbreviation/title
  33. positional arguments:
  34. abbreviation/title abbreviation or title to search for
  35. options:
  36. -h, --help show this help message and exit
  37. Command findenpub:
  38. usage: decemvirate findenpub [-h] code/abbreviation/title
  39. positional arguments:
  40. code/abbreviation/title
  41. product code, abbreviation or title to search for
  42. options:
  43. -h, --help show this help message and exit
  44. Command finddespell:
  45. usage: decemvirate finddespell [-h] name
  46. positional arguments:
  47. name spell to search for
  48. options:
  49. -h, --help show this help message and exit
  50. Command findenspell:
  51. usage: decemvirate findenspell [-h] name
  52. positional arguments:
  53. name spell to search for
  54. options:
  55. -h, --help show this help message and exit
  56. Command findspellbyclass:
  57. usage: decemvirate findspellbyclass [-h] class [level]
  58. positional arguments:
  59. class class name to search for
  60. level class level search for
  61. options:
  62. -h, --help show this help message and exit
  63. Command finddefeat:
  64. usage: decemvirate finddefeat [-h] name
  65. positional arguments:
  66. name feat to search for
  67. options:
  68. -h, --help show this help message and exit
  69. Command findenfeat:
  70. usage: decemvirate findenfeat [-h] name
  71. positional arguments:
  72. name feat to search for
  73. options:
  74. -h, --help show this help message and exit

Command line examples

  • decemvirate -d data/pathfinder.sqlite web
  • decemvirate -d data/pathfinder.sqlite finddepub EXP
  • decemvirate -d data/pathfinder.sqlite finddepub "abr II"
  • decemvirate -d data/pathfinder.sqlite finddepub grundregelwerk
  • decemvirate -d data/pathfinder.sqlite finddepub drachen
  • decemvirate -d data/pathfinder.sqlite findenpub PZO1110
  • decemvirate -d data/pathfinder.sqlite findenpub CR
  • decemvirate -d data/pathfinder.sqlite findenpub "Core Rule"
  • decemvirate -d data/pathfinder.sqlite finddespell federfall
  • decemvirate -d data/pathfinder.sqlite findenspell "feather fall"
  • decemvirate -d data/pathfinder.sqlite finddefeat mehrfachschuss
  • decemvirate -d data/pathfinder.sqlite finddefeat manyshot
  • decemvirate -d data/pathfinder.sqlite findspellbyclass Hexenmeister
  • decemvirate -d data/pathfinder.sqlite findspellbyclass Jäger 2

Web server usage

When running Decemvirate as a webserver using, for example

  1. decemvirate -d data/pathfinder.sqlite web -p 31000

and then opening http://localhost:31000/ with a web browser, Decemvirate can be
used to continuously query the database.

This is how it’ll look:

Screenshot of a web page showing Decemvirate.

On the top, radio buttons can be set to select which operation (for example,
searching for feat by German name) is used, and below that, a text field allows
the search query to be entered. In the middle, the results would show, currently
empty. At the bottom, the current Decemvirate version is displayed.

You can then, for example, click “Deutsches Talent” to search for a German feat
and then enter “abhä”, and it will list all matching feats with their metadata.

Screenshot of Decemvirate after the query has been entered.

Three feats are now listed in shadowed boxes in the middle of the page. Each
contain a small description, name of the book and page where it is found and
links to several websites with more in-depth description of the feat.

The “5footstep”, “d20pfsrd” and “aonprd” links are clickable and lead to the
respective SRDs on the internet, directly to the pages of each feat.

When clicking on one of the book links, for example “ABR V”, it will lead
to a different Decemvirate query for that book.

Screenshot of Decemvirate after the second query.

The website now shows the results of the query for the book “ABR V”. There is
one result shown in the middle of the page, with further information on that
book.

As can be seen, Decemvirate can thus be used to easily search for several key
concepts of the Pathfinder 1e system and receive information about them in both
English and German.

Web server example files

The examples/ directory contains example configuration files to run
Decemvirate continuously as a web service on a dedicated server. See the
README.md in the examples/ directory for
details.