changelog shortlog graph tags branches files raw help

Mercurial > org > meta / changeset: style updates

changeset 10: 65bf0057ca35
parent 9: 995df3d48af0
child 11: 6e53b8dc7795
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 13 Sep 2024 21:21:53 -0400
files: babel.org
description: style updates
     1.1--- a/babel.org	Sat Sep 07 22:38:02 2024 -0400
     1.2+++ b/babel.org	Fri Sep 13 21:21:53 2024 -0400
     1.3@@ -262,9 +262,39 @@
     1.4 #+RESULTS: trim
     1.5 : a b c
     1.6 
     1.7-* skel-show
     1.8+* files                                                                  :fs:
     1.9+:PROPERTIES:
    1.10+:ID:       e2ff9dcf-8340-48b8-a1a6-e0036cbcc495
    1.11+:END:
    1.12+#+name: format-files
    1.13+#+begin_src python :var tab="" :results table :colnames yes :hlines yes :exports results :eval no-export
    1.14+return tab
    1.15+#+end_src
    1.16+
    1.17+#+name: files
    1.18+#+begin_src sh :results replace table :dir "." :colnames yes :hlines yes :post format-files(*this*)
    1.19+  ls -lh $PWD --time-style=long-iso \
    1.20+    |awk '{if (NR!=1) print $8, $5, $6"-"$7}' \
    1.21+    |awk 'BEGIN{print "file size updated"}{print $0}'
    1.22+#+end_src
    1.23+
    1.24+#+RESULTS: files
    1.25+| file          | size |          updated |
    1.26+|---------------+------+------------------|
    1.27+| babel.org     | 24K  | 2024-09-07-19:45 |
    1.28+| business.org  | 803  | 2024-08-19-21:19 |
    1.29+| glossary.org  | 1.2K | 2024-09-06-15:35 |
    1.30+| mindset.org   | 119  | 2024-08-15-21:20 |
    1.31+| pitch.org     | 1.6K | 2024-08-11-17:16 |
    1.32+| readme.org    | 1.1K | 2024-08-27-21:13 |
    1.33+| style.org     | 3.2K | 2024-08-21-16:18 |
    1.34+| tech.org      | 3.6K | 2024-08-21-18:16 |
    1.35+| ulang.org     | 12K  | 2024-09-06-16:12 |
    1.36+| workflows.org | 7.5K | 2024-09-03-16:59 |
    1.37+
    1.38+* skel-show                                                            :skel:
    1.39 #+name: skel-show
    1.40-#+begin_src shell :dir "~/comp/core" :var key=":id" :results replace
    1.41+#+begin_src shell :var key=":id" :results replace
    1.42   echo $(skel show $key)
    1.43 #+end_src
    1.44 
    1.45@@ -364,11 +394,12 @@
    1.46   (let* ((project (project-current nil project))
    1.47          (name (project-name project))
    1.48          (root (project-root project))
    1.49+         (default-directory root)
    1.50          (vc-type (downcase (symbol-name (cadr project))))
    1.51          (age (org-sbe hg-log-age ''(dir root)))
    1.52          (rev (org-sbe hg-rev ''(dir root)))
    1.53          (num (org-sbe hg-id-num ''(dir root)))
    1.54-         (tags (org-sbe skel-show (key "':tags'") ''(dir root)))
    1.55+         (tags (org-sbe skel-show (key "':tags'")))
    1.56          (id (org-sbe skel-show (key "':id'") ''(dir root)))
    1.57          (version (org-sbe skel-show (key "':version'") ''(dir root)))
    1.58          (description (org-sbe skel-show (key "':description'") ''(dir root)))
    1.59@@ -396,46 +427,65 @@
    1.60 #+RESULTS: project-details
    1.61 |-------------+---------------------------------------------------|
    1.62 | name        | meta                                              |
    1.63-| version     | 0.1.0                                             |
    1.64-| description | The Compiler Company Core                         |
    1.65-| skel-id     | 15bc-b763-ec92-1cf5                               |
    1.66+| version     |                                                   |
    1.67+| description |                                                   |
    1.68+| skel-id     |                                                   |
    1.69 | root        | ~/comp/org/meta/                                  |
    1.70-| vc          | :hg [[https://vc.compiler.company/meta][vc.compiler.company/meta]] :rev [[https://vc.compiler.company/meta/rev/06698c6708de][06698c6708de:8+]] |
    1.71-| tags        | (core lisp rust emacs c)                          |
    1.72-| updated     | 3 days ago                                        |
    1.73+| vc          | :hg [[https://vc.compiler.company/meta][vc.compiler.company/meta]] :rev [[https://vc.compiler.company/meta/rev/995df3d48af0][995df3d48af0:9+]] |
    1.74+| tags        |                                                   |
    1.75+| updated     | Sat Sep 07 22:38:02 2024 -0400                    |
    1.76 | langs       | (org)                                             |
    1.77-| lines       | 1768 :λ 1632 :# 3 :_ 133                          |
    1.78+| lines       | 1828 :λ 1685 :# 4 :_ 139                          |
    1.79 |-------------+---------------------------------------------------|
    1.80 
    1.81-* files                                                                  :fs:
    1.82-:PROPERTIES:
    1.83-:ID:       e2ff9dcf-8340-48b8-a1a6-e0036cbcc495
    1.84-:END:
    1.85-#+name: format-files
    1.86-#+begin_src python :var tab="" :results table :colnames yes :hlines yes :exports results :eval no-export
    1.87-return tab
    1.88+* project-files                                                  :project:fs:
    1.89+List all files found in current project. Ignores files which don't
    1.90+exist locally.
    1.91+#+name: project-files
    1.92+#+begin_src emacs-lisp :var project="." :results replace
    1.93+  (let* ((project (project-current nil project))
    1.94+         (name (project-name project))
    1.95+         (root (expand-file-name (project-root project)))
    1.96+         (project-files-relative-names t)
    1.97+         (project-vc-include-untracked nil))
    1.98+    `((file size modified)
    1.99+      hline
   1.100+      ,@(mapcar (lambda (x)
   1.101+                  ;; don't rely on project/vc - only include files which exist locally
   1.102+                  (when-let ((attr (file-attributes x)))
   1.103+                    (list (format "[[https://vc.compiler.company/%s/file/tip/%s][%s]]" name x x)
   1.104+                          (when-let ((size (file-attribute-size attr)))
   1.105+                            (file-size-human-readable size))
   1.106+                          (format-time-string "%Y-%m-%d %H:%M:%S" (file-attribute-modification-time attr)))))
   1.107+                (project-files project))))
   1.108 #+end_src
   1.109 
   1.110-#+name: files
   1.111-#+begin_src sh :results replace table :dir "." :colnames yes :hlines yes :post format-files-tbl(*this*)
   1.112-  ls -lh $PWD --time-style=long-iso \
   1.113-    |awk '{if (NR!=1) print $8, $5, $6"-"$7}' \
   1.114-    |awk 'BEGIN{print "file size updated"}{print $0}'
   1.115+#+RESULTS: project-files
   1.116+| file          | size | modified            |
   1.117+|---------------+------+---------------------|
   1.118+| [[https://vc.compiler.company/meta/file/tip/babel.org][babel.org]]     | 30k  | 2024-09-08 20:35:41 |
   1.119+| [[https://vc.compiler.company/meta/file/tip/.hgignore][.hgignore]]     | 7    | 2024-08-11 10:08:57 |
   1.120+| [[https://vc.compiler.company/meta/file/tip/business.org][business.org]]  | 803  | 2024-08-19 21:19:33 |
   1.121+| [[https://vc.compiler.company/meta/file/tip/glossary.org][glossary.org]]  | 1.1k | 2024-09-06 15:35:52 |
   1.122+| [[https://vc.compiler.company/meta/file/tip/mindset.org][mindset.org]]   | 119  | 2024-08-15 21:20:13 |
   1.123+| [[https://vc.compiler.company/meta/file/tip/pitch.org][pitch.org]]     | 1.6k | 2024-08-11 17:16:04 |
   1.124+| [[https://vc.compiler.company/meta/file/tip/readme.org][readme.org]]    | 1k   | 2024-08-27 21:13:01 |
   1.125+| [[https://vc.compiler.company/meta/file/tip/style.org][style.org]]     | 3.2k | 2024-08-21 16:18:55 |
   1.126+| [[https://vc.compiler.company/meta/file/tip/tech.org][tech.org]]      | 3.5k | 2024-08-21 18:16:26 |
   1.127+| [[https://vc.compiler.company/meta/file/tip/ulang.org][ulang.org]]     | 11k  | 2024-09-06 16:12:00 |
   1.128+| [[https://vc.compiler.company/meta/file/tip/workflows.org][workflows.org]] | 7.4k | 2024-09-03 16:59:05 |
   1.129+
   1.130+* project-tasks                                                 :project:org:
   1.131+List all project tasks.
   1.132+#+name: project-tasks
   1.133+#+begin_src emacs-lisp :results replace
   1.134+  `((todo item tags scheduled deadline effort)
   1.135+    hline)
   1.136 #+end_src
   1.137 
   1.138-#+RESULTS: files
   1.139-| file          | size |          updated |
   1.140-|---------------+------+------------------|
   1.141-| babel.org     | 24K  | 2024-09-07-19:45 |
   1.142-| business.org  | 803  | 2024-08-19-21:19 |
   1.143-| glossary.org  | 1.2K | 2024-09-06-15:35 |
   1.144-| mindset.org   | 119  | 2024-08-15-21:20 |
   1.145-| pitch.org     | 1.6K | 2024-08-11-17:16 |
   1.146-| readme.org    | 1.1K | 2024-08-27-21:13 |
   1.147-| style.org     | 3.2K | 2024-08-21-16:18 |
   1.148-| tech.org      | 3.6K | 2024-08-21-18:16 |
   1.149-| ulang.org     | 12K  | 2024-09-06-16:12 |
   1.150-| workflows.org | 7.5K | 2024-09-03-16:59 |
   1.151+#+RESULTS: project-tasks
   1.152+| todo | item | tags | scheduled | deadline | effort |
   1.153+|------+------+------+-----------+----------+--------|
   1.154 
   1.155 * env-table                                                              :os:
   1.156 :PROPERTIES:
   1.157@@ -534,17 +584,27 @@
   1.158 #+RESULTS: hg-id-num
   1.159 : 8+
   1.160 
   1.161-* hg-log-age                                                             :vc:
   1.162+* hg-log-since                                                           :vc:
   1.163 :PROPERTIES:
   1.164 :ID:       8492f4fb-51a6-4221-8705-a15eb5a50ed4
   1.165 :END:
   1.166-#+name: hg-log-age
   1.167+#+name: hg-log-since
   1.168 #+begin_src shell :dir "."
   1.169   hg log -l1 --template "{date|age}"
   1.170 #+end_src
   1.171 
   1.172+#+RESULTS: hg-log-since
   1.173+: 3 days ago
   1.174+
   1.175+* hg-log-age                                                             :vc:
   1.176+#+name: hg-log-age
   1.177+#+begin_src shell :dir "."
   1.178+  # hg log -l1 --template "{date(date, '%Y-%m-%d %H:%M:%S')}\n"
   1.179+  hg log -l1 --template "{date(date)}\n"
   1.180+#+end_src
   1.181+
   1.182 #+RESULTS: hg-log-age
   1.183-: 3 days ago
   1.184+: Sat Sep 07 22:38:02 2024 -0400
   1.185 
   1.186 * hg-churn                                                               :vc:
   1.187 #+name: hg-churn
   1.188@@ -568,7 +628,7 @@
   1.189 2024-09   2430 **
   1.190 #+end_example
   1.191 
   1.192-* hg-status
   1.193+* hg-status                                                              :vc:
   1.194 #+name: hg-status
   1.195 #+begin_src shell :dir "."
   1.196 hg status
   1.197@@ -579,7 +639,7 @@
   1.198 | M | glossary.org |
   1.199 | M | ulang.org    |
   1.200 
   1.201-* homer
   1.202+* homer                                                               :homer:
   1.203 #+begin_src shell
   1.204 homer
   1.205 #+end_src