Skip to content

Commit

Permalink
Change format to ptxt (#2)
Browse files Browse the repository at this point in the history
* refactor to use a different type

* exclude ptxt

* use correct type
  • Loading branch information
withinboredom authored Aug 1, 2024
1 parent 421b320 commit 84eeaee
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .coderabbit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ reviews:
collapse_walkthrough: false
sequence_diagrams: true
path_filters: [
"!*.txt"
"!**/*.ptxt"
]
path_instructions: [
{
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*.txt binary
*.ptxt binary
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
DRAFTS := $(wildcard drafts/*.md)
PUBLISHED := $(DRAFTS:drafts/%.md=published/%.txt)
PUBLISHED := $(DRAFTS:drafts/%.md=published/%.ptxt)

all: $(PUBLISHED) .git/hooks/pre-commit

drafts/template.md: template.txt
drafts/template.md: template.ptxt
@echo "Creating draft from template"
src/convert-to-md.sh template.txt drafts/template.md

published/%.txt: drafts/%.md
published/%.ptxt: drafts/%.md
@echo "Converting $< to $@"
@mkdir -p $(dir $@)
src/convert-from-md.sh $< $@
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/convert-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ mkdir -p published

for file in drafts/*.md; do
echo "converting $file"
output_file="published/$(basename "${file%.md}.txt")"
output_file="published/$(basename "${file%.md}.ptxt")"
src/convert-from-md.sh "$file" "$output_file"
done
File renamed without changes.

0 comments on commit 84eeaee

Please sign in to comment.