-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
contacts.scroll
99 lines (70 loc) · 2.37 KB
/
contacts.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
authors Breck Yunits
https://twitter.com/breckyunits Breck Yunits
date 7/16/2024
tags All
title Contacts: A Microlang for Managing Contacts
header.scroll
keyboardNav
printTitle
printAuthors
mediumColumns 1
Imagine a single plain text file named `contacts.scroll` where you stored the contact info for your family, friends, and colleagues, and you could track changes with git, compile it to a beautiful PDF or HTML page with search and sort, and it would also compile to CSV and/or JSON for import into iPhone, Android, Gmail, Outlook, et cetera?
dateline
Also imagine that this tool is free, open source, and public domain.
***
Introducing *Contacts*, a microlanguage (currently 23 lines of code, including comments) that makes it as concise as possible to add, prune, display, print and export your contacts.
https://github.com/breck7/scroll/blob/main/microlangs/contacts.parsers 23 lines of code
***
There's almost nothing to learn (the code is self-explanatory).
In fact, it's almost guaranteed that using Contacts you will need to write less (we've taken every unnecessary character out).
***
# Example
code
👤 Jack Doe
phone +1 (555) 123-4567
email john.doe@example.com
birthday 2/23/84
notes Daughter - Samantha.
👤 Jill Smith
phone +1 (555) 123-4562
email jill@gmail.com
birthday 1/23/80
***
# How to use
1. Create a file named something like `contacts.scroll` with this content:
code
// You can import the file, or just copy/paste the 21 lines of code here.
[pathToScroll]/microlangs/contacts.parser
title My Contacts
buildConcepts contacts.csv contacts.json contacts.tsv
buildHtml
theme gazette
mediumColumns 1
printTitle
table
printTable
tableSearch
👤 Jack Doe
phone +1 (555) 123-4567
email john.doe@example.com
birthday 2/23/84
notes Daughter - Samantha.
👤 Jill Smith
phone +1 (555) 123-4562
email jill@gmail.com
birthday 1/23/80
2. Run `scroll build`
Done! You should now see a contacts.html file for display and printing as well as TSV, CSV, and JSON files.
../tests/contacts.html contacts.html
***
contacts.jpg
caption Contacts is interoperable with pen and paper.
***
What do you think? Anything that should be added/removed/improved?
***
# Notes
1. The idea for Contacts was sparked by this tweet from Tyler Tringas.
https://x.com/tylertringas/status/1813239718957461528 this tweet from Tyler Tringas
****
endColumns
footer.scroll