Browse Source

get a very rough prototype set-up.

master
Craig Oates 4 years ago
parent
commit
9459442b55
  1. 25
      cheatsheet.md
  2. 41
      main.py

25
cheatsheet.md

@ -0,0 +1,25 @@
# Cheatsheet
Here is a collection of shortcuts you are trying to learn.
## Emacs
- `**ctrl-c e**`: Does something fancy.
- **m-x c e l p**: Exports .org file to .pdf.
## Custom Global Shortcuts
`num-4`: Opens Emacs at tasks.org.
`num-5`: Pushes published files to abbether.
`num-6`: Opens this cheatsheet.
## Block code
```python
from rich.console import Console
console = Console()
```

41
main.py

@ -0,0 +1,41 @@
import argparse
from rich.console import Console
from rich.markdown import Markdown
from rich.table import Column, Table
def parse_arguments():
parser = argparse.ArgumentParser(
"Displays a nicely formatted cheatsheet of")
parser.add_argument("-a", "--append",
help="Append a shortcut to your collection using Markdown.")
args = parser.parse_args()
return args
def display_file():
with open("cheatsheet.md") as cheats:
markdown = Markdown(cheats.read())
console = Console()
console.print(markdown)
def append_to_file(data):
# This is not implemented.
x = 0
def main():
args = parse_arguments()
a = args.append
# print(args)
if a is None:
display_file()
else:
print("Appending to file...")
append_to_file(args.append)
x = 4
if __name__ == "__main__":
main()
Loading…
Cancel
Save