Add content list

This commit is contained in:
Stavros Korokithakis 2020-11-20 22:10:56 +02:00
parent 3ad2c40646
commit ef98b7f805
No known key found for this signature in database
GPG Key ID: 26EA345ECD4C2A63
11 changed files with 68 additions and 17 deletions

View File

@ -1,7 +1,14 @@
+++ +++
title = "Drone stuff" title = "Drone stuff"
weight = 2 weight = 3
sort_by = "weight" sort_by = "weight"
insert_anchor_links = "right" insert_anchor_links = "right"
+++ +++
Select one of the sublinks on the left to see the notes in this section. ## Contents
Click on a link in the list below to go to that page:
1. [Getting uninverted SBUS on a no-name FrSky-compatible receiver](../../drone-stuff/getting-uninverted-sbus-on-a-no-name-frsky-compatible-receiver)
1. [Getting uninverted SBUS on the FrSky XSR receiver](../../drone-stuff/getting-uninverted-sbus-on-the-frsky-xsr-receiver)
1. [Omnibus F4 V3](../../drone-stuff/omnibus-f4-v3)
1. [Omnibus F4 pro servo diode](../../drone-stuff/omnibus-f4-pro-servo-diode)

View File

@ -0,0 +1,14 @@
+++
title = "Getting uninverted SBUS on a no-name FrSky-compatible receiver"
weight = 0
sort_by = "weight"
insert_anchor_links = "right"
+++
I got an [RC receiver](https://www.banggood.com/2_4G-8CH-D8-Mini-FrSky-Compatibel-Receiver-With-PWM-PPM-SBUS-Output-p-1140478.html?rmmds=myorder&cur_warehouse=CN) from Banggood. There's uninverted SBUS on this pad:
![rc-sbus.jpg](../../ccc7571db5d147328860077fdc0aa745.jpg)
To break this out to the SBUS pad, I had to remove/bridge the resistor that is circled in the image, and remove/bridge the FET on the other side:
![rc-sbus-mosfet.jpg](../../1b0f508a533e45b496c6636d49161b0c.jpg)

View File

@ -0,0 +1,16 @@
+++
title = "Getting uninverted SBUS on the FrSky XSR receiver"
weight = 1
sort_by = "weight"
insert_anchor_links = "right"
+++
To get uninverted SBUS on the FrSky XSR/X4RS receiver, you can repurpose the CPPM pad.
Just solder the following:
![xsr-sbus.jpeg](../../f86da9a7aac1413ebd77825897164f7f.jpeg)
> Remove the two resistors and solder a small wire from the CPPM pin pad to both (!!!) of the lower resistor solder pads.
![xsr-sbus2.jpeg](../../815576429ece43789dbc70dfd33517a1.jpeg)
Now the CPPM pad will be uninverted SBUS instead.

View File

@ -1,6 +1,6 @@
+++ +++
title = "Omnibus F4 pro servo diode" title = "Omnibus F4 pro servo diode"
weight = 1 weight = 3
sort_by = "weight" sort_by = "weight"
insert_anchor_links = "right" insert_anchor_links = "right"
+++ +++

View File

@ -1,6 +1,6 @@
+++ +++
title = "Omnibus F4 V3" title = "Omnibus F4 V3"
weight = 0 weight = 2
sort_by = "weight" sort_by = "weight"
insert_anchor_links = "right" insert_anchor_links = "right"
+++ +++

View File

@ -1,7 +1,11 @@
+++ +++
title = "Welcome" title = "Welcome"
weight = 1 weight = 0
sort_by = "weight" sort_by = "weight"
insert_anchor_links = "right" insert_anchor_links = "right"
+++ +++
Select one of the sublinks on the left to see the notes in this section. ## Contents
Click on a link in the list below to go to that page:
1. [Stavros' notes](../../welcome/stavros-notes)

View File

@ -111,21 +111,12 @@ class JoplinExporter:
folder_id, folder_title = folder folder_id, folder_title = folder
dir = self.content_dir / slugify(folder_title) dir = self.content_dir / slugify(folder_title)
dir.mkdir(parents=True) dir.mkdir(parents=True)
with (dir / "_index.md").open(mode="w") as outfile: contents = []
outfile.write(
f"""+++
title = "{folder_title}"
weight = {counter}
sort_by = "weight"
insert_anchor_links = "right"
+++
Select one of the sublinks on the left to see the notes in this section."""
)
for counter, note in enumerate( for counter, note in enumerate(
sorted(self.notes[folder_id], key=lambda n: n.title) sorted(self.notes[folder_id], key=lambda n: n.title)
): ):
print(f"Exporting {folder_title} - {note.title}...") print(f"Exporting {folder_title} - {note.title}...")
contents.append((note.title, note.get_url()))
with (self.content_dir / (note.get_url() + ".md")).open( with (self.content_dir / (note.get_url() + ".md")).open(
mode="w" mode="w"
) as outfile: ) as outfile:
@ -139,6 +130,25 @@ insert_anchor_links = "right"
{self.resolve_note_links(note)}""" {self.resolve_note_links(note)}"""
) )
with (dir / "_index.md").open(mode="w") as outfile:
contents_list = "\n1. ".join(
f"[{title}](../../{url})" for title, url in contents
)
outfile.write(
f"""+++
title = "{folder_title}"
weight = {counter}
sort_by = "weight"
insert_anchor_links = "right"
+++
## Contents
Click on a link in the list below to go to that page:
1. {contents_list}
"""
)
if __name__ == "__main__": if __name__ == "__main__":
print("Exporting Joplin database...") print("Exporting Joplin database...")

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB