aboutsummaryrefslogtreecommitdiff
path: root/README.org
blob: 771363f2f2a4c4dc4403c4fb97ad7e9cdbe5558d (plain)
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
* =ol= the oneliners.wiki command-line interface 

** Installation

First install [[https://www.clpm.dev/][clpm]].

Next, cd into the directory where this repository is kept, and do:

#+begin_src bash

rm clpmfile.lock  # just for good measure 
clpm bundle install # say yes to questions 
clpm bundle exec -- sbcl --load build-app.lisp

#+end_src

If everything worked, you'll have a binary called =ol= in the
directory. Move this into your path. I typically place things like
this in =~/.local/bin/=.
     
*** Troubleshooting

CLPM is still in development, and sometimes the command line tool
doesn't work as well as it should (IDK why).  If you encountered
errors in the above process, try installing from a SLIME session like
so:

#+begin_src lisp

(clmp-client:install 
  :context    #p"/path/to/whereever/you/put/oneliners.cli/clpmfile")

;; this will ask you to install some things from the debugger. Usually
;; picking restart number 0 will download and install the missing
;; dependencies.  

(clpm-client:activate-context 
   #p"/path/to/whereever/you/put/oneliners.cli/clpmfile"
   :activate-asdf-integration t)

;; test that you can load the system 

(asdf:load-system "oneliners.cli") 

#+end_src

If you are able to load the ="oneliners.cli"= system in the repl, you
should be able to build it.  

Now try again:

:  clpm bundle exec -- sbcl --load build-app.lisp 


** Configuration 

The first time you try to run the =ol= command to do anything other
than printing the help menu, you will be prompted to configure it. 

At present there are only two configuration options handled here: a
host and a shell. The host is where the =ol= command will make
requests. The shell is the shell environment where you want to run
oneliners.  Host defaults to https://api.oneliners.wiki and shell
defaults to =bash=.

If you just want to lookup and run oneliners from the default wiki,
you just need to accept the defaults offered by the configuration
prompts.

If you are self-hosting a oneliners wiki server, you'll need to enter
the address of that server when prompted for a host.  

E.g. if you are running a server locally on port 8080, you'd enter
=http://127.0.0.1:8080= 

*** For contributors 

If you want to contribute new oneliners, flag oneliners as fishy, or
if you want to edit oneliners, then you'll need a contributor
account. At present accounts are invite only. If you find yourself
with an invite, then checkout the =invites== help topic.

:  ol --help=invites 


** Author

+ Colin Okay (okay@toyful.space)

** Copyright

Copyright (c) 2022 Colin Okay (okay@toyful.space)

** License

Licensed under the AGPLv3 License.