Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-basten committed Dec 11, 2023
0 parents commit 0424156
Show file tree
Hide file tree
Showing 22 changed files with 157 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# wiki

## Installation

1. Check that python / pip are installed
```
python3 --version
pip3 --version
```
2. `pip3 install mkdocs`
3. `pip3 install mkdocs-material`
4. ...and you're off to the races!
## Running mkdocs
**Local server**
`mkdocs serve`
**Build static html**
`mkdocs build`
Files will be built into the `site` folder, which is not checked into Git.
## Helpful scripts
* Generate new pattern page: `./pattern.sh "Your Pattern Title"`
## Documenation
* [mkdocs](https://www.mkdocs.org/user-guide/installation/)
* [mkdocs-material theme](https://squidfunk.github.io/mkdocs-material/)
26 changes: 26 additions & 0 deletions daily.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

echo "MAKING DAILY ENTRY"

DATE=$(date +%Y-%m-%d)
WEEKLYDIRECTORY="docs/daily/week-of_${DATE}"

TODAY=$(date)
if [[ $TODAY == Mon* ]] && [ ! -d ${WEEKLYDIRECTORY} ]; then
mkdir $WEEKLYDIRECTORY
echo $WEEKLYDIRECTORY dir created
fi

ACTIVEWEEK=$(ls -l docs/daily | tail -1 | awk '{ print $10 }')
FILENAME="docs/daily/${ACTIVEWEEK}/${DATE}-todo.md"

if [ ! -f ${FILENAME} ]; then
# make new daily entry
cp templates/daily-template.md ${FILENAME}
# add header to daily entry
sed -i '' "1s/^/# ${DATE} TODO \n/" ${FILENAME}
echo $FILENAME created.
fi

# open in vscode editor
code $FILENAME
Binary file added docs/.DS_Store
Binary file not shown.
Empty file added docs/daily/.placeholder
Empty file.
12 changes: 12 additions & 0 deletions docs/daily/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# daily

Keep track of daily notes, organized by week.

Daily notes include:

- time in/out
- hours worked
- time off taken
- meetings
- meetings notes
- what tasks have been worked on and completed
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Welcome!

Wiki to keep track of the day-to-day happenings.
Empty file added docs/notes/.placeholder
Empty file.
3 changes: 3 additions & 0 deletions docs/notes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# notes

Place to store longer-form research or meeting notes.
Empty file added docs/patterns/.placeholder
Empty file.
3 changes: 3 additions & 0 deletions docs/patterns/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# patterns

Reusable solutions for common problems.
Empty file added docs/resources/.placeholder
Empty file.
3 changes: 3 additions & 0 deletions docs/resources/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# resources

Static resources for the documentation.
10 changes: 10 additions & 0 deletions jira.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# script to replace all instances of this regex (?<!\[)(KEY-(\d){4,5})(?!\)) with [$0](https://mycompany.atlassian.net/browse/$0) in file passed as argument
# Replace "KEY" with your Jira project key

# update script to run perl command for all arguments passed to script
for i in "$@"
do
perl -pi -e 's/(?<!\[)(KEY-(\d){4,5})(?!\))/[$1](https:\/\/mycompany.atlassian.net\/browse\/$1)/g' $i
done
7 changes: 7 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
site_name: wiki
theme:
name: material
palette:
scheme: slate
markdown_extensions:
- pymdownx.tilde
11 changes: 11 additions & 0 deletions pattern.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# replace spaces with hyphens, make it lowercase
filename=$(echo $1 | tr '[:upper:]' '[:lower:]' | tr ' ' '-')

cp templates/pattern.md docs/patterns/${filename}.md

# replace the first line of the file with the pattern name
sed -i '' "1s/.*/# $1/" docs/patterns/${filename}.md

code docs/patterns/${filename}.md
15 changes: 15 additions & 0 deletions templates/daily-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Hours

in @

out @

## Tasks In Progress

## In Review

## Releases/Completed

## Meetings

## Notes
9 changes: 9 additions & 0 deletions templates/pattern.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# patternName

## Forces/Conflict

## Resolution

## Preceding Patterns

## Following Patterns
15 changes: 15 additions & 0 deletions todo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# todo

Version control tracking for the generate [todo.txt tool](http://todotxt.org/) files.

To point todo.txt to this directory, add the following to the ~/.todo.cfg file:

```
# Your todo.txt directory (this should be an absolute path)
export TODO_DIR="/path/to/wiki/todo"
# Your todo/done/report.txt locations
export TODO_FILE="$TODO_DIR/todo.txt"
export DONE_FILE="$TODO_DIR/done.txt"
export REPORT_FILE="$TODO_DIR/report.txt"
```
Empty file added todo/done.txt
Empty file.
Empty file added todo/report.txt
Empty file.
Empty file added todo/todo.txt
Empty file.
7 changes: 7 additions & 0 deletions weekly-hours.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

ACTIVEWEEK=$(ls -l docs/daily | tail -1 | awk '{ print $10 }')

echo "ADDING WEEKLY HOURS: ${ACTIVEWEEK}"

awk '/hours/' docs/daily/${ACTIVEWEEK}/* | awk 'sum+=$1; END{print sum " hours total"}'

0 comments on commit 0424156

Please sign in to comment.