Loading NOTES.md +2 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ repl.commands? * Messages: ~~ADD~~, CURRENT, ~~DIRECTORY~~, BACK, CHANGE, FIRST, REMOVE, NEXT, ~~READ~~ * Messages edit: CHANGE, REPLY, FORWARD * Moving messages: COPY, MOVE * Compound commands: SET and SHOW * Compound commands: SET and SHOW - make HELP work for them. * Mail: MAIL, FORWARD, * Implement batch jobs * ~~Editor - need an embedded editor~~ Implemented using tview; good enough Loading Loading @@ -60,7 +60,7 @@ repl.commands? * Commands for a local mail system? * Commands to connect to Mattermost or mastodon? * Commands to manage users. * `SHOW VERSION` - [versioninfo](https://github.com/earthboundkid/versioninfo) will work for go install. * ~~SHOW VERSION~~ * Check db version; notify user if it changes; refuse to write to db if it has. ## Module links Loading repl/command.go +86 −38 Original line number Diff line number Diff line Loading @@ -1479,7 +1479,7 @@ In order to apply this to a specific folder, first select the folder (using the SELECT command), and then enter the SET READNEW command. Format: SET [NO]READNEW SET READNEW NOTE: If you have several folders with READNEW enabled, each folder's messages will be displayed separately. However, if you EXIT the READNEW Loading @@ -1503,12 +1503,6 @@ SYSTEM for a description of a SYSTEM folder).`, folder. This is a privileged qualifier. It will only affect brand new users (or those that have never logged in). Use /ALL to modify all users.`, }, "/FOLDER": { Description: `/FOLDER=foldername Specifies the folder for which the option is to modified. If not specified, the selected folder is modified. Valid only with NOREADNEW.`, }, "/PERMANENT": { Description: `/[NO]PERMANENT Loading @@ -1518,6 +1512,42 @@ SYSTEM for a description of a SYSTEM folder).`, }, }, }, "NOREADNEW": { Description: `Turns off READNEW. Format: SET NOREADNEW NOTE: If you have several folders with READNEW enabled, each folder's messages will be displayed separately. However, if you EXIT the READNEW mode before all the folders have been displayed, you will not be alerted of the new messages in the undisplayed folders the next time you login. However, if you enter BULLETIN, you will be told that new messages are present in those other folders. Also, it is not possible to EXIT the READNEW mode if there are SYSTEM folders which have new messages. Typing the EXIT command will cause you to skip to those folders. (See HELP SET SYSTEM for a description of a SYSTEM folder).`, Flags: dclish.Flags{ "/ALL": { Description: ` Specifies that the SET [NO]READNEW option is the default for all users for the specified folder. This is a privileged qualifier. The difference between this and /DEFAULT is that the latter will only apply to new users (i.e. any users which have never executed BULLETIN).`, }, "/DEFAULT": { Description: ` Specifies that the [NO]READNEW option is the default for the specified folder. This is a privileged qualifier. It will only affect brand new users (or those that have never logged in). Use /ALL to modify all users.`, }, "/FOLDER": { Description: `/FOLDER=foldername Specifies the folder for which the option is to modified. If not specified, the selected folder is modified.`, }, }, }, "SHOWNEW": { Description: `Controls whether a directory listing of new messages for the current folder will be displayed when logging in. This is similar to READNEW, Loading @@ -1530,17 +1560,43 @@ In order to apply this to a specific folder, first select the folder (using the SELECT command), and then enter the SET SHOWNEW command. Format: SET [NO]SHOWNEW`, SET SHOWNEW`, Flags: dclish.Flags{ "/ALL": { Description: ` Specifies that the SET SHOWNEW option is the default for all users for the specified folder. This is a privileged qualifier. The difference between this and /DEFAULT is that the latter will only apply to new users (i.e. any users which have never executed BULLETIN).`, }, "/DEFAULT": { Description: ` Specifies that the SHOWNEW option is the default for the specified folder. This is a privileged qualifier. It will only affect brand new users (or those that have never logged in). Use /ALL to modify all users.`}, "/PERMANENT": { Description: `/[NO]PERMANENT Specifies that SHOWNEW is a permanent flag and cannot be changed by the individual, except if changing to READNEW. This is a privileged qualifier.`, }, }, }, "NOSHOWNEW": { Description: `Turns off SHOWNEW Format: SET NOSHOWNEW`, Flags: dclish.Flags{ "/ALL": { Description: ` Specifies that the SET [NO]SHOWNEW option is the default for all users Description: ` Specifies that the SET NOSHOWNEW option is the default for all users for the specified folder. This is a privileged qualifier. The difference between this and /DEFAULT is that the latter will only apply to new users (i.e. any users which have never executed BULLETIN).`, }, "/DEFAULT": { Description: ` Specifies that the [NO]SHOWNEW option is the default for the specified Description: ` Specifies that the NOSHOWNEW option is the default for the specified folder. This is a privileged qualifier. It will only affect brand new users (or those that have never logged in). Use /ALL to modify all users.`, Loading @@ -1549,14 +1605,7 @@ In order to apply this to a specific folder, first select the folder Description: `/FOLDER=foldername Specifies the folder for which the option is to modified. If not specified, the selected folder is modified. Valid only with NOSHOWNEW.`, }, "/PERMANENT": { Description: `/[NO]PERMANENT Specifies that SHOWNEW is a permanent flag and cannot be changed by the individual, except if changing to READNEW. This is a privileged qualifier.`, specified, the selected folder is modified.`, }, }, }, Loading Loading @@ -1593,6 +1642,7 @@ the SELECT command, information about that folder is shown. Format: SHOW FOLDER [folder-name]`, MaxArgs: 1, Flags: dclish.Flags{ "/FULL": { Description: ` Control whether all information of the folder is displayed. This Loading @@ -1604,9 +1654,7 @@ the SELECT command, information about that folder is shown. }, "NEW": { Description: `Shows folders which have new unread messages for which BRIEF or READNEW have been set. (Note: If you enter BULLETIN but do not read new unread messages, you will not be notified about them the next time you enter BULLETIN. This is a design "feature" and cannot easily be changed.)`, have been set.`, }, "PRIVILEGES": { Description: `Shows the privileges necessary to use privileged commands. Also shows Loading repl/set.go +102 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,48 @@ import ( "git.lyda.ie/kevin/bulletin/dclish" ) // ActionSetAccess handles the `SET ACCESS` command. func ActionSetAccess(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetAccess.") return nil } // ActionSetAlways handles the `SET ALWAYS` command. func ActionSetAlways(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetAlways.") return nil } // ActionSetNoalways handles the `SET NOALWAYS` command. func ActionSetNoalways(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNoalways.") return nil } // ActionSetBrief handles the `SET BRIEF` command. func ActionSetBrief(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetBrief.") return nil } // ActionSetNobrief handles the `SET NOBRIEF` command. func ActionSetNobrief(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNobrief.") return nil } // ActionSetDefaultExpire handles the `SET DEFAULT_EXPIRE` command. func ActionSetDefaultExpire(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetDefaultExpire.") return nil } // ActionSetExpireLimit handles the `SET EXPIRE_LIMIT` command. func ActionSetExpireLimit(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetExpireLimit.") return nil } // ActionSetFolder handles the `SET FOLDER` command. This selects a folder. func ActionSetFolder(cmd *dclish.Command) error { if len(cmd.Args) != 1 { Loading @@ -33,3 +75,63 @@ func ActionSetFolder(cmd *dclish.Command) error { // WRITE(6,'('' See '',A,'' if you wish to access folder.'')') return errors.New("Unable to select the folder") } // ActionSetNotify handles the `SET NOTIFY` command. func ActionSetNotify(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNotify.") return nil } // ActionSetNonotify handles the `SET NONOTIFY` command. func ActionSetNonotify(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNonotify.") return nil } // ActionSetPrivileges handles the `SET PRIVILEGES` command. func ActionSetPrivileges(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetPrivileges.") return nil } // ActionSetPromptExpire handles the `SET PROMPT_EXPIRE` command. func ActionSetPromptExpire(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetPromptExpire.") return nil } // ActionSetNoPromptExpire handles the `SET NOPROMPT_EXPIRE` command. func ActionSetNoPromptExpire(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNopromptExpire.") return nil } // ActionSetReadNew handles the `SET READNEW` command. func ActionSetReadNew(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetReadNew.") return nil } // ActionSetNoReadNew handles the `SET READNEW` command. func ActionSetNoReadNew(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNoReadNew.") return nil } // ActionSetShowNew handles the `SET SHOWNEW` command. func ActionSetShowNew(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetShowNew.") return nil } // ActionSetNoShowNew handles the `SET SHOWNEW` command. func ActionSetNoShowNew(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNoShowNew.") return nil } // ActionSetSystem handles the `SET SYSTEM` command. func ActionSetSystem(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetSystem.") return nil } repl/show.go +36 −2 Original line number Diff line number Diff line Loading @@ -9,9 +9,43 @@ import ( "git.lyda.ie/kevin/bulletin/dclish" ) // ActionShowVersion handles the `SHOW VERSION` command. This selects a folder. // ActionShowFlags handles the `SHOW FLAGS` command. func ActionShowFlags(_ *dclish.Command) error { fmt.Println("TODO: implement ActionShowFlags.") return nil } // ActionShowFolder handles the `SHOW FOLDER` command. func ActionShowFolder(_ *dclish.Command) error { fmt.Println("TODO: implement ActionShowFolder.") return nil } // ActionShowNew handles the `SHOW NEW` command. func ActionShowNew(_ *dclish.Command) error { fmt.Println("TODO: implement ActionShowNew.") return nil } // ActionShowPrivileges handles the `SHOW PRIVILEGES` command. func ActionShowPrivileges(_ *dclish.Command) error { fmt.Println("TODO: implement ActionShowPrivileges.") return nil } // ActionShowUser handles the `SHOW USER` command. func ActionShowUser(_ *dclish.Command) error { fmt.Println("TODO: implement ActionShowUser.") return nil } // ActionShowVersion handles the `SHOW VERSION` command. func ActionShowVersion(_ *dclish.Command) error { fmt.Printf("BULLETIN Version %s\n", versioninfo.Version) rev := versioninfo.Revision if len(rev) > 7 { rev = rev[len(rev)-7:] } fmt.Printf("BULLETIN Version 2.0.7g (%s)\n", rev) fmt.Printf("Linked on %s\n", versioninfo.LastCommit.Format("2006-05-04 15:02:01")) return nil Loading Loading
NOTES.md +2 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ repl.commands? * Messages: ~~ADD~~, CURRENT, ~~DIRECTORY~~, BACK, CHANGE, FIRST, REMOVE, NEXT, ~~READ~~ * Messages edit: CHANGE, REPLY, FORWARD * Moving messages: COPY, MOVE * Compound commands: SET and SHOW * Compound commands: SET and SHOW - make HELP work for them. * Mail: MAIL, FORWARD, * Implement batch jobs * ~~Editor - need an embedded editor~~ Implemented using tview; good enough Loading Loading @@ -60,7 +60,7 @@ repl.commands? * Commands for a local mail system? * Commands to connect to Mattermost or mastodon? * Commands to manage users. * `SHOW VERSION` - [versioninfo](https://github.com/earthboundkid/versioninfo) will work for go install. * ~~SHOW VERSION~~ * Check db version; notify user if it changes; refuse to write to db if it has. ## Module links Loading
repl/command.go +86 −38 Original line number Diff line number Diff line Loading @@ -1479,7 +1479,7 @@ In order to apply this to a specific folder, first select the folder (using the SELECT command), and then enter the SET READNEW command. Format: SET [NO]READNEW SET READNEW NOTE: If you have several folders with READNEW enabled, each folder's messages will be displayed separately. However, if you EXIT the READNEW Loading @@ -1503,12 +1503,6 @@ SYSTEM for a description of a SYSTEM folder).`, folder. This is a privileged qualifier. It will only affect brand new users (or those that have never logged in). Use /ALL to modify all users.`, }, "/FOLDER": { Description: `/FOLDER=foldername Specifies the folder for which the option is to modified. If not specified, the selected folder is modified. Valid only with NOREADNEW.`, }, "/PERMANENT": { Description: `/[NO]PERMANENT Loading @@ -1518,6 +1512,42 @@ SYSTEM for a description of a SYSTEM folder).`, }, }, }, "NOREADNEW": { Description: `Turns off READNEW. Format: SET NOREADNEW NOTE: If you have several folders with READNEW enabled, each folder's messages will be displayed separately. However, if you EXIT the READNEW mode before all the folders have been displayed, you will not be alerted of the new messages in the undisplayed folders the next time you login. However, if you enter BULLETIN, you will be told that new messages are present in those other folders. Also, it is not possible to EXIT the READNEW mode if there are SYSTEM folders which have new messages. Typing the EXIT command will cause you to skip to those folders. (See HELP SET SYSTEM for a description of a SYSTEM folder).`, Flags: dclish.Flags{ "/ALL": { Description: ` Specifies that the SET [NO]READNEW option is the default for all users for the specified folder. This is a privileged qualifier. The difference between this and /DEFAULT is that the latter will only apply to new users (i.e. any users which have never executed BULLETIN).`, }, "/DEFAULT": { Description: ` Specifies that the [NO]READNEW option is the default for the specified folder. This is a privileged qualifier. It will only affect brand new users (or those that have never logged in). Use /ALL to modify all users.`, }, "/FOLDER": { Description: `/FOLDER=foldername Specifies the folder for which the option is to modified. If not specified, the selected folder is modified.`, }, }, }, "SHOWNEW": { Description: `Controls whether a directory listing of new messages for the current folder will be displayed when logging in. This is similar to READNEW, Loading @@ -1530,17 +1560,43 @@ In order to apply this to a specific folder, first select the folder (using the SELECT command), and then enter the SET SHOWNEW command. Format: SET [NO]SHOWNEW`, SET SHOWNEW`, Flags: dclish.Flags{ "/ALL": { Description: ` Specifies that the SET SHOWNEW option is the default for all users for the specified folder. This is a privileged qualifier. The difference between this and /DEFAULT is that the latter will only apply to new users (i.e. any users which have never executed BULLETIN).`, }, "/DEFAULT": { Description: ` Specifies that the SHOWNEW option is the default for the specified folder. This is a privileged qualifier. It will only affect brand new users (or those that have never logged in). Use /ALL to modify all users.`}, "/PERMANENT": { Description: `/[NO]PERMANENT Specifies that SHOWNEW is a permanent flag and cannot be changed by the individual, except if changing to READNEW. This is a privileged qualifier.`, }, }, }, "NOSHOWNEW": { Description: `Turns off SHOWNEW Format: SET NOSHOWNEW`, Flags: dclish.Flags{ "/ALL": { Description: ` Specifies that the SET [NO]SHOWNEW option is the default for all users Description: ` Specifies that the SET NOSHOWNEW option is the default for all users for the specified folder. This is a privileged qualifier. The difference between this and /DEFAULT is that the latter will only apply to new users (i.e. any users which have never executed BULLETIN).`, }, "/DEFAULT": { Description: ` Specifies that the [NO]SHOWNEW option is the default for the specified Description: ` Specifies that the NOSHOWNEW option is the default for the specified folder. This is a privileged qualifier. It will only affect brand new users (or those that have never logged in). Use /ALL to modify all users.`, Loading @@ -1549,14 +1605,7 @@ In order to apply this to a specific folder, first select the folder Description: `/FOLDER=foldername Specifies the folder for which the option is to modified. If not specified, the selected folder is modified. Valid only with NOSHOWNEW.`, }, "/PERMANENT": { Description: `/[NO]PERMANENT Specifies that SHOWNEW is a permanent flag and cannot be changed by the individual, except if changing to READNEW. This is a privileged qualifier.`, specified, the selected folder is modified.`, }, }, }, Loading Loading @@ -1593,6 +1642,7 @@ the SELECT command, information about that folder is shown. Format: SHOW FOLDER [folder-name]`, MaxArgs: 1, Flags: dclish.Flags{ "/FULL": { Description: ` Control whether all information of the folder is displayed. This Loading @@ -1604,9 +1654,7 @@ the SELECT command, information about that folder is shown. }, "NEW": { Description: `Shows folders which have new unread messages for which BRIEF or READNEW have been set. (Note: If you enter BULLETIN but do not read new unread messages, you will not be notified about them the next time you enter BULLETIN. This is a design "feature" and cannot easily be changed.)`, have been set.`, }, "PRIVILEGES": { Description: `Shows the privileges necessary to use privileged commands. Also shows Loading
repl/set.go +102 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,48 @@ import ( "git.lyda.ie/kevin/bulletin/dclish" ) // ActionSetAccess handles the `SET ACCESS` command. func ActionSetAccess(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetAccess.") return nil } // ActionSetAlways handles the `SET ALWAYS` command. func ActionSetAlways(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetAlways.") return nil } // ActionSetNoalways handles the `SET NOALWAYS` command. func ActionSetNoalways(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNoalways.") return nil } // ActionSetBrief handles the `SET BRIEF` command. func ActionSetBrief(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetBrief.") return nil } // ActionSetNobrief handles the `SET NOBRIEF` command. func ActionSetNobrief(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNobrief.") return nil } // ActionSetDefaultExpire handles the `SET DEFAULT_EXPIRE` command. func ActionSetDefaultExpire(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetDefaultExpire.") return nil } // ActionSetExpireLimit handles the `SET EXPIRE_LIMIT` command. func ActionSetExpireLimit(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetExpireLimit.") return nil } // ActionSetFolder handles the `SET FOLDER` command. This selects a folder. func ActionSetFolder(cmd *dclish.Command) error { if len(cmd.Args) != 1 { Loading @@ -33,3 +75,63 @@ func ActionSetFolder(cmd *dclish.Command) error { // WRITE(6,'('' See '',A,'' if you wish to access folder.'')') return errors.New("Unable to select the folder") } // ActionSetNotify handles the `SET NOTIFY` command. func ActionSetNotify(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNotify.") return nil } // ActionSetNonotify handles the `SET NONOTIFY` command. func ActionSetNonotify(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNonotify.") return nil } // ActionSetPrivileges handles the `SET PRIVILEGES` command. func ActionSetPrivileges(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetPrivileges.") return nil } // ActionSetPromptExpire handles the `SET PROMPT_EXPIRE` command. func ActionSetPromptExpire(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetPromptExpire.") return nil } // ActionSetNoPromptExpire handles the `SET NOPROMPT_EXPIRE` command. func ActionSetNoPromptExpire(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNopromptExpire.") return nil } // ActionSetReadNew handles the `SET READNEW` command. func ActionSetReadNew(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetReadNew.") return nil } // ActionSetNoReadNew handles the `SET READNEW` command. func ActionSetNoReadNew(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNoReadNew.") return nil } // ActionSetShowNew handles the `SET SHOWNEW` command. func ActionSetShowNew(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetShowNew.") return nil } // ActionSetNoShowNew handles the `SET SHOWNEW` command. func ActionSetNoShowNew(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetNoShowNew.") return nil } // ActionSetSystem handles the `SET SYSTEM` command. func ActionSetSystem(_ *dclish.Command) error { fmt.Println("TODO: implement ActionSetSystem.") return nil }
repl/show.go +36 −2 Original line number Diff line number Diff line Loading @@ -9,9 +9,43 @@ import ( "git.lyda.ie/kevin/bulletin/dclish" ) // ActionShowVersion handles the `SHOW VERSION` command. This selects a folder. // ActionShowFlags handles the `SHOW FLAGS` command. func ActionShowFlags(_ *dclish.Command) error { fmt.Println("TODO: implement ActionShowFlags.") return nil } // ActionShowFolder handles the `SHOW FOLDER` command. func ActionShowFolder(_ *dclish.Command) error { fmt.Println("TODO: implement ActionShowFolder.") return nil } // ActionShowNew handles the `SHOW NEW` command. func ActionShowNew(_ *dclish.Command) error { fmt.Println("TODO: implement ActionShowNew.") return nil } // ActionShowPrivileges handles the `SHOW PRIVILEGES` command. func ActionShowPrivileges(_ *dclish.Command) error { fmt.Println("TODO: implement ActionShowPrivileges.") return nil } // ActionShowUser handles the `SHOW USER` command. func ActionShowUser(_ *dclish.Command) error { fmt.Println("TODO: implement ActionShowUser.") return nil } // ActionShowVersion handles the `SHOW VERSION` command. func ActionShowVersion(_ *dclish.Command) error { fmt.Printf("BULLETIN Version %s\n", versioninfo.Version) rev := versioninfo.Revision if len(rev) > 7 { rev = rev[len(rev)-7:] } fmt.Printf("BULLETIN Version 2.0.7g (%s)\n", rev) fmt.Printf("Linked on %s\n", versioninfo.LastCommit.Format("2006-05-04 15:02:01")) return nil Loading