README + rudimentary docs

This commit is contained in:
alterNERDtive 2022-07-09 00:42:57 +02:00
parent 3358be75db
commit aa92689f51
13 changed files with 143 additions and 62 deletions

21
.github/workflows/gh-pages.yaml vendored Normal file
View file

@ -0,0 +1,21 @@
name: Deploy github pages on tag push
on:
push:
tags:
- 'release/*'
jobs:
build:
name: Deploy documentation
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@nomaterial
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REQUIREMENTS: requirements.txt

View file

@ -1,43 +1,37 @@
# EDNA An Elite Dangerous System Data Library # YAVAPF Yet Another VoiceAttack Plugin Framework
EDNA is a library for third party apps that want to access data about star This is a framework for implementing VoiceAttack plugins. Simply put I had two
systems, stations and CMDRs of the game Elite Dangerous. It can query issues with the plugins I have been working on over the last couple years:
[EDSM](https://edsm.net), [Spansh](https://spansh.uk) and
[EDTS](http://edts.thargoid.space) for data.
The general idea is that you usually do not care _where_ your data comes from, 1. The plugin API is … functional, but not great. I want to provide one that is
so this will get it for you wherever it can depending on data availability and more pleasant to work with.
API features. 2. I have noticed that I keep re-implementing certain things for each and every
plugin that I write. For example, every single one of them wants to log to
VoiceAttacks event log. A shared framework means writing the code once.
**THIS IS A HEAVY WIP PROJECT AND *NOT* READY FOR PRODUCTION USE.** Just saying. The goal is to get you up & running with as little code and as little knowledge of
the inner workings of VoiceAttack as possible.
## Why EDNA⁈ ## Documentation & Installation Guide
Why not. I find it quite funny that most Elite-related project are 4 letter You can find [comprehensive documentation on Github
acronyms starting with “ED”. So I stuck to that, and I had just played “Edna & Pages](https://alterNERDtive.github.io/YAVAPF).
Harvey: The Breakout” with the kids. Its not actually an acronym though because
I couldnt come up with a meaning for NA.
## TODO for first proper release Or at least you will once this is in a presentable state and I have actually
written the documentation :)
- [x] README There is also an [example plugin on
- [ ] Documentation Github](https://github.com/alterNERDtive/YAVAPF/tree/release/ExamplePlugin).
- [ ] Spansh API
- [ ] system data ## Need Help / Want to Contribute?
- [ ] nearest system
- [ ] station data Have a look at [the troubleshooting
- [ ] outdated stations guide](https://alterNERDtive.github.io/YAVAPF/troubleshooting). If your problem
- [ ] rest (probably out of scope for now) persists, please [file an
- [ ] EDSM API issue](https://github.com/alterNERDtive/YAVAPF/issues/new). Thanks! :)
- [x] Systems
- [x] Logs (CMDR data) You can also [say “Hi” on Discord](https://discord.gg/3pWdJwfJc5) if that is
- [ ] Stations (probably out of scope for now) your thing.
- [x] EDTS API
- [x] system position
- [ ] convenience layer / unification
- [ ] sanity check / refactoring
- [ ] nuget package
- [ ] Github Actions build / package automation
[![GitHub Sponsors](https://img.shields.io/github/sponsors/alterNERDtive?style=for-the-badge)](https://github.com/sponsors/alterNERDtive) [![GitHub Sponsors](https://img.shields.io/github/sponsors/alterNERDtive?style=for-the-badge)](https://github.com/sponsors/alterNERDtive)
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/S6S1DLYBS) [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/S6S1DLYBS)

View file

@ -14,27 +14,40 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Build.targets = Directory.Build.targets Directory.Build.targets = Directory.Build.targets
glider.jpg = glider.jpg glider.jpg = glider.jpg
LICENSE = LICENSE LICENSE = LICENSE
mkdocs.yml = mkdocs.yml
README.md = README.md README.md = README.md
stylecop.json = stylecop.json stylecop.json = stylecop.json
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1BE45F7D-E6DE-49D2-A906-5CC9CD49B639}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1BE45F7D-E6DE-49D2-A906-5CC9CD49B639}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
.github\dependabot.yaml = .github\dependabot.yaml
.github\FUNDING.yml = .github\FUNDING.yml .github\FUNDING.yml = .github\FUNDING.yml
.github\workflows\push-test.yaml = .github\workflows\push-test.yaml
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{9109DB0F-4765-4C7E-9E65-53C729D6251D}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{9109DB0F-4765-4C7E-9E65-53C729D6251D}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
.github\workflows\create-release.yaml = .github\workflows\create-release.yaml .github\workflows\create-release.yaml = .github\workflows\create-release.yaml
.github\dependabot.yaml = .github\dependabot.yaml .github\workflows\gh-pages.yaml = .github\workflows\gh-pages.yaml
.github\workflows\push-test.yaml = .github\workflows\push-test.yaml
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExamplePlugin", "ExamplePlugin\ExamplePlugin.csproj", "{E390356B-4039-4364-B49C-38A37046A7BD}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExamplePlugin", "ExamplePlugin\ExamplePlugin.csproj", "{E390356B-4039-4364-B49C-38A37046A7BD}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{788DDBA5-E959-4153-8580-4462600F2960} = {788DDBA5-E959-4153-8580-4462600F2960} {788DDBA5-E959-4153-8580-4462600F2960} = {788DDBA5-E959-4153-8580-4462600F2960}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{3FE46F37-0E89-4E29-BBCA-8E28A396F478}"
ProjectSection(SolutionItems) = preProject
docs\commands.md = docs\commands.md
docs\contexts.md = docs\contexts.md
docs\events.md = docs\events.md
docs\gettingstarted.md = docs\gettingstarted.md
docs\index.md = docs\index.md
docs\troubleshooting.md = docs\troubleshooting.md
docs\variables.md = docs\variables.md
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -56,6 +69,7 @@ Global
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{1BE45F7D-E6DE-49D2-A906-5CC9CD49B639} = {9E9DD44C-8D0E-4E41-BD7B-3588B94D007D} {1BE45F7D-E6DE-49D2-A906-5CC9CD49B639} = {9E9DD44C-8D0E-4E41-BD7B-3588B94D007D}
{9109DB0F-4765-4C7E-9E65-53C729D6251D} = {1BE45F7D-E6DE-49D2-A906-5CC9CD49B639} {9109DB0F-4765-4C7E-9E65-53C729D6251D} = {1BE45F7D-E6DE-49D2-A906-5CC9CD49B639}
{3FE46F37-0E89-4E29-BBCA-8E28A396F478} = {9E9DD44C-8D0E-4E41-BD7B-3588B94D007D}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3BD38511-A1FB-4B6C-8463-AE6D8E546AE0} SolutionGuid = {3BD38511-A1FB-4B6C-8463-AE6D8E546AE0}

View file

@ -388,13 +388,11 @@ namespace alterNERDtive.Yavapf
/// <param name="internalID">The internal GUID of the variable.</param> /// <param name="internalID">The internal GUID of the variable.</param>
private void BooleanVariableChanged(string name, bool? from, bool? to, Guid? internalID = null) private void BooleanVariableChanged(string name, bool? from, bool? to, Guid? internalID = null)
{ {
List<Action<string, bool?, bool?, Guid?>> actions = this.BoolChangedHandlers.Where( foreach (Action<string, bool?, bool?, Guid?> action in this.BoolChangedHandlers.Where(
action => action.Method.GetCustomAttributes<BoolAttribute>().Where( action => action.Method.GetCustomAttributes<BoolAttribute>().Where(
attr => attr.Name == name || attr => attr.Name == name ||
(attr.Name.StartsWith("^") && Regex.Match(name, attr.Name).Success)) (attr.Name.StartsWith("^") && Regex.Match(name, attr.Name).Success))
.Any()).ToList(); .Any()).ToList())
foreach (Action<string, bool?, bool?, Guid?> action in actions)
{ {
try try
{ {
@ -416,13 +414,11 @@ namespace alterNERDtive.Yavapf
/// <param name="internalID">The internal GUID of the variable.</param> /// <param name="internalID">The internal GUID of the variable.</param>
private void DateVariableChanged(string name, DateTime? from, DateTime? to, Guid? internalID = null) private void DateVariableChanged(string name, DateTime? from, DateTime? to, Guid? internalID = null)
{ {
List<Action<string, DateTime?, DateTime?, Guid?>> actions = this.DateTimeChangedHandlers.Where( foreach (Action<string, DateTime?, DateTime?, Guid?> action in this.DateTimeChangedHandlers.Where(
action => action.Method.GetCustomAttributes<DateTimeAttribute>().Where( action => action.Method.GetCustomAttributes<DateTimeAttribute>().Where(
attr => attr.Name == name || attr => attr.Name == name ||
(attr.Name.StartsWith("^") && Regex.Match(name, attr.Name).Success)) (attr.Name.StartsWith("^") && Regex.Match(name, attr.Name).Success))
.Any()).ToList(); .Any()).ToList())
foreach (Action<string, DateTime?, DateTime?, Guid?> action in actions)
{ {
try try
{ {
@ -444,13 +440,11 @@ namespace alterNERDtive.Yavapf
/// <param name="internalID">The internal GUID of the variable.</param> /// <param name="internalID">The internal GUID of the variable.</param>
private void DecimalVariableChanged(string name, decimal? from, decimal? to, Guid? internalID = null) private void DecimalVariableChanged(string name, decimal? from, decimal? to, Guid? internalID = null)
{ {
List<Action<string, decimal?, decimal?, Guid?>> actions = this.DecimalChangedHandlers.Where( foreach (Action<string, decimal?, decimal?, Guid?> action in this.DecimalChangedHandlers.Where(
action => action.Method.GetCustomAttributes<DecimalAttribute>().Where( action => action.Method.GetCustomAttributes<DecimalAttribute>().Where(
attr => attr.Name == name || attr => attr.Name == name ||
(attr.Name.StartsWith("^") && Regex.Match(name, attr.Name).Success)) (attr.Name.StartsWith("^") && Regex.Match(name, attr.Name).Success))
.Any()).ToList(); .Any()).ToList())
foreach (Action<string, decimal?, decimal?, Guid?> action in actions)
{ {
try try
{ {
@ -472,13 +466,11 @@ namespace alterNERDtive.Yavapf
/// <param name="internalID">The internal GUID of the variable.</param> /// <param name="internalID">The internal GUID of the variable.</param>
private void IntegerVariableChanged(string name, int? from, int? to, Guid? internalID = null) private void IntegerVariableChanged(string name, int? from, int? to, Guid? internalID = null)
{ {
List<Action<string, int?, int?, Guid?>> actions = this.IntChangedHandlers.Where( foreach (Action<string, int?, int?, Guid?> action in this.IntChangedHandlers.Where(
action => action.Method.GetCustomAttributes<IntAttribute>().Where( action => action.Method.GetCustomAttributes<IntAttribute>().Where(
attr => attr.Name == name || attr => attr.Name == name ||
(attr.Name.StartsWith("^") && Regex.Match(name, attr.Name).Success)) (attr.Name.StartsWith("^") && Regex.Match(name, attr.Name).Success))
.Any()).ToList(); .Any()).ToList())
foreach (Action<string, int?, int?, Guid?> action in actions)
{ {
try try
{ {
@ -500,13 +492,11 @@ namespace alterNERDtive.Yavapf
/// <param name="internalID">The internal GUID of the variable.</param> /// <param name="internalID">The internal GUID of the variable.</param>
private void TextVariableChanged(string name, string? from, string? to, Guid? internalID = null) private void TextVariableChanged(string name, string? from, string? to, Guid? internalID = null)
{ {
List<Action<string, string?, string?, Guid?>> actions = this.StringChangedHandlers.Where( foreach (Action<string, string?, string?, Guid?> action in this.StringChangedHandlers.Where(
action => action.Method.GetCustomAttributes<StringAttribute>().Where( action => action.Method.GetCustomAttributes<StringAttribute>().Where(
attr => attr.Name == name || attr => attr.Name == name ||
(attr.Name.StartsWith("^") && Regex.Match(name, attr.Name).Success)) (attr.Name.StartsWith("^") && Regex.Match(name, attr.Name).Success))
.Any()).ToList(); .Any()).ToList())
foreach (Action<string, string?, string?, Guid?> action in actions)
{ {
try try
{ {
@ -550,7 +540,7 @@ namespace alterNERDtive.Yavapf
/// <summary> /// <summary>
/// Denotes a handler for <see /// Denotes a handler for <see
/// cref="VaExit1(VoiceAttackInitProxyClass)"/>. /// cref="VaExit1(VoiceAttackProxyClass)"/>.
/// </summary> /// </summary>
[AttributeUsage(AttributeTargets.Method)] [AttributeUsage(AttributeTargets.Method)]
protected class ExitAttribute : Attribute protected class ExitAttribute : Attribute

0
docs/commands.md Normal file
View file

0
docs/contexts.md Normal file
View file

0
docs/events.md Normal file
View file

0
docs/gettingstarted.md Normal file
View file

29
docs/index.md Normal file
View file

@ -0,0 +1,29 @@
# YAVAPF Yet Another VoiceAttack Plugin Framework
This is a framework for implementing VoiceAttack plugins. Simply put I had two
issues with the plugins I have been working on over the last couple years:
1. The plugin API is … functional, but not great. I want to provide one that is
more pleasant to work with.
2. I have noticed that I keep re-implementing certain things for each and every
plugin that I write. For example, every single one of them wants to log to
VoiceAttacks event log. A shared framework means writing the code once.
The goal is to get you up & running with as little code and as little knowledge of
the inner workings of VoiceAttack as possible.
You can find an [example plugin on
Github](https://github.com/alterNERDtive/YAVAPF/tree/develop/ExamplePlugin).
## Need Help / Want to Contribute?
Have a look at [the troubleshooting
guide](https://alterNERDtive.github.io/YAVAPF/troubleshooting). If your problem
persists, please [file an
issue](https://github.com/alterNERDtive/YAVAPF/issues/new). Thanks! :)
You can also [say “Hi” on Discord](https://discord.gg/3pWdJwfJc5) if that is
your thing.
[![GitHub Sponsors](https://img.shields.io/github/sponsors/alterNERDtive?style=for-the-badge)](https://github.com/sponsors/alterNERDtive)
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/S6S1DLYBS)

0
docs/troubleshooting.md Normal file
View file

0
docs/variables.md Normal file
View file

32
mkdocs.yml Normal file
View file

@ -0,0 +1,32 @@
site_name: "bindED VoiceAttack plugin"
site_url: https://alterNERDtive.github.io/YAVAPF
repo_url: https://github.com/alterNERDtive/YAVAPF
edit_uri: "edit/devel/docs/"
site_description: "YAVAPF is yet another VoiceAttack plugin framework."
site_author: "alterNERDtive"
remote_name: "origin"
theme:
name: readthedocs
prev_next_buttons_location: both
plugins:
- search
- roamlinks
markdown_extensions:
- toc:
permalink: True
- sane_lists
nav:
- 'Home': 'index.md'
- 'Usage':
- 'Getting Started': 'gettingstarted.md'
- 'Event Handlers': 'events.md'
- 'Plugin Contexts': 'contexts.md'
- 'Working with Variables': 'variables.md'
- 'Running Commands': 'commands.md'
- 'troubleshooting.md'
- '⎋ Changelog': 'https://github.com/alterNERDtive/YAVAPF/blob/release/CHANGELOG.md'
- '⎋ Report a Bug': 'https://github.com/alterNERDtive/YAVAPF/issues/'

1
requirements.txt Normal file
View file

@ -0,0 +1 @@
mkdocs-roamlinks-plugin