diff --git a/Makefile b/Makefile index 6014d53..9732013 100644 --- a/Makefile +++ b/Makefile @@ -9,28 +9,20 @@ LD=cc all: dune build - deps: opam install dune ocurl cmdliner=1.0.4 msgpck - cli: dune build cli/txt.exe - clean: dune clean - dist: dune build cp _build/default/cli/txt.exe txt.exe strip txt.exe tar czvf "logarion-${OS}-${MACHINE}-${DATE}-${COMMIT}" txt.exe readme.txt rm txt.exe -docs: - ${MAKE} -C txt install: dune install --prefix ${PREFIX} uninstall: dune uninstall --prefix ${PREFIX} - - .PHONY: cli diff --git a/cli/edit.ml b/cli/edit.ml index 45def8e..c504e36 100644 --- a/cli/edit.ml +++ b/cli/edit.ml @@ -12,5 +12,5 @@ let term = ~docv:"comma-separated topics" ~doc:"texts with topics") in Term.(const (Logarion.Archive.apply_sys_util "EDITOR" "nano") $ recurse $ time $ reverse $ number $ authed $ topics $ id), Term.info "edit" ~doc: "edit a text" ~man:[ `S "DESCRIPTION"; - `P "Launches $EDITOR with text path as parameter. If -R is used, the ID search space - includes texts found in subdirectories too" ] + `P "Launches EDITOR (nano if environment variable is unset) with text path as parameter. + If -R is used, the ID search space includes texts found in subdirectories too" ] diff --git a/txt/3sqd84.txt b/txt/3sqd84.txt deleted file mode 100644 index b6a1bf6..0000000 --- a/txt/3sqd84.txt +++ /dev/null @@ -1,10 +0,0 @@ -ID: 3sqd84 -Date: 2022-11-06T13:01:19Z -Title: Exploring & pulling texts from Logarion repositories -Authors: orbifx - -Logarion repositories are collections of text files, accompanied by a special index file. These collections can exist on any server and accessed by any transport protocol. Logarion's client currently supports a plethora of protocols, HTTP, FTP, Gopher to name a few examples. - -A remote repository can be registered and texts copied locally. To add a new remote run: `txt pull `, where is the address of the remote repository. The program will connect to the server, copy the `index.pck` file and use it to download each text file. It will not redownload previous texts, unless their Date or Date-Edited dates are newer than the previous ones. - -The text files are by default downloaded to `.local/share/texts/peers/`. A new directory is created for each peer's unique id and the index & texts are stored in it. Running `txt pull` with no URL, will refetch indices from all previously pulled repositories, and new text files will be downloaded automatically. diff --git a/txt/9egbae.txt b/txt/9egbae.txt deleted file mode 100644 index 74208f5..0000000 --- a/txt/9egbae.txt +++ /dev/null @@ -1,14 +0,0 @@ -ID: 9egbae -Date: 2023-06-17T23:27:44Z -Title: Building from source -Authors: yakumo_izuru - -Requirements: -* git -* ocaml (>=4.13) - -1. git clone https://git.chaotic.ninja/yakumo.izuru/logarion.git -2. cd logarion -3. git submodule update --init -4. make deps -5. make tgz diff --git a/txt/Makefile b/txt/Makefile deleted file mode 100644 index 82069d7..0000000 --- a/txt/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -all: clean build - -build: index generate - -clean: - find htm -type f -name "*.html" -print -delete - find htm -type f -name "*.htm" -print -delete - find . -type f -name "*.atom" -print -delete -copy-index: index - cp index.pck htm -generate: relink copy-index - txt convert --type=htm htm -index: - txt index . -link: - txt file *.txt htm -delink: - rm htm/*.txt -serve: - darkhttpd htm -upload: - rsync -acv --del htm/ webdev@chaotic.ninja:/var/www/logarion -relink: delink link diff --git a/txt/d41e68.txt b/txt/d41e68.txt deleted file mode 100644 index 27b5ba1..0000000 --- a/txt/d41e68.txt +++ /dev/null @@ -1,26 +0,0 @@ -ID: d41e68 -Date: 2023-10-18T18:45:33+00:00 -Title: Header format -Authors: orbifx - - -ID: Unique identifier -Date: ISO8601 date of creation -Topics: Comma seperated list of topic names & phrases -Title: A title for the text, ideally less than 70 characters -Authors: List of name with optional set of
-Date-edited: ISO8601, use only when text edited -References: list of text ID links - -A blank line must follow the last header field. - - -Example - -ID: 11bcd -Title: A Logarion exemplar header -Authors: John Doe -Date: 1970-11-06T12:29:50-00:00 -Topic: Logarion, examples - -Hello world! diff --git a/txt/footer.html b/txt/footer.html deleted file mode 100644 index be190a3..0000000 --- a/txt/footer.html +++ /dev/null @@ -1,4 +0,0 @@ -
-

-Source code -

diff --git a/txt/h1a9tg.txt b/txt/h1a9tg.txt deleted file mode 100644 index 25eaf12..0000000 --- a/txt/h1a9tg.txt +++ /dev/null @@ -1,16 +0,0 @@ -ID: h1a9tg -Date: 2022-11-20T13:28:57Z -Authors: orbifx -Title: Txt uniform resource names - -Logarion texts are transport agnostic. URIs should therefore avoid using URLs and use URNs instead. Some definitions of Uniform Resource: -- Locator (URL) -- Identifier (URI) -- Name (URN) - - -Links enclosed in angled brackets <> of the format: - - urn:txtid:abcdef - -where `abcdef` is the id of the text are understood by `txt` and handled accordingly. For example when converting to HTML or Gemini, the URNs are converted to relative URLs which browsers can understand. diff --git a/txt/header.html b/txt/header.html deleted file mode 100644 index 74e4f15..0000000 --- a/txt/header.html +++ /dev/null @@ -1,2 +0,0 @@ -

Logarion

-

discover, collect & exchange plain text files

diff --git a/txt/htm/3sqd84.txt b/txt/htm/3sqd84.txt deleted file mode 100644 index b6a1bf6..0000000 --- a/txt/htm/3sqd84.txt +++ /dev/null @@ -1,10 +0,0 @@ -ID: 3sqd84 -Date: 2022-11-06T13:01:19Z -Title: Exploring & pulling texts from Logarion repositories -Authors: orbifx - -Logarion repositories are collections of text files, accompanied by a special index file. These collections can exist on any server and accessed by any transport protocol. Logarion's client currently supports a plethora of protocols, HTTP, FTP, Gopher to name a few examples. - -A remote repository can be registered and texts copied locally. To add a new remote run: `txt pull `, where is the address of the remote repository. The program will connect to the server, copy the `index.pck` file and use it to download each text file. It will not redownload previous texts, unless their Date or Date-Edited dates are newer than the previous ones. - -The text files are by default downloaded to `.local/share/texts/peers/`. A new directory is created for each peer's unique id and the index & texts are stored in it. Running `txt pull` with no URL, will refetch indices from all previously pulled repositories, and new text files will be downloaded automatically. diff --git a/txt/htm/9egbae.txt b/txt/htm/9egbae.txt deleted file mode 100644 index 74208f5..0000000 --- a/txt/htm/9egbae.txt +++ /dev/null @@ -1,14 +0,0 @@ -ID: 9egbae -Date: 2023-06-17T23:27:44Z -Title: Building from source -Authors: yakumo_izuru - -Requirements: -* git -* ocaml (>=4.13) - -1. git clone https://git.chaotic.ninja/yakumo.izuru/logarion.git -2. cd logarion -3. git submodule update --init -4. make deps -5. make tgz diff --git a/txt/htm/d41e68.txt b/txt/htm/d41e68.txt deleted file mode 100644 index 27b5ba1..0000000 --- a/txt/htm/d41e68.txt +++ /dev/null @@ -1,26 +0,0 @@ -ID: d41e68 -Date: 2023-10-18T18:45:33+00:00 -Title: Header format -Authors: orbifx - - -ID: Unique identifier -Date: ISO8601 date of creation -Topics: Comma seperated list of topic names & phrases -Title: A title for the text, ideally less than 70 characters -Authors: List of name with optional set of
-Date-edited: ISO8601, use only when text edited -References: list of text ID links - -A blank line must follow the last header field. - - -Example - -ID: 11bcd -Title: A Logarion exemplar header -Authors: John Doe -Date: 1970-11-06T12:29:50-00:00 -Topic: Logarion, examples - -Hello world! diff --git a/txt/htm/h1a9tg.txt b/txt/htm/h1a9tg.txt deleted file mode 100644 index 25eaf12..0000000 --- a/txt/htm/h1a9tg.txt +++ /dev/null @@ -1,16 +0,0 @@ -ID: h1a9tg -Date: 2022-11-20T13:28:57Z -Authors: orbifx -Title: Txt uniform resource names - -Logarion texts are transport agnostic. URIs should therefore avoid using URLs and use URNs instead. Some definitions of Uniform Resource: -- Locator (URL) -- Identifier (URI) -- Name (URN) - - -Links enclosed in angled brackets <> of the format: - - urn:txtid:abcdef - -where `abcdef` is the id of the text are understood by `txt` and handled accordingly. For example when converting to HTML or Gemini, the URNs are converted to relative URLs which browsers can understand. diff --git a/txt/htm/hvhhwf.txt b/txt/htm/hvhhwf.txt deleted file mode 100644 index 8323058..0000000 --- a/txt/htm/hvhhwf.txt +++ /dev/null @@ -1,76 +0,0 @@ -ID: hvhhwf -Date: 2022-11-06T13:19:57Z -Title: Creating texts & publishing on the net -Authors: orbifx - -# New - -To create new text files, use "txt new". For example: - txt new "Hello world" -It's important to enclose the title with quotation marks if it contains spaces. The command will return the filename of the new text. The filename starts with a part of the ID and the title of the text. Use the file name to open it with your text editor. - -Alternatively add the -i flag to have the text editor launched to edit the newly created file: - txt new -i "Some title" - -Text files will be stored in either: -1. The directory pointed at by txtdir if defined -2. $HOME/.local/share/texts, if directory exists -3. The current working directory, if all else fails - -The simplest approach is to put all texts in the local-share directory and override that on occasion with -$txtdir. For example: - txtdir=. txt new "Hello world" - - -# Publish - -Texts created with "new" are treated as personal until published. To publish a text, use `txt publish [id]` where [id] is the text of the text to publish. Publication requires a `txt.conf` file which must exist in either: -1. The current working directory -2. $HOME/.config/txt/txt.conf - -With the above in place, `txt publish [id]` will add the text file with [id] in the publication-directory and reproduce the `index.pck` in that directory. If Pubdir is not defined in `txt.conf` then the environmental variable `txtpubdir` is used. If that is also undefined, the current working directory is used as a publication directory. - -Logarion is protocol agnostic, so publish looks for the existence of directories to copy the files, ready for publication. At the time of writing the three directories are `public_html`, `public_gemini` and `public_gopher`. For each of these directories, `txt publish [id]` will copy the text file, revise the `index.pck` and also convert produce converted files, such .htm for public_html. - -## txt.conf keys - -Id: - A random, unique, alphanumeric string for distinguishing the repository (atleast 6 characters of Crockford's Base32 recommended) - -Title: - a human-friendly title - -Authors: - comma seperated list of names and, optionally, addresses - -Topics: - topics the repository aims to cover - -Locations: - list of URIs the repositories can be accessed - -Peers: - list of peer URIs - -Pubdir: - (optional) the directory that contains publication subdirectories - - -## HTML - -There are some special settings for HTML publication: - -HTM-style: - path to a CSS style. It will be inserted in every .htm file. To link to a single CSS consider using `@import` - -HTM-header: - path to a file, inserted in every .htm file, right after the body tag - -HTM-footer: - path to a file, inserted in every .htm file, right before the body tag - -HTM-index: - if defined, determines the filename for the index files. Left undefined, defaults to `index.html` - -HTM-feed: - if defined, this will overrite the feed URI used in HTML files. If left undefined the default `feed.atom` is used diff --git a/txt/htm/index.pck b/txt/htm/index.pck deleted file mode 100644 index 0a5a4e2..0000000 Binary files a/txt/htm/index.pck and /dev/null differ diff --git a/txt/htm/main.css b/txt/htm/main.css deleted file mode 100644 index b1ccb62..0000000 --- a/txt/htm/main.css +++ /dev/null @@ -1,8 +0,0 @@ -body{color:#111;background:#faeed6;margin:auto;padding:1ch;max-width:80ch} -@media(min-resolution:130dpi){body{font-size:1.5em}} -article>header{margin:auto;padding:1ch} -dt{float:left;text-align:right;padding-right:1ch;min-width:8ch;opacity:0.4;clear:left} -:target::before{content:"☞"} -body>h1{font-family:cursive} -h1,h2{color:#ff6600} -h3,h4{color:#333} diff --git a/txt/htm/pw3tvt.txt b/txt/htm/pw3tvt.txt deleted file mode 100644 index 97ff97f..0000000 --- a/txt/htm/pw3tvt.txt +++ /dev/null @@ -1,19 +0,0 @@ -ID: pw3tvt -Date: 2023-10-23T02:44:10Z -Title: txt.conf -Authors: Izuru Yakumo , orbifx -Topics: Logarion - -These are the current fields you can use for setting up your archive. - -* Authors (required) -* Gemini-index (optional) -* HTM-footer (optional) -* HTM-header (optional) -* HTM-index (optional) -* HTM-style (required) -* Id (required) -* Locations (required) -* Peers (optional) -* Title (required) -* Topics (required) diff --git a/txt/hvhhwf.txt b/txt/hvhhwf.txt deleted file mode 100644 index 8323058..0000000 --- a/txt/hvhhwf.txt +++ /dev/null @@ -1,76 +0,0 @@ -ID: hvhhwf -Date: 2022-11-06T13:19:57Z -Title: Creating texts & publishing on the net -Authors: orbifx - -# New - -To create new text files, use "txt new". For example: - txt new "Hello world" -It's important to enclose the title with quotation marks if it contains spaces. The command will return the filename of the new text. The filename starts with a part of the ID and the title of the text. Use the file name to open it with your text editor. - -Alternatively add the -i flag to have the text editor launched to edit the newly created file: - txt new -i "Some title" - -Text files will be stored in either: -1. The directory pointed at by txtdir if defined -2. $HOME/.local/share/texts, if directory exists -3. The current working directory, if all else fails - -The simplest approach is to put all texts in the local-share directory and override that on occasion with -$txtdir. For example: - txtdir=. txt new "Hello world" - - -# Publish - -Texts created with "new" are treated as personal until published. To publish a text, use `txt publish [id]` where [id] is the text of the text to publish. Publication requires a `txt.conf` file which must exist in either: -1. The current working directory -2. $HOME/.config/txt/txt.conf - -With the above in place, `txt publish [id]` will add the text file with [id] in the publication-directory and reproduce the `index.pck` in that directory. If Pubdir is not defined in `txt.conf` then the environmental variable `txtpubdir` is used. If that is also undefined, the current working directory is used as a publication directory. - -Logarion is protocol agnostic, so publish looks for the existence of directories to copy the files, ready for publication. At the time of writing the three directories are `public_html`, `public_gemini` and `public_gopher`. For each of these directories, `txt publish [id]` will copy the text file, revise the `index.pck` and also convert produce converted files, such .htm for public_html. - -## txt.conf keys - -Id: - A random, unique, alphanumeric string for distinguishing the repository (atleast 6 characters of Crockford's Base32 recommended) - -Title: - a human-friendly title - -Authors: - comma seperated list of names and, optionally, addresses - -Topics: - topics the repository aims to cover - -Locations: - list of URIs the repositories can be accessed - -Peers: - list of peer URIs - -Pubdir: - (optional) the directory that contains publication subdirectories - - -## HTML - -There are some special settings for HTML publication: - -HTM-style: - path to a CSS style. It will be inserted in every .htm file. To link to a single CSS consider using `@import` - -HTM-header: - path to a file, inserted in every .htm file, right after the body tag - -HTM-footer: - path to a file, inserted in every .htm file, right before the body tag - -HTM-index: - if defined, determines the filename for the index files. Left undefined, defaults to `index.html` - -HTM-feed: - if defined, this will overrite the feed URI used in HTML files. If left undefined the default `feed.atom` is used diff --git a/txt/index.pck b/txt/index.pck deleted file mode 100644 index 0a5a4e2..0000000 Binary files a/txt/index.pck and /dev/null differ diff --git a/txt/main.css b/txt/main.css deleted file mode 100644 index b1ccb62..0000000 --- a/txt/main.css +++ /dev/null @@ -1,8 +0,0 @@ -body{color:#111;background:#faeed6;margin:auto;padding:1ch;max-width:80ch} -@media(min-resolution:130dpi){body{font-size:1.5em}} -article>header{margin:auto;padding:1ch} -dt{float:left;text-align:right;padding-right:1ch;min-width:8ch;opacity:0.4;clear:left} -:target::before{content:"☞"} -body>h1{font-family:cursive} -h1,h2{color:#ff6600} -h3,h4{color:#333} diff --git a/txt/pw3tvt.txt.conf.txt b/txt/pw3tvt.txt.conf.txt deleted file mode 100644 index 97ff97f..0000000 --- a/txt/pw3tvt.txt.conf.txt +++ /dev/null @@ -1,19 +0,0 @@ -ID: pw3tvt -Date: 2023-10-23T02:44:10Z -Title: txt.conf -Authors: Izuru Yakumo , orbifx -Topics: Logarion - -These are the current fields you can use for setting up your archive. - -* Authors (required) -* Gemini-index (optional) -* HTM-footer (optional) -* HTM-header (optional) -* HTM-index (optional) -* HTM-style (required) -* Id (required) -* Locations (required) -* Peers (optional) -* Title (required) -* Topics (required) diff --git a/txt/txt.conf b/txt/txt.conf deleted file mode 100644 index dbf2ede..0000000 --- a/txt/txt.conf +++ /dev/null @@ -1,6 +0,0 @@ -Id: 17f4e3 -Title: Logarion -Authors: orbifx , Izuru Yakumo -HTM-style: main.css -HTM-header: header.html -HTM-footer: footer.html