- Removed 'txt init'
Format
- New B32 ID
Index
- New option: txt index --print
- Move scheme to peers
- Replace peer.*.conf files with index packed locations
Instead of adding a URL to peers.*.conf, run `txt pull <url>`
Conversion
- Rewritten converters
- txt-convert looks for a .convert.conf containing `key: value` lines.
- Specifiable topic-roots from .convert.conf.
- Added `Topics:` key, with comma seperated topics.
If set only those topics will appear in the main index and used as topic roots.
Other topics will have sub-indices generated, but won't be listed in the main index.
- HTML converter header & footer options
- HTML-index renamed to HTM-index
Internal
- Change types: uuid:Uuid -> id:string
- File_store merges identical texts
- Use peer ID for store path, store peers' texts in .local/share/texts
- Simple URN resolution for converter
Continue to next feed if parsing one fails
- Phasing-out Archive, replaced by improved packs
- Eliminate Bos, Cohttp, lwt, uri, tls, Re, Ptime, dependencies
- Lock version for Cmdliner, fix dune-project
- Optional resursive store
- Improve header_pack
- Fix recursive mkdir
2022-04-01 17:35:56 +02:00
|
|
|
open Logarion
|
|
|
|
let file files =
|
2022-06-16 23:59:30 +02:00
|
|
|
let dirs, files = File_store.split_filetypes files in
|
- Removed 'txt init'
Format
- New B32 ID
Index
- New option: txt index --print
- Move scheme to peers
- Replace peer.*.conf files with index packed locations
Instead of adding a URL to peers.*.conf, run `txt pull <url>`
Conversion
- Rewritten converters
- txt-convert looks for a .convert.conf containing `key: value` lines.
- Specifiable topic-roots from .convert.conf.
- Added `Topics:` key, with comma seperated topics.
If set only those topics will appear in the main index and used as topic roots.
Other topics will have sub-indices generated, but won't be listed in the main index.
- HTML converter header & footer options
- HTML-index renamed to HTM-index
Internal
- Change types: uuid:Uuid -> id:string
- File_store merges identical texts
- Use peer ID for store path, store peers' texts in .local/share/texts
- Simple URN resolution for converter
Continue to next feed if parsing one fails
- Phasing-out Archive, replaced by improved packs
- Eliminate Bos, Cohttp, lwt, uri, tls, Re, Ptime, dependencies
- Lock version for Cmdliner, fix dune-project
- Optional resursive store
- Improve header_pack
- Fix recursive mkdir
2022-04-01 17:35:56 +02:00
|
|
|
let _link_as_named dir file = Unix.link file (Filename.concat dir file) in
|
|
|
|
let link_with_id dir file =
|
|
|
|
match File_store.to_text file with Error s -> prerr_endline s
|
|
|
|
| Ok t -> Unix.link file (Filename.concat dir (Text.short_id t^".txt")) in
|
|
|
|
let link = link_with_id in
|
|
|
|
List.iter (fun d -> List.iter (link d) files) dirs
|
|
|
|
|
|
|
|
let unfile files =
|
2022-06-16 23:59:30 +02:00
|
|
|
let dirs, files = File_store.split_filetypes files in
|
- Removed 'txt init'
Format
- New B32 ID
Index
- New option: txt index --print
- Move scheme to peers
- Replace peer.*.conf files with index packed locations
Instead of adding a URL to peers.*.conf, run `txt pull <url>`
Conversion
- Rewritten converters
- txt-convert looks for a .convert.conf containing `key: value` lines.
- Specifiable topic-roots from .convert.conf.
- Added `Topics:` key, with comma seperated topics.
If set only those topics will appear in the main index and used as topic roots.
Other topics will have sub-indices generated, but won't be listed in the main index.
- HTML converter header & footer options
- HTML-index renamed to HTM-index
Internal
- Change types: uuid:Uuid -> id:string
- File_store merges identical texts
- Use peer ID for store path, store peers' texts in .local/share/texts
- Simple URN resolution for converter
Continue to next feed if parsing one fails
- Phasing-out Archive, replaced by improved packs
- Eliminate Bos, Cohttp, lwt, uri, tls, Re, Ptime, dependencies
- Lock version for Cmdliner, fix dune-project
- Optional resursive store
- Improve header_pack
- Fix recursive mkdir
2022-04-01 17:35:56 +02:00
|
|
|
let unlink dir file = try Unix.unlink (Filename.concat dir file)
|
|
|
|
with Unix.(Unix_error(ENOENT,_,_))-> () in
|
|
|
|
List.iter (fun d -> List.iter (unlink d) files) dirs
|
|
|
|
|
|
|
|
open Cmdliner
|
|
|
|
let term =
|
|
|
|
let files = Arg.(value & pos_all string [] & info []
|
|
|
|
~docv:"text filenames and subdirectories") in
|
|
|
|
Term.(const file $ files), Term.info "file"
|
|
|
|
~doc:"file texts in subdirectories"
|
|
|
|
~man:[ `S "DESCRIPTION"; `P "Files all texts in parameter in every
|
|
|
|
directory in parameter, using hardlinks.
|
|
|
|
|
|
|
|
Use it to create sub-repositories for sharing or converting" ]
|
|
|
|
|
|
|
|
let unfile_term =
|
|
|
|
let files = Arg.(value & pos_all string [] & info []
|
|
|
|
~docv:"text filenames and subdirectories") in
|
|
|
|
Term.(const unfile $ files), Term.info "unfile"
|
|
|
|
~doc:"unfile texts from subdirectories"
|
|
|
|
~man:[ `S "DESCRIPTION"; `P "unfile texts in parameter from
|
|
|
|
directories in parameter, by removing hardlinks" ]
|