aboutsummaryrefslogtreecommitdiffstats
path: root/_posts
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2020-12-07 02:51:58 +0300
committerla-ninpre <leobrekalini@gmail.com>2020-12-07 02:51:58 +0300
commitc34a1404a2ceb018834ff092fe3c87dd664c515d (patch)
tree6ef5080766e937ad8d5a108e6f06b73d4dbf9a9d /_posts
parentf51ad63fd743e228ed6819a055d0b05ec0d2cab5 (diff)
downloadaaoth.xyz-c34a1404a2ceb018834ff092fe3c87dd664c515d.tar.gz
aaoth.xyz-c34a1404a2ceb018834ff092fe3c87dd664c515d.zip
update post pages and add fossil export post
edit post layout to handle tags, add sort-by-tag page and edit stylesheet according post content updates
Diffstat (limited to '_posts')
-rw-r--r--_posts/2020-11-12-example.md11
-rw-r--r--_posts/2020-12-06-fossil-to-git.md51
2 files changed, 51 insertions, 11 deletions
diff --git a/_posts/2020-11-12-example.md b/_posts/2020-11-12-example.md
deleted file mode 100644
index ddc3c32..0000000
--- a/_posts/2020-11-12-example.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-title: example post
-date: 2020-11-12T02:11:45+03:00
-layout: post
----
-
-this is an example post.
-
-i have plans on moving my posts from telegram channel here,
-so they are not restricted. but the script to automate this
-process is work in progress yet.
diff --git a/_posts/2020-12-06-fossil-to-git.md b/_posts/2020-12-06-fossil-to-git.md
new file mode 100644
index 0000000..c32e2da
--- /dev/null
+++ b/_posts/2020-12-06-fossil-to-git.md
@@ -0,0 +1,51 @@
+---
+title: fossil export to git
+author: la-ninpre
+tags: [fossil, git, tutorial]
+---
+
+i was trying to export my website repo to fossil using suggested method from
+[fossil website][1]:
+
+```
+git fast-export --all | fossil import --git repo.fossil
+```
+[1]:https://www.fossil-scm.org/home/doc/trunk/www/inout.wiki
+
+but i didn't like that fossil recognizes my email as username and so commit
+messages user was `user@example.com` instead of `user`.
+
+i then read a bit about options of `git fast-export` and found `--anonymize`
+flag. but it's results weren't satisfying either.
+
+when i looked on a raw output of `git fast-export`, i noticed that commit author
+is specified there as
+
+```
+author user <user@example.com>
+```
+
+and then it's flashed in my head: why not pipe git export through sed and just
+replace the contents of `<>` with username instead of email.
+
+so the final command looks like this:
+
+```
+git fast-export --all | \
+ sed -E 's/^((author)|(committer))[[:blank:]]+([[:graph:]]+)[[:blank:]]+(<[[:alnum:]]+@[[:alnum:]]+\.[[:alnum:]]+>)/\1 \4 <\4>/' | \
+ fossil import --git repo.fossil
+```
+
+and it converts
+
+```
+author user <user@example.com>
+```
+
+to
+
+```
+author user <user>
+```
+
+which is odd, but fine for fossil import.