summaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
Diffstat (limited to 'rust')
-rw-r--r--rust/fatcat-cli/TODO17
-rw-r--r--rust/fatcat-cli/plan.txt82
2 files changed, 56 insertions, 43 deletions
diff --git a/rust/fatcat-cli/TODO b/rust/fatcat-cli/TODO
deleted file mode 100644
index 5e9149b..0000000
--- a/rust/fatcat-cli/TODO
+++ /dev/null
@@ -1,17 +0,0 @@
-
-x type/struct to wrap api_client and runtime
-x trait
-x parse "specifier"
-- API auth (token, context)
-- "status" command
- => auth_check
- => build a struct with serde_json+prettyprint
-- switch from failure to anyhow = "1.0"
-- editgroup creation
-
-- updating using CLI specifiers
-- edit command
-- multiple files?
-
-Random old command:
- OPENSSL_LIB_DIR="/usr/lib/x86_64-linux-gnu" OPENSSL_INCLUDE_DIR="/usr/include/openssl" cargo build
diff --git a/rust/fatcat-cli/plan.txt b/rust/fatcat-cli/plan.txt
index 0b2c3a7..651acac 100644
--- a/rust/fatcat-cli/plan.txt
+++ b/rust/fatcat-cli/plan.txt
@@ -16,47 +16,66 @@ x release delete, to an editgroup
x release update from full json/TOML to API
x release edit (using $EDITOR, temp file)
-- -n/--num for limits
-- -o/--output and -i/--input for format/schema selection (including 'es-json')
+x release update fields and submit to editgroup
+ => more fields, like 2-5 for all entity types
+x expand/hide flags for get, search
+
+- search/update/etc containers (and files?)
+
+- polish and test so actually usable for release edits from search
+ x consider moving to new repo, with copy of fatcat-openapi-client
+ x manpage
+ x .deb generation
+ => write actual manpage (and, HTML output? ronn? pandoc?)
+ => write actual README
+
+- implement @-syntax for create/update
+ => TODO: what was the proposal here?
+ => some variant of @-syntax for stream of multiple updates/creations?
+
+- get revisions for all entity types
+
+
+#### Milestones
+
+- ability (at all) to revise edits for a single entity in editgroup
+ => clobber existing edits on update
+ => edits: get entity in current edit state
+- streaming updates from search, with either pipe (jq) or field mutations
+ => syntax/commands
+ => batching (syntax? subcommand?)
+ => auto-accept mode
+- download many PDFs from search query
+ => parallelism could be GNU/parallel
+ => don't clobber existing
+
+#### Editgroup Workflow
+
+- editgroup creation outputs just editgroup_id on stdout (unless output type selected), plus "success" to stderr
- parse editgroup specifier
=> "auto": fetch from recent; default?
=> "new": create
=> editgroup_blah or blah
-- release update fields and submit to editgroup
- => more fields, at least 10
-- implement "delete from editgroup" for creation, updates, edit
+- implement "delete from editgroup" for updates, edit
+ => no updates with current setup
=> fetch editgroup helper
=> helper function that takes editgroup (model) and expanded specifier; deletes existing edit from editgroup if necessary
=> skip this codepath for "new" and batch creation
-- implement @-syntax for create/update
-- later: some variant of @-syntax for stream of multiple updates/creations?
-- editgroup creation outputs just editgroup on stdout (unless output type selected), plus "success" to stderr
+
+#### File Downloads
- download single file:
=> try archive.org files, then wayback, then original URLs
=> download to current directory as {sha1hex}.pdf.partial, then atomic move on success
-- syntect coloring of output for stdout
-- expand/hide flags for get, search
-- search/update/etc containers (and files?)
+- optional directory structure: {dir}/{hex}/{hex}/{sha1hex}.pdf
+- parallelism of downloads
-- polish and test so actually usable for release edits from search
- => manpage
- => bash completion
- => .deb generation
- => consider moving to new repo, with copy of fatcat-openapi-client
- => cross build for OS X? homebrew?
+#### Backburner
+- -o/--output and -i/--input for format/schema selection (including 'es-json')
- search release, filters, scroll API, fetching API for each
=> structopt parses: query, filter, anti-filter
- search release, filters, scroll API, fetching API for each, verifying revision and filters for each
-- optional directory structure: {dir}/{hex}/{hex}/{sha1hex}.pdf
-- parallelism of downloads
-
-- history for all entity types
- => pretty table, json optional
-- get revisions for all entity types
-
-- fcid/UUID helper
## Design Decisions
@@ -82,7 +101,7 @@ x release edit (using $EDITOR, temp file)
creates new editgroup?
edit <specifier>
delete <specifier>
- delete-batch <type>
+ delete-multi <type>
reads multiple entities from stdin
--skip-check controls whether to do a GET and validate mutations
@@ -114,3 +133,14 @@ Should allow destructive updates in editgroups with "clobber" flag. In
implementation, could either delete first or on conflict do upsert.
More consistent use of generic success/error?
+
+## Feature Ideas
+
+- changelog (table): under editgroup command?
+- syntect coloring of output for stdout
+- cross build for OS X? homebrew?
+- shell (bash) completions from clap
+- fcid/UUID helper
+- history for all entity types
+ => pretty table, json optional
+- "edit editgroup" as a text file, `git rebase -i` style